packages/hardhat/contracts
folder and check out what contracts we have there.IAllocationStrategy.sol
is the interface for the CompoundAllocationStrategy.sol
where some logic regarding allocation of interest is included. Here we will delegate all this logic to cDai token. And will pay more attention to sharing the interest between different hats. (rToken logic)rScaffold ๐
.accountToImpersonate
in App.jsx and for the burnerWalletAddress
put your local address of the wallet from upper right corner.snatchDai
! Congratulations, now you have few thousands of DAI on your dai account :)ApproveDai
. For simplicity and for only educational purpose we approve maximum amount, but the amount is configurable. Again change the value of accountToImpersonate
in App.jsx and set the value of the rTokenAddress
to address of our contract: โApprove Dai
and we can go minting :)hat
and then mint to that default one OR we can mintWithNewHat
and do those 2 actions once. Let's do the second one and see what happens.balanceOf
function by entering your burnerWallet address. This should show you 100 rDai! โpayInterest
in order to transfer hat interest to our account. If you do it and see the balance again you should see that some interest is earned already: