Page cover image

Key Functionalities

Swap

The token swap is one of the main utilizations of Ferro protocol, the main purpose is to facilitate an exchange of one token with another, as long as both tokens are available in any of the pools within the protocol.

There are 2 ways a token exchange can be done:

  1. Within the same pool (example: exchanging DAI to USDC in a “USDC, DAI, USDT” pool)

    • The token exchange will be done by adjusting the balance of tokens from the same pool

    • Typically incur no or a very small fee

  2. Cross pool (example: exchanging ETH to USDC, involving “ETH-WETH” pool and “USDC, DAI, USDT” pool)

    • The protocol will route the transaction through the most efficient way (smart routing)

    • This is done by scouring through the different pools (in case there are multiple pools containing the token) and finding the most efficient transaction (minimum slippage)

Users also have the ability to customize their token exchange by specifying allowable Slippage (by %).

The total transaction fee per swap is 0.04%, which is distributed as follows:

  • LP Provider Rewards 0.02%

  • xFER Buyback 0.016%

  • Treasury/Admin 0.004%

Stableswap Price Curvature

Most traditional AMMs utilize a x*y = k invariant (constant-product), where exchange rates are meant to fluctuate according to supply and demand. This inevitably results in higher slippage, the larger the order amount.

While this is an acceptable outcome for most tokens, highly correlated assets require minimal slippage and price fluctuation. A stableswap curve solves this through a hybrid invariant model:

  • For most of the curve, x+y=k invariant (constant-sum) plays a larger factor

    • Prices largely stay the same with minimal slippage

  • As pools become more unbalanced, the constant-product invariant takes precedence

    • Prevents complete draining of the pool as higher slippage kicks in

This unique price curvature results in two benefits:

  1. Effective maintenance of peg

  2. More efficient trades at higher volumes

Swap Price Discount & Premium

Another aspect crucial for the Swap function is the price discount for the tokens that are higher in proportion (overweight) to other tokens in the pool. For example:

  • If the USDC proportion in “USDC, DAI, USDT” pool is higher than the rest (e.g, 50%:25%:25% for DAI and USDT)

  • Users can exchange USDC (e.g. outflow of USDC from the pool) with a price discount

    • This is done to encourage traders to push back the proportion to average

  • The opposite happens to DAI and USDT, a more expensive price will be charged to encourage the opposite

Liquidity Pools

In the most mature Stableswap AMM, such as Curve, typically there are 2 types of pools, Base Pool and Meta Pool each with different characteristics and utilities.

Base Pool

Base Pool can be considered as the most basic token pool, typically consisting of 2 or more highly correlated tokens with the following variations:

  1. Standalone Stablecoin pool (usually treated as the “main pool”)

    • Example: (DAI, USDT, USDC) pool, (TUSD, USDC, BUSDT) pool

  2. Lending pool

    • Example: Tectonic tTOKEN (tDAI, tUSDC, tUSDT), Curve’s Y Pool (yDAI, yUSDC, yUSDT, yTUSD)

  3. Pegged / Yield Bearing token

    • Example: (TONIC, stTONIC), (VVS, xVVS)

While the Standalone stablecoin pools are quite straightforward, Lending & Yield pools can provide users with additional benefits by providing a more direct way to participate in the DeFi protocols.

  • Users participating in the Lending pool will get its token to be automatically wrapped into the related DeFi Protocol token (e.g. tToken for Tectonic pool)

  • By having exposure to this Lending token, users can enjoy the build-in interest compounded by this protocol

  • Similarly, when users participate in Yield bearing pool (e.g. xVVS pool), an exposure to yToken provides exposure to the revenue accrual of the said protocol

However, participating in Lending / Yield pools will also leave users exposed to more risks, in terms of:

  • Smart contract issues with the main Stableswap protocol

  • Smart contract issues with participation in lending protocols

  • Smart contract issues with participation in yield protocol

  • Systemic issues with the stable coins in those pools (e.g. pegging / depegging)

In addition, users depositing token into Base Pool has some flexibility to choose how the deposit token will be allocated:

  • Split equally among tokens in the pool

  • Select specific stablecoin to deposit

  • Convert it into a Lending / Yield token (e.g., tToken or cToken or yToken)

Meta Pool

Meta Pool provides a combination of Base Pool plus 1 or more tokens, for example, pairing of Ferro base pool of (USDC, USDT, DAI) with TUSD.

In the above example, the pool will consist of TUSD (on a standalone basis) and Ferro Base 3Pool LP tokens. This means that liquidity providers of Ferro Base 3pool who do not provide liquidity in the TUSD Metapool are shielded from systemic risks from the Metapool. This will also bring several advantages, such as:

  • Prevents dilution of existing pools

  • Allows Ferro to list less liquid assets

  • More volume and more trading fees for the protocol

Users depositing tokens into TUSD Meta Pool will have several options to deposit/withdraw the token, as follows:

  • TUSD

  • Any of the Ferro Base 3Pool constituents (DAI, USDC, USDT)

  • Ferro Base 3Pool LP token

Similarly, users also have some flexibility to choose how the deposit token will be allocated:

  • Split equally among all stablecoins (4 tokens in this scenario)

  • Convert it into Ferro Base 3Pool LP token

  • Select specific stablecoin to deposit

Deposit / Withdrawal Incentives

Similar to the Swap feature, the typical liquidity pools in Ferro will also carry a mechanism to incentivize/disincentivize users to LP a particular token, in order to balance the proportion of tokens in the pool (a.k.a. Deposit Bonus / Withdrawal Penalty).

  • Users depositing underweighted tokens (vs other tokens in the pool) will receive a Deposit Bonus

  • Users withdrawing underweighted tokens (vs other tokens in the pool) will be charged Withdrawal Penalty

Last updated