Zenzen docs

Zenzen protocol · live contracts

Integration

Getting a quote

There is no quote() on the curve. Read reserves and apply the fee yourself.

x = virtualBase + realBase
y = virtualTokens - tokensSold
k = x * y
feeBps = FEE_BPS()                // 200 on live $ZNZF and new launches
snipe = paid * snipeTaxBps(to) / 10_000
tradable = paid - snipe
fee = tradable * feeBps / 10_000
net = tradable - fee
newX = x + net
newY = k / newX
tokensOut = y - newY

On a sell, fee is taken from the quote out, not the token in. If you skip snipeTaxBps in the first three seconds, the UI will over-promise tokensOut.