Skip to main content

Swap Details

Types#

There are four variants of the CFMM flat curve DEX on youves namely; flat curves, target flat curves, double yield flat curves, and the double yield target flat curves.

Flat Curves#

utility curve

The conventional flat-curves optimises swaps for closely related assets for example; uUSD/USDt, uXTZ/tez and sets the center of the curve at 1:1 for both tokens of the swap pair.

Target Flat Curves#

The Target Flat Curve is different from the conventional ones.

In its design, the center of the flat curve aligns with a reference value obtained from an oracle's price feed. One practical example of this can be seen in the uXAU/uUSD swap pair on youves DEX with the reference price feed representing the value of 1 troy ounce of Gold.

The off-chain price feeds fetched by the target flat curves are powered by Acurast, a secure, trustless, and verifiable oracle solution.

Double Yield Flat Curves (Yield Pools)#

Generally for DEXes, liquidity providers earn a share of trading fees as a reward for providing liquidity.

The double yield flat curves have the same swap mechanism as the flat curves but receive additional rewards. Below are the multiple yields obtainable from the double yield flat curves:

  • Trading fees.
  • Interest rate payments.
  • Baking rewards (if XTZ is one of the currencies involved).

Double Yield Target Flat Curves (Yield Pools)#

The double yield target flat curves are a combination of Target Flat Curve and Double Yield Flat Curves. These Target Flat Curves do also receive inetrest rate payments and trading fees and (if applicable) baking rewards.

Pairs (External DEXes)#

For convenience the youves swap frontend also offers trading for pairs, which are not implemented in youves smart contracts. This includes for example the uUSD/YOU pair on Plenty. The table below gives a summary of swap pairs on youves powered by external DEXes.

#PairStatusDEX
1uUSD/tezActiveQuipuswap
2uUSD/YOUActivePlenty
3tez/YOUActiveQuipuswap

The table below is a breakdown of youves swap pairs

#PairFeesStatusTypeDouble YieldBaking Rewards
1uUSD/USDt0.15%Activeflat curveNoNo
2uUSD/uSDC.e0.15%Activeflat curveNoNo
3uUSD/wUSDC0.15%Activeflat curveNoNo
4uUSD/uBTC0.35%Activetarget flat curveNoNo
5uUSD/kUSD0.15%Activeflat curveNoNo
6uUSD/USDtz0.15%Activeflat curveNoNo
7uUSD/uXAU0.35%Activetarget flat curveYesNo
8uBTC/tzBTC0.15%Activeflat curveNoNo
9uBTC/WBTC.e0.15%Activeflat curveNoNo
10tzBTC/wwBTC0.15%Activeflat curveNoNo
11tez/uXTZ0.15%Activeflat curveYesYes

Fee Allocation#

For the swap pairs on youves, 0.15% or 0.35% is deducted as fees for all trades on the pair of which 50% of the fees go to the platform profits and 50% go to the liquidity providers (in which case the fees just stay in the pool and can be claimed by removing liquidity).

Liquidity Provision#

Any user can become a liquidity provider.

Adding Liquidity#

For each pair, a user can become a liquidty provider by adding the tokens of the first and the second asset exactly in the same proportion as they are in the liquidity pool at that instance.

Liquidity Provision Simplification (Single Side Liquidity Provision)#

This feature gives users the flexibility and ease of providing a single token of one side of an LP pair of a youves liquidity pool. youves performs a swap of the provided token for the second token of the LP pair and then adds liquidity for both tokens according to their ratio in the pool post trade.

Removing Liquidity#

At any point in time a liquidity provider can remove its share of liquidity from a youves dex. The proportion of the two assets may be different than what was initially put in.