·
We continued the Mento V3 contest on Cantina.
Lesson Summary:
- In such protocols, depending on the collateral, you need a certain price feed. Always know exactly what collateral tokens is/are going to be used;
- LiquityV2 uses ETH derivatives as collateral. Mento will use cUSD(Celo dollar);
- In Liquity, the shutdown is auto - if the oracle takes more than X days, it will shutdown. In Mento it's manual;
- gas token - it was WETH, and they made it gasToken. What's the purpose? Will they use WETH only again? Could gasToken be another token? If it's lets say USDT transferFrom and approve might screw it - This will be USD.m(cUSD);
- BatchManagerOperations - check if they correctly did transfer the functions there - OK;
- Learn FXPriceFeed contract as it helps gaining context over this fetching price thing I need to look at what collateral does Mento uses? - cUSD;
- Sponsor Question: Study how Shutdown works as it's different than Liquity one;
Sponsor Answer: "So basically Liquity V2 has an automatic shutdown of a collateral branch if an oracle fails for a given amount of time (e.g. no rate updates for 24 hours). This doesn't apply to us since we don't have oracle rates during the weekends (fx markets closed), and we decided not to have automatic shutdown because of oracle failure but to require manual intervention instead, so the manual shutdown would only be used for e.g. if chainlink decides at some point not to update a feed any more"; - Look at oracle adapter implementation;
- Bad price comes and is set as last valid price ---> Protocol manually shuts down ---> Bad price is the last valid price;
- Look at this Celo dollar(cUSD). How is it minted? How people get this cUSD? - collateral for minting cUSD will be USDC on the reserve and collateral for the other stables on each CDP will be cUSD