Smartlink
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
xy=k=(x+x)(yy)x * y = k = (x + ∆x) * (y - ∆y)
Since the product must still be equal to k. It is equivalent to :
y=yx/(x+x)∆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=9972y∗∆x/10000(x+x)y=9972yx/10000(x+x)y=9972y∗∆x/10000(x+x)∆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 ∆x
XTZ in order to swap for
y ∆y
tokens then the following formula will be used :
k=xy=(x+0.9972Δx)(yΔy)k = x*y = (x + 0.9972*Δx)*(y − Δy)
Hence
Δy=(0.9972Δxyx+0.9972Δx) Δ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.
Last modified 25d ago
Copy link
Contents
Prices
Fees