Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fip-65 #468

Merged
merged 2 commits into from
Jan 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion proposals/dao/fip_63.ts → proposals/dao/fip_67.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,15 @@ export const teardown: TeardownUpgradeFunc = async (addresses, oldContracts, con
};

export const validate: ValidateUpgradeFunc = async (addresses, oldContracts, contracts) => {
const { lusdPCVDripController, lusdPSMFeiSkimmer, lusdPSM, pcvGuardian, bammDeposit, lusd } = contracts;
const {
lusdPCVDripController,
lusdPSMFeiSkimmer,
lusdPSM,
pcvGuardian,
bammDeposit,
lusd,
rariPool146EthPCVDeposit
} = contracts;

expect(await lusdPCVDripController.source()).to.be.equal(bammDeposit.address);
expect(await lusdPCVDripController.target()).to.be.equal(lusdPSM.address);
Expand All @@ -123,4 +131,6 @@ export const validate: ValidateUpgradeFunc = async (addresses, oldContracts, con
expect(await lusd.balanceOf(lusdPSM.address)).to.be.equal(0);

expect(await pcvGuardian.isSafeAddress(lusdPSM.address)).to.be.true;

expect(await rariPool146EthPCVDeposit.balance()).to.be.equal(ethers.constants.WeiPerEther.mul(2500));
};
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ProposalDescription } from '@custom-types/types';

const fip_62: ProposalDescription = {
title: 'FIP-67: Create Backup LUSD PSM',
const fip_67: ProposalDescription = {
title: 'FIP-65: Tribe ETH Fuse Pool, FIP-67: Create Backup LUSD PSM',
commands: [
/// CR Oracle ops
{
Expand Down Expand Up @@ -71,19 +71,46 @@ const fip_62: ProposalDescription = {
method: 'setSafeAddress(address)',
arguments: ['{lusdPSM}'],
description: 'Set the LUSD PSM as a safe address'
},
/// FIP-65
{
target: 'compoundEthPCVDeposit',
values: '0',
method: 'withdraw(address,uint256)',
arguments: ['{rariPool146EthPCVDeposit}', '2500000000000000000000'],
description: 'withdraw 2500 ETH to rariPool146 ETH PCV Deposit'
},
{
target: 'rariPool146EthPCVDeposit',
values: '0',
method: 'deposit()',
arguments: [],
description: 'deposit on rari pool 146 ETH PCV Deposit'
},
{
target: 'collateralizationOracle',
values: '0',
method: 'addDeposit(address)',
arguments: ['{rariPool146EthPCVDeposit}'],
description: 'Add rari pool 146 ETH PCV Deposit to cr oracle'
}
],
description: `
This proposal operationalizes the LUSD PSM:
FIP 65 sends 2500 ETH from Compound to the Tribe ETH Fuse pool. This allows for levering on stETH interest rates.

Forum: https://tribe.fei.money/t/fip-65-tribe-eth-fuse-pool/3862

FIP-67 proposal deploys a backup LUSD PSM, initially paused:
1. Add the LUSD PSM to the CR Oracle
2. Pause LUSD PCVDripController
3. Pause LUSD lusdPSMFeiSkimmer
4. Pause minting and redemptions on the newly created lusd PSM
5. Grant the LUSD PSM the minter role
6. Grant PCV Controller to the lusdPCVDripController and lusdPSMFeiSkimmer

Forum: https://tribe.fei.money/t/fip-67-backup-lusd-redeemability-module/3875
Code: https://github.com/fei-protocol/fei-protocol-core/pull/456
`
};

export default fip_62;
export default fip_67;
3 changes: 2 additions & 1 deletion protocol-configuration/collateralizationOracle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ const collateralizationAddresses = {
'aaveEthPCVDepositWrapper',
'uniswapPCVDeposit',
'ethTokemakPCVDeposit',
'ethPSM'
'ethPSM',
'rariPool146EthPCVDeposit'
],
dpi: ['dpiUniswapPCVDeposit', 'rariPool19DpiPCVDepositWrapper'],
rai: ['rariPool9RaiPCVDepositWrapper', 'aaveRaiPCVDepositWrapper'],
Expand Down
13 changes: 13 additions & 0 deletions protocol-configuration/dependencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ const dependencies: DependencyMap = {
'indexDelegator',
'liquityFusePoolLusdPCVDeposit',
'poolPartyFeiPCVDeposit',
'rariPool146EthPCVDeposit',
'rariPool18FeiPCVDeposit',
'rariPool19DpiPCVDeposit',
'rariPool19FeiPCVDeposit',
Expand Down Expand Up @@ -360,6 +361,18 @@ const dependencies: DependencyMap = {
poolPartyFeiPCVDeposit: {
contractDependencies: ['core', 'fei']
},
rariPool146EthPCVDeposit: {
contractDependencies: ['core', 'rariPool146Eth']
},
rariPool146Comptroller: {
contractDependencies: ['rariPool146FuseAdmin', 'rariPool146Eth']
},
rariPool146FuseAdmin: {
contractDependencies: ['rariPool146Comptroller']
},
rariPool146Eth: {
contractDependencies: ['rariPool146Comptroller', 'rariPool146EthPCVDeposit']
},
rariPool18FeiPCVDeposit: {
contractDependencies: ['core', 'fei']
},
Expand Down
10 changes: 10 additions & 0 deletions protocol-configuration/mainnetAddresses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,11 @@ const MainnetAddresses: MainnetAddresses = {
address: '0x7Eb88140af813294aEDce981b6aC08fcd139d408',
category: AddressCategory.PCV
},
rariPool146EthPCVDeposit: {
artifactName: 'EthCompoundPCVDeposit',
address: '0xC68412B72e68c30D4E6c0854b439CBBe957146e4',
category: AddressCategory.PCV
},
rariPool18FeiPCVDepositWrapper: {
artifactName: 'PCVDepositWrapper',
address: '0x07F2DD7E6A78D96c08D0a8212f4097dCC129d629',
Expand Down Expand Up @@ -801,6 +806,11 @@ const MainnetAddresses: MainnetAddresses = {
address: '0x6d64D080345C446dA31b8D3855bA6d9C0fC875D2',
category: AddressCategory.FeiRari
},
rariPool146Eth: {
artifactName: 'unknown',
address: '0xfbD8Aaf46Ab3C2732FA930e5B343cd67cEA5054C',
category: AddressCategory.FeiRari
},
fuseAdmin: {
artifactName: 'FuseAdmin',
address: '0x761dD1Ae03D95BdABeC3C228532Dcdab4F2c7adD',
Expand Down
10 changes: 6 additions & 4 deletions test/integration/proposals_config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { ProposalCategory, ProposalsConfigMap } from '@custom-types/types';
// import fip_xx_proposal from '@proposals/description/fip_xx';

import fip_60b from '@proposals/description/old/fip_60b';
import fip_63 from '@proposals/description/fip_63';
import fip_67 from '@proposals/description/fip_67';
import fip_64 from '@proposals/description/fip_64';

const proposals: ProposalsConfigMap = {
Expand Down Expand Up @@ -38,7 +38,7 @@ const proposals: ProposalsConfigMap = {
totalValue: 0,
proposal: fip_60b
},
fip_63: {
fip_67: {
deploy: false,
proposalId: undefined,
affectedContractSignoff: [
Expand All @@ -47,12 +47,14 @@ const proposals: ProposalsConfigMap = {
'lusdPSMFeiSkimmer',
'collateralizationOracle',
'core',
'pcvGuardian'
'pcvGuardian',
'rariPool146EthPCVDeposit',
'compoundEthPCVDeposit'
],
deprecatedContractSignoff: [],
category: ProposalCategory.DAO,
totalValue: 0,
proposal: fip_63
proposal: fip_67
},
fip_64: {
deploy: false,
Expand Down