Search
⌃K

Yields

Yields allow the savings account users to invest in various protocols and exchanges supported by Sublime protocol. Yields can only be used by savings account to deposit or redeem the assets.
Yield contracts invest the tokens deposited based on the strategy specified in it. E.g. A yield contract can implement yearn strategy where any tokens deposited into it are in turn deposited into Yearn vaults where the tokens bear interest. Users can control the strategy their tokens are deposited into from their savings account

getTokensForShares

This function is used to query the number of tokens that can be received if a specified number of shares are unlocked
function getTokensForShares(uint256 shares, address asset) returns (uint256)
  • shares: The number of shares for which equivalent tokens are to be queried
  • asset: The asset that the shares represent
  • RETURN: Equivalent number of tokens of the asset for the shares

getSharesForTokens

This function is used to query the number of shares received if a specified number of tokens are locked
function getSharesForTokens(uint256 amount, address asset) returns (shares)
  • amount: The number of tokens for which equivalent shares are queried
  • asset: The asset that the tokens represent
  • RETURN: Equivalent number of shares for the tokens