TIP-111: Increase stable backing to 90-100%#897
Conversation
thomas-waite
left a comment
There was a problem hiding this comment.
Know this is WIP, few clarifying questions
thomas-waite
left a comment
There was a problem hiding this comment.
This looks good to me. Small comments. When we merge this, I'll consolidate into one DAO vote to also pull the DAI out of the DPI LBP
| '10000' // basisPoints, 100% | ||
| ], | ||
| description: | ||
| 'Withdraw all DPI from the Compound DAI PCV deposit (~$200k) to the TribalCouncil multisig, where it will be liquidated' |
There was a problem hiding this comment.
This is what I had originally put together - send the leftover DPI to the TC safe where it can be liquidated on a DEX aggregator. Flagging here for others, it's a small amount, appropriate imo
| convexPoolPCVDeposit: { | ||
| artifactName: 'ERC20CompoundPCVDeposit', | ||
| address: '0x525eA5983A2e02abA8aA0BE7D15Cd73150812379', | ||
| category: AddressCategory.PCV_V1 |
There was a problem hiding this comment.
fun fact but this PCV deposit is actually using the PCV_V2 interface, idk why but a wrapper has been deployed, and it's the wrapper that is in the CR oracle (even though there was no need for wrapping)
If we flag this as PCV, the e2e automatically expect it to be configured in the CR oracle, which is not the case
There was a problem hiding this comment.
I added it because it was not in our mainnetAddresses file & that's a problem because it's holding protocol funds (only the wrapper was in mainnetAddresses)
| this.fei = await ethers.getContractAt('Fei', await this.core.fei()); | ||
| this.steth = await (await ethers.getContractFactory('MockStEthToken')).deploy(); | ||
| this.stableswap = await (await ethers.getContractFactory('MockStEthStableSwap')).deploy(this.steth.address); | ||
| this.oracle = await (await ethers.getContractFactory('MockOracle')).deploy(1); |
There was a problem hiding this comment.
We should remove references to this in this file - I know most of them were already here but this is bad practice as this bypasses type checking since these vars are created at runtime.
| await ethers.getContractFactory('EthLidoPCVDeposit') | ||
| ).deploy( | ||
| this.core.address, | ||
| { |
There was a problem hiding this comment.
Getting some errors on typing for the oracle params, are you sure this is correct? My types show that the second param here should be a string.
There was a problem hiding this comment.
you may need to recompile, I had this problem while developing, the old types were used and I got a lot of warnings in my editor. I have added a structure for oracle params in the constructor, but the old 2nd parameter was a string (now the 3rd parameter is a string, and 2nd is a structure)
There was a problem hiding this comment.
one more reason why I don't like that we add a compilation layer on top of js btw
contracts/oracle/CompositeOracle.sol
Outdated
There was a problem hiding this comment.
Since this is functionally the same as doInvert, should we use that verbage so that it's the same across oracles?
There was a problem hiding this comment.
I'd add this naming has confusing boolean interpretations. It is not multiply || divide
There was a problem hiding this comment.
should we just name it multiply ?
There was a problem hiding this comment.
doInvert to me means you're directly inverting something - 1 / quantity. Not sure of the smoothest syntax. Maybe two boolean parameters:
bool multiply
bool divide
require(multiply != true && divide != true, "Can not set multiply and divide to true")
There was a problem hiding this comment.
we settled for invertOracleB in dev chat, used that
| expect(stethBalanceBefore).to.be.at.most(51000); | ||
|
|
||
| // -------------------------------------------------------------- | ||
| // FIP_104b validation |
There was a problem hiding this comment.
nit: FIP_104 incorrect
There was a problem hiding this comment.
these are actually the steps from Tom's fip_104, that have been combined with tip_111 to not need a 2nd dao vote
There was a problem hiding this comment.
I called it FIP_104b to indicate it was the second part/cleanup (FIP_104 started the LBP, transferred CREAM and did various technical maintenance tasks)
| values: '0', | ||
| method: 'deposit()', | ||
| arguments: () => [], | ||
| description: 'Deposit all WETH in Aave' |
There was a problem hiding this comment.
we may not want to do this, Aave could have solvency issues with stETH leverage
There was a problem hiding this comment.
I'm adding a call to move WETH to PSM (we can pause PSM with guardian prior to execution)
This reverts commit a4ddd8e.
PR Type: Feature
DAO action :
PR Checklist - Feature (Proposal)