The Agora
The Agora is Eternum's on-chain automated market maker (AMM) for trading LORDS against game resources. Each tradable resource has a dedicated LORDS/Resource pool using the constant-product (x * y = k) formula.
How It Works
The Agora uses liquidity pools — paired reserves of LORDS and a resource token. When you swap, you deposit one token into the pool and withdraw the other. The price is determined automatically by the ratio of tokens in the pool.
Swapping
You can swap between any two tokens:
- Direct swaps: Trade LORDS for a resource (or vice versa) through a single pool.
- Routed swaps: Trade one resource for another. The Agora routes automatically through LORDS as an intermediary (e.g., Wood → LORDS → Stone uses two pools).
The price you receive depends on the size of your trade relative to the pool. Larger trades move the price more (slippage). You can set a slippage tolerance (default 0.5%) to protect against unfavorable price movement — the transaction will revert if the price moves beyond your tolerance.
Providing Liquidity
Anyone can become a liquidity provider (LP) by depositing both LORDS and a resource token into a pool proportionally. In return you receive LP tokens representing your share of the pool.
As trades occur, LPs earn a share of the swap fees proportional to their pool share. When you're ready to exit, burn your LP tokens to withdraw your share of both tokens from the pool.
First deposit: LP tokens minted = lordsDeposited - 1000 (a tiny amount is locked permanently to prevent pool
manipulation).
Subsequent deposits: LP tokens minted = (lordsAdded * totalLpSupply) / lordsReserve.
Fee Structure
Every swap incurs two fees:
| Fee | Rate | Recipient |
|---|---|---|
| LP Fee | 1% | Liquidity providers (accrues to pool reserves) |
| Protocol Fee | 3% | veLORDS holders |
- The LP fee is deducted from the input amount before the swap.
- The Protocol fee is deducted from the output amount after the swap.
- Both fees apply sequentially, not additively.
Deadlines
All swap and liquidity transactions include a deadline (default: 20 minutes from submission). If the transaction hasn't been processed by then, it automatically reverts to protect you from stale prices.
Using The Agora
Swap Tab
- Select a pool from the pool list on the left.
- Choose your Pay and Receive tokens from the dropdowns.
- Enter the amount you want to swap.
- Review the quoted output, price impact, and minimum received.
- Adjust slippage tolerance if needed (gear icon).
- Click Swap and confirm the transaction.
Add Liquidity
- Select a pool.
- Enter the amount of LORDS you want to deposit — the required resource amount is calculated automatically to maintain the pool ratio.
- Review the LP tokens you'll receive and your projected pool share.
- Click Add Liquidity.
Remove Liquidity
- Select a pool where you hold LP tokens.
- Enter the amount of LP tokens to burn.
- Review the LORDS and resource tokens you'll receive.
- Click Remove Liquidity.
Trade History
The History tab shows recent swaps for the selected pool, including direction (Buy/Sell), amounts, and the effective rate.