mint
mint
is the function called when a saver deposits into a type of SaveToken.amount
, the number of SaveTokens to mintMint
, an event for indexing the number of SaveTokens mintedmsg.sender
mint
worksamount
of SaveTokensassetTokens
and the insuranceTokens
necessary to mint the amount
of SaveTokens via the corresponding asset adapter (as registered in the SaveToken contract).amount
of SaveTokens for msg.sender
mint
must first approve
the SaveToken contract to transfer their underlying token (e.g., DAI, USDC, etc.).amount
passed to mint
may not always equal the final amount
of SaveTokens minted. This is expected; it's due to very tiny discrepancies in the ways different interest-bearing asset and insurance token protocols round the amounts to mint. The difference is negligible (tiny fractions of a cent).withdrawForUnderlyingAsset
withdrawForUnderlyingAsset
allows users to unbundle their SaveTokens and receive the underlying asset in return.amount
, the number of SaveTokens to unbundleWithdrawForUnderlyingAsset
, an event for indexing the number of SaveTokens unbundledmsg.sender
withdrawForUnderlyingAsset
worksmsg.sender
amount
of SaveTokens equal to the amount
of tokens that were unbundledexerciseInsurance
exerciseInsurance
allows users to exercise (aka make a claim on) their insurance, e.g. in case of an adverse financial event or a hack that reduces the value of the interest-bearing asset.amount
, the number of SaveTokens on which to exercise insuranceExerciseInsurance
, an event for indexing the number of SaveTokens in which insurance was exercisedmsg.sender
exerciseInsurance
worksmsg.sender
amount
of SaveTokens equal to the amount
of insurance tokens that were exercisedwithdrawReward
withdrawReward
allows users to withdraw all of the rewards tokens they've yielded through the corresponding interest-bearing asset protocolWithdrawReward
, an event for indexing the number of reward tokens withdrawnamount
of reward tokens withdrawnmsg.sender
withdrawReward
worksmsg.sender