Minting and Redeeming Junior Tranche tokens (ERC-20)
Please refer to the SmartYield.sol repo for code references made on this page.
Last updated
Was this helpful?
Please refer to the SmartYield.sol repo for code references made on this page.
Last updated
Was this helpful?
SMART Yield relies on minting and burning ERC-20 tokens to keep track of users' claims on the junior tranche of a given originator.
Upon depositing, the user receives a commensurate number of fungible tokens that reflects the exchange value between one such token and the underlying stablecoin.
Upon redemption, the user burns the ERC-20 tokens in exchange for a proportional subset of the junior tranche, minus a possible redemption fee (i.e., the "forfeits" variable below) depending on what the weighted average maturity date of the senior tranche is.
Deposits into the junior tranches of all SMART Yield junior tranches assess a nominal fee on the principal.
With the fee assessed, the appropriate number of jTokens for their deposit sum can be determined.
The primary price of a given jToken is determined by the price()
function.
forfeits
VariableThe junior tranche of any given SMART Yield pool is earning yield in part to cover the fixed yields of the senior tranche. In order to ensure that there remains enough capital in the system to cover what is owed to senior tranche tokens, the forfeits
variable keeps track of the obligation for a given subset of the junior tranche.
First, the debtShare
variable is calculated to determine what percentage of the outstanding junior tranche token supply a potential sale amount represents.
With the user's debt share determined, SMART Yield is then able to assess the proportionally correct value for forfeits
which then gets subtracted from the value of the user's jTokens within the toPay
variable.
Users are able to redeem their jTokens in one of two ways: either immediately, and be obligated to pay their respective forfeits
sum, or via a slower two-step redemption process.
Two-step redemption allows the user to avoid forfeiting capital, but requires them to wait until the weighted average maturity date for the senior tranche at the time of initiating the process. This process involves the exchange of jTokens for a junior tranche ERC-721 bond, akin to the senior tranche token process.
When the user elects to redeem via this method, their maturity date is determined as the day following the aforementioned senior tranche, or ABOND, date.
Upon maturity of the jToken bond, the user is then able to redeem the original sum of jTokens they had by burning the associated ERC-721.
Assuming that checks are passed (i.e., the contract is not paused and the getsTokens variable is within range), the user is then able to exchange their stablecoins for jTokens. (See: )
Single-step redemption allows the user to claim their principal and earned yield immediately, but potentially at the expense of forfeiting a portion necessary for covering senior tranche obligations. (See: )