I have used Idle finance interface ILendingProtocol
to starture for strategy.
Where strategy consumes a DAI
token and internall it will call mint
of creamDAI and buy Cream Dai Stablecoin token.
Strategy:
You can find code in contracts/wrappers/IdleCreamDAI.sol
path.
Clieck here to go strategy code
Test-case:
You can find test case in test/idleCreamDai.js
path.
Click here to go test cases
Download code
1). Clone repo
Install dependency
2). yarn
to run on mainnet fork
3). npx hardhat test --network hardhat
Twitter
Discord: sunny#3937