EVANGEL DOCUMENTATION / 07
Trading and liquidity
Understand the custom pool, fees, quotes, and real reserves.
A token-only start
Every project pool begins with 14.7 million project tokens and zero real pairing assets. Buyers add the pairing asset through purchases. The virtual quote is an accounting parameter that sets the curve; it cannot be withdrawn or used to pay sellers.
This is Evangel’s custom constant-product-style pool, not a Uniswap liquidity position. The factory does not deposit external liquidity into it. The pool has no LP withdrawal or administrative reserve-sweep path.
How a buy is calculated
Let T be the token reserve, Q the real quote reserve, V the virtual quote, and A the input amount in pairing-asset base units. The buy fee is rounded up. After subtracting the fee, the output is calculated from the curve and rounded down.
fee = ceil(A × buyFeeBps / 10,000)
net = A − fee
tokensOut = floor(T × net / (V + Q + net))How a sell is calculated
A sell exchanges project tokens for the pairing asset. The gross quote output must be no greater than the actual quote reserve, even if the virtual curve suggests a larger output. Fees are subtracted from the gross amount.
gross = floor((V + Q) × tokensIn / (T + tokensIn))
require gross <= Q
fee = ceil(gross × sellFeeBps / 10,000)
quoteOut = gross − feeExample buy
With T = 14.7M tokens, V = 1,000 quote units, Q = 0, and a 100-unit purchase at 2.1%, the fee is 2.1 units and 97.9 units enter real reserves. The curve uses that net amount to calculate tokens received. Actual values use integer base units and rounding.
A later sale is not guaranteed to return the original purchase amount. Curve movement, fees, other trades, and the pairing asset’s own price all affect the outcome.
Using the trade panel
- Check the project, token address, and exact pairing asset.
- Enter the amount in the displayed asset units and request a fresh quote.
- Review estimated receive, fee, and slippage tolerance. The browser currently uses 1%.
- Approve the input token allowance if required, then confirm the swap.
- Wait for the successful receipt and refreshed reserves. A signature or transaction hash alone does not prove success.
Why a trade can fail
A quote can become stale after another trade. The deadline may pass, minimum output may no longer be available, or a sale may exceed real reserves. A paused or restricted quote token may reject transfers. A failed simulation should be investigated rather than bypassed.
The pool checks exact quote input received to reject taxed deposits. Governance must still assess transfer behavior and issuer controls, including outbound transfers and upgrades.