Fyde Contract
The Fyde contract serves as the core contract of the Fyde protocol. It handles the logic for depositing, withdrawing, and swapping assets within the protocol.
Fyde operates as a diversified vault, accepting certain assets, each with a specific target concentration representing the asset’s desired weight in the protocol relative to the Total Value Locked (TVL) in USD. Target concentrations represent the ideal weight of a given asset in the protocol as part of an overarching portfolio management strategy. Users can deposit, withdraw, and swaps these assets in the Fyde protocol.
Deposit
Approved assets can be deposited by users, and upon deposit, $TRSY is minted to the user. Minted $TRSY represents a share of the vault that is proportional to the deposited amount denominated in USD.
For instance, if a user deposits 100 TokenA, equivalent to 100k USD, and the TVL is 1 million USD with 500k $TRSY in circulation, the user will receive 50k $TRSY.
Withdraw
Users can withdraw assets by burning their $TRSY tokens. The withdrawal value is computed using mechanisms akin to those used in depositing.
For example, if a user holds 50k $TRSY and the TVL is 1 million USD with 500k $TRSY in circulation, the user can withdraw 10% of the index vault, equivalent to 100k USD.
Slippage
Every token in the vault is associated with an ideal concentration, or weight, which is set in order to target specific risk metrics corresponding with each token. Vault actions such as deposits, withdrawals, and swaps can begin to deviate asset concentrations from their target, and as a result, fundamentally change the risk profile of the overall vault. In order to minimize the impact of actions that can negatively impact the health of the vault, slippage will occur on the trade.
For instance, deposits altering the concentration towards an overweight position will incur slippage, as will withdrawals from an underweight asset. On the other hand, withdrawals of overweight tokens and deposit of underweight ones will be completely slippage-free.
Slippage on Deposits
An overweight asset can be thought of as a token that has drifted outside of its slippage-free zone. This range is usually centred around the target concentration that is set for each token . The upper bound of this range (or the deposit limit) is set by a factor of the target concentration. When an asset passes the limit, slippage will incur on subsequent deposits, proportional to how far above this limit the concentration has moved. The slippage is computed only on the proportion of the deposit made above the limit , where is the USD value of each individual deposit and is the total deposit value.
Since multiple tokens can be deposited simultaneously, the total slippage amount is computed as a sum of the percent of each deposit made above the upper concentration limit . This percentage is proportional to how far above the upper limit the deposit is made, up to a maximum percentage .
Slippage on Withdrawals
Slippage will similarly occur on withdrawals of underweight tokens. As with deposits, only the proportion of the withdrawal made below the lower limit () will be impacted by slippage.
The slippage incurred on each token for multi-token withdrawals is again proportional to far below the concentration limit the withdrawal occurs, up to a maximum percentage .
Last updated