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

function transfer(
    address to,
    uint256 value
) public returns (bool success)

Standard ERC20 transfer function with a pre-transfer yield update.

Input ParameterTypeDescription

to

address

The address to send the YT to

value

uint256

The amount of the YT to send

Return ParameterTypeDescription

success

bool

A boolean value indicating whether the transfer was successful

transferFrom

function transferFrom(
    address from,
    address to,
    uint256 value
) public returns (bool success)

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 ParameterTypeDescription

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

Return ParameterTypeDescription

success

bool

A boolean value indicating whether the transfer was successful

View Methods

getPT

function getPT() public view returns (address)

Get the Principal Token associated with the yield token.

decimals

function decimals() public view returns (uint8)

Returns the number of decimals of the YT (same as the PrincipalToken's decimals). See decimals()

balanceOf

function balanceOf(address account) public view returns (uint256)

Returns the balance of YT before expiry of the principal token and return 0 after the expiry of the principal token.

actualBalanceOf

function actualBalanceOf(address account) public view returns (uint256)

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