What each redeem and lend must accomplish to be successful
Note that this refers to non-Illuminate lend and redeem calls - Illuminate calls are slightly different.
lend
redeem
Extract fee
Transfer underlying to lender contract
Swap the underlying for PTs
Verify receipt of PTs
Mint equivalent amount of Illuminate PTs to the user
Verify principal
Verify token has matured
Transfer PTs for the protocol from the Lender to Redeemer
Execute the redemption for underlying (if necessary, convert to underlying)
Update the holdings mapping (which determines how much underlying has been redeemed, necessary in the event of partial redemptions)
Last updated 3 years ago