Yield Module
The Yield Module allows idle assets in the Liquid Vault to be deployed to third-party protocols to generate yield for $TRSY stakers. The yield module consists of multiple contracts to generate and distribute yield:
YieldManager: Main contract for yield functionalities. Deploys assets from Liquid Vault to yield strategies, harvests and distributes yield to $TRSY stakers.
YieldStrategy: Implements strategies for yield that assets are deployed to. Upgradable to include new strategies on the market.
YieldToken: Token to replace assets deployed to yield in the Liquid Vault in order to keep correct accounting.
$sTRSY: tokenised Vault (ERC-4626) for $TRSY that distributes generated yield to stakers via increasing exchange rate of $sTRSY/$TRSY
RewardsDistributor: Distributes additional yield in $FYDE token post-TGE to $TRSY stakers depending on market conditions
YieldManager functions
The YieldManager is managed by Fyde; therefore all functions can only be called by the owner of the contract.
createYieldToken: Deploys a yieldToken for a given underlying asset and registers it in the taxModule and oracleModule which will consider the yieldToken as the underlying asset.
moveAssetToYieldManager: Swaps assets that is deployed to yield strategy from the Liquid Vault for the yieldToken.
moveAssetToLiquidVault: Swaps assets for yieldToken in the Liquid Vault and burns the received yieldToken.
depositYieldIntoLiquidVault: Since yield is generated in several tokens but is distributed in $TRSY this functions deposits yield in the vault to receive $TRSY.
distributeYieldToStrsy: Sends $TRSY to the $sTRSY contract where it can be claimed by $sTRSY holders.
deployToYieldStrategy: Fallback function that delegates to the YieldStrategy contract which implements specific DeFi integrations to generate yield.
YieldStrategy functions
The Yield Module generates yield by integrating with other DeFi protocols. These strategies are implemented in the YieldStrategy contract which is upgradeable to dynamically follow the evolving market. Currently supported strategies:
Pendle: Assets can be deposited into Pendle to receive fix yield and/or to provide liquidity for the Pendle AMM and receive swap fees and Pendle rewards. Associated functions: depositToPendle, withdrawFromPendle, addPendleLPPosition, removePendleLPPposition, approvePendle, redeemPendleLPRewards
DAI Savings Rate: Stake DAI stablecoin to receive a fixed percentage yield set by the MakerDAO. Associated functions: stakeDai, unstakeDai, currentDaiBalance
EtherFi: deposit ETH to EtherFi to receive yield-bearing eETH Associated functions: depositWETHInEtherfi
1INCH: DEX aggregator to enter/exit positions at market rate Associated functions: swapOn1INCH
Functions in the YieldStrategy contract are combined to create higher yield. One example is to deposit ETH to receive eETH whose fixed yield component is sold on Pendle.
YieldToken functions
The YieldToken takes the place of the underlying asset in the Liquid Vault for as long as it is deployed into a yield strategy. For the Liquid Vault, yieldToken and underlying token are seen as identical so that concentrations and fees are unaffected by assets being deployed for yield. For the Liquid Vault a balance of 100 yieldDAI simply means that 100 DAI are currently active in the yield module. The yieldToken is a purely internal token for accounting purpose, it is created/burned by the yieldManager and can not be transferred outside the protocol.
$sTRSY functions
Tokenised yield bearing vault contract (ERC-4626) used to distribute $TRSY yield to $TRSY stakers. Starting at a rate of 1:1 $sTRSY/$TRSY, the generated yield in $TRSY is sent to this contract to increase the exchange rate. Users that stake $TRSY and hold $sTRSY for a duration will receive more $TRSY than they originally staked once they unstake.
deposit(withPermit): deposit given amount of $TRSY to receive corresponding amount of $sTRSY
mint(withPermit): receive given amount of $sTRSY by depositing corresponding amount of $TRSY
withdraw: receive given amount of $TRSY by burning corresponding amount of $sTRSY
redeem: burn given amount of $sTRSY to receive corresponding amount of $TRSY
updateVestingSchedule: set time over which yield is paid out to stakers, only callable by Fyde team
RewardsDistributor functions
Additional to the yield received in $TRSY, $sTRSY holders receive boosted yield in $FYDE tokens (post-TGE) depending on their share of the total amount of $TRSY staked and a predetermined emission rate. The accrued $FYDE token must be claimed by the user.
activateFydeEmissions: must be called by user if they receive $sTRSY via transfer (is automatically activated when user stakes $TRSY themselves)
claimFydeEmissions: Transfers accrued $FYDE token to the user and resets their internal balance
Last updated