Search…
Prices and fees

## Prices

Prices are determined by the amount of each token in a pool. For a given liquidity pair, the smart contract maintains the above equation x * y = k.
For example, if you bring ∆x tokens in order to swap for ∆y XTZ then the following formula will be used
$x * y = k = (x + ∆x) * (y - ∆y)$
Since the product must still be equal to k. It is equivalent to :
$∆y = y * ∆x / (x + ∆x)$
Finally, we need to operate with integers only (Tezos doesn’t manage floating numbers) and take a 0.28% fee, which means at the end of every transaction, the user receives 97.2% = 9972 / 10000 :
$∆y=9972∗y∗∆x/10000∗(x+∆x)∆y = 9972 * y * ∆x / 10 000 * (x + ∆x)∆y\\ =9972∗y∗∆x/10000∗(x+∆x)$
If you bring
$∆x$
XTZ in order to swap for
$∆y$
tokens then the following formula will be used :
$k = x*y = (x + 0.9972*Δx)*(y − Δy)$
Hence
$Δy = (\frac{0.9972*Δx* y}{x + 0.9972*Δx})$

## Fees

The 0.28% fee taken against each swap is allocated as per the following ratio:
• 0.25% will be given to the liquidity providers
• 0.01% will be sent to Smartlink Treasury
• 0.02% will be used to buy back and burn \$SMAK tokens.
Export as PDF