$MEMPIRE & the AMM
$MEMPIRE is the game's soft currency and a real SPL token with a real pool behind it. Both halves of that sentence matter.
What it does in the game
It skips chest timers, enters tournaments and buys cosmetics.
It does not buy stats. Card power comes only from staking the card's own token, and no amount of $MEMPIRE moves a card's level. That line is the whole reason the game's premise holds; a premium currency that bought power would make the wallet-is-your-roster idea decorative.
The token
- Mint: see deployed contracts
- Decimals: 6
- Supply: 1,000,000,000
The pool
A constant-product automated market maker — the same x · y = k curve
Uniswap V2 uses — trading $MEMPIRE against Circle's devnet USDC.
USDC and not SOL, deliberately. A pool priced in SOL prices the game's token against a moving asset; priced in a dollar stablecoin, the number on the screen means what it appears to mean.
amount_in_after_fee = amount_in × (10000 − 30) / 10000
amount_out = reserve_out × in' / (reserve_in + in')
The fee is 0.30%, and it goes to liquidity providers rather than to the
project. Intermediates are computed as u128 so a large trade against a large
reserve cannot overflow before it divides back down.
Invariants the program enforces
These are unit-tested, not asserted in prose:
knever decreases across a swap. The fee is the only thing that grows it.- A swap can never empty the pool. The output is strictly less than the reserve it comes from.
- A round trip always loses. Swap out and back and you end down by the fee and the curve, never up.
- Rounding always favours the pool. Every division floors in the direction that leaves the pool whole, so rounding cannot be farmed.
- The first deposit locks a minimum forever.
MINIMUM_LIQUIDITYof the first LP mint is burned, which is what stops the pool being drained to zero and re-seeded at an attacker's price. - Dust deposits are refused rather than accepted at a nonsense ratio.
Slippage
Every swap carries a minimum-received amount. If the price moves past it before
the transaction lands, the program reverts with SlippageExceeded and nothing
moves. A swap reverting on slippage is the guard working, not a failure.
Price impact is shown before you confirm, and a trade large enough to move the pool says so in plain language rather than in a number nobody reads.
Where to trade it
In the game, the + beside your $MEMPIRE balance opens the pool directly. It is the same program, the same curve and the same guards documented here — not a simplified in-game version of them.
