Yield Token
The YT (Yield Token) represents the yield that is accrued by an IBT (Interest Bearing Token). It is created when an IBT or an underlying asset is deposited into a PrincipalToken, and the interest bearing token is split into PT and YT.
The YT can be traded with other users to hedge or speculate on yields. A user holding a YT can claim his yield by calling claimYield
or claimYieldInIBT
on the Principal Token contract.
For more information, see Tokenising Yield.
YT.sol code can be found on GitHub.
Methods
transfer
Standard ERC20 transfer
function with a pre-transfer yield update.
Input Parameter | Type | Description |
---|---|---|
| address | The address to send the YT |
| uint256 | The amount of the YT to send |
Return Parameter | Type | Description |
---|---|---|
| bool | A boolean value indicating whether the transfer was successful |
transferFrom
Standard ERC20 transfer
function with a pre-transfer yield update.
from
must have previously approved msg.sender
to transfer value
using the standard ERC20 approval process.
Input Parameter | Type | Description |
---|---|---|
| address | The address to send the YT |
| address | The address to send the YT |
| uint256 | The amount of the YT to send |
Return Parameter | Type | Description |
---|---|---|
| bool | A boolean value indicating whether the transfer was successful |
View Methods
getPT
Get the Principal Token associated with the yield token.
decimals
Returns the number of decimals of the YT (same as the PrincipalToken's decimals). See decimals()
balanceOf
Returns the balance of YT before expiry of the principal token and return 0 after the expiry of the principal token.
actualBalanceOf
Returns the real balance of YT as defined in the balanceOf from ERC20 standard
i.e the sum of incoming YT to the account
minus the outgoing balance of YT tokens.
Last updated