Yield Token
Last updated
Last updated
The YT () represents the yield that is accrued by an (Interest Bearing Token). It is created when an IBT or an underlying asset is deposited into a , and the interest bearing token is split into and .
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 or on the Principal Token contract.
For more information, see .
YT.sol code can be found on .
Standard ERC20 transfer
function with a pre-transfer yield update.
to
address
The address to send the YT to
value
uint256
The amount of the YT to send
success
bool
A boolean value indicating whether the transfer was successful
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.
from
address
The address to send the YT from
to
address
The address to send the YT to
value
uint256
The amount of the YT to send
success
bool
A boolean value indicating whether the transfer was successful
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.
Get the associated with the yield token.
Returns the number of decimals of the YT (same as the PrincipalToken's decimals). See
Returns the balance of YT before and return 0 after the expiry of the principal token.