mintIdleToken
This method is used to deposit money into the Idle protocol. When you call mintIdleToken we will transfer the amount of underlying supplied to IdleToken contract and then mint interest-bearing tokens with that amount. Interest-bearing tokens of each user are pooled together inside the IdleToken contract and you will then receive IdleTokens which represent your share of Idle pools.
User should call approve on the underlying asset used (eg. DAI) to allow IdleToken contract to spend _amount of tokens before calling this method.
NOTE: after the first mint all subsequent ones will also send governance tokens (eg IDLE) to msg.sender (if msg.sender had other previously minted idleTokens in the account)
1
function mintIdleToken(uint256 _amount, bool _skipWholeRebalance, address _referral) external returns (uint256 mintedTokens);
Copied!
  • _amount : amount of underlying token to be lent
  • _skipWholeRebalance : boolean flag, not used anymore so can receive either true or false
  • _referral: address for eventual future referral program
  • RETURN mintedTokens : amount of IdleTokens minted
Last modified 2mo ago
Copy link