Redeems the callers TBY . Burning the token and sending the user their share of rewards generated during the tokens lifecycle.
Lenders can only redeem if market makers have done their job swapping the rwa for the asset.
redeemBorrower
Redeem the borrowers's share of rewards generated from the rwa at the time of maturity.
Borrowers can only redeem if market makers have done their job swapping the rwa for the asset.
borrowerAmount
Returns the total amount of assets a borrower has contributed for a given TbyId
swapIn
Swaps in assets for rwa tokens, starting the TBY minting process. If interacted with multiple times in a 48 hour period the TBYs that get minted will have the same token id, start , and end time. For system efficiency it is recommended that market makers batch as many matched orders as possible.
Returns the id of the TBY the swap was for, as well as amountSwapped , representing the total amount of assets swapped out of the pool.
This is a permissioned function. Only fully KYCed Market Makers can call this function.
swapOut
This is a permissioned function. Only fully KYCed Market Makers can call this function.
Swaps asset tokens in and rwa tokens out, ending the TBY life cycle.
Returns assetAmount, representing the total amount of assets swapped into the pool.