Overview
What Motoswap is, the surfaces you can integrate with, and a single-page mental model.
Motoswap is a Uniswap-V2-style AMM plus a set of surrounding modules (farming, staking, Rakeback, token launches, NFT staking) with a public REST API served from a Hono backend. Everything is open to external integrators.
Which contracts are deployed
Deployment status is per contract, and Contract addresses owns the table. In
short, on Ethereum (chain 1):
- Deployed:
MotoToken(MOTO), the launch farming (ended) contract (VampChef, which took Uniswap V2 LP tokens or MOTO on its own and paid MOTO over one 14-day window),UniswapZap,RewardVestingEscrow,MotoStaking,TreasuryVesting, the Motocat collection andMotocatStaking. - Deployed with the DEX:
MotoSwapFactory,MotoSwapRouter02,FeeRouter, pairs,MotoSwapZap,Collector,QuoteAssetRegistry,RakebackV2,MasterChef, the creator fee pair,PveVault,BuybackBurner, and the moto.fun contracts. Read their addresses fromGET /config.
A key that reads 0x0000000000000000000000000000000000000000 from GET /config is unset for the
current phase. Do not integrate against any address /config did not give you, and never send a
transaction to a zero address.
Aggregators
Quote and execute through FeeRouter, with the fee-side rule and the perimeter handled.
Trading bots
The five-step swap loop: discover, quote, submit, confirm.
Scanners and indexers
The event catalog and the attribution traps.
AI agents
REST only: self-describing config, ETag polling.
What you can do
- Trade - quote and execute swaps through
FeeRouter(the fee-enforcing front door) orMotoSwapRouter02(the raw V2 router - gated by a per-caller perimeter, so integrators route throughFeeRouterin practice). - Provide liquidity - call
addLiquidity/removeLiquidityonMotoSwapRouter02, or useMotoSwapZapfor single-sided entry. - Farm - no farm program is running or planned.
VampChef, the launch farming (ended) contract for Uniswap V2 LP or MOTO on its own, ran its one flat 14-day window, and its rewards paid half liquid and half throughRewardVestingEscrowover 180 days.MasterChefis deployed but not running: no emission campaign is running and none is planned. LP already staked in it can be withdrawn at any time. - Stake MOTO - lock MOTO in
MotoStaking(3 / 6 / 12 / 24 months, boost 1× / 2× / 4× / 8×) and collect multi-token revshare fromCollector. The deployed implementation has no reward tokens registered yet; registering them arrives with a contract upgrade, and until then the staking share is held at theCollector(see the MOTO staking guide). - Stake Motocat NFTs - escrow-stake into
MotocatStaking; staked cats receive PvE airdrop credits (claimed fromPveVault, snapshot-sized, no expiry) and boost your swap Points. - Launch tokens - on moto.fun.
- Claim Rakeback - 2/7 of each protocol fee goes to Rakeback, paid weekly (epochs roll Sunday) against an on-chain merkle root. The 50/25/25 vest is baked into the leaf. Unclaimed Rakeback expires after 30 days and is swept to the treasury.
- Read state - every pool / token / farm / vault / user metric is served
from the REST API (
https://api.motoswap.org) with ETag caching. Chain state is also readable directly via RPC.
The mental model
┌──────────────────────────────────────────────────────────┐
│ User's wallet │
└───────────┬──────────────────────────────┬───────────────┘
│ │
writes: swap, LP, stake, claim… reads: prices, TVL, positions, points
│ │
▼ ▼
┌───────────────────────┐ ┌────────────────────────┐
│ FeeRouter (front door)│ │ Backend REST API │
│ ├── protocol fee │ │ api.motoswap.org │
│ └── router.swap … │◀──────▶│ /config /chain/head │
└────────┬──────────────┘ │ /tokens /dex /farms │
│ │ /portfolio /rakeback… │
│ └──────────┬─────────────┘
▼ │
┌───────────────────────┐ │
│ Motoswap V2 core │ emits events │
│ Factory · Pair · Rtr │─────────────────▶ │
└──────────┬────────────┘ │
│ split fees │
▼ │
┌───────────────────────┐ │
│ Collector │─────┐ │
└─┬────┬────┬────┬─────┘ │ │
▼ ▼ ▼ ▼ │ │
Stake Treas Rake Buy │ the indexer streams events into
-ing -ury -back back │ Postgres + RisingWave; the API
│ reads from those.
┌──────────────────────────────────────────────────────────┐
│ MasterChef / MotoStaking / etc. │
│ (independent modules) │
└──────────────────────────────────────────────────────────┘Every meaningful state change happens on-chain, is picked up by the indexer, and is queryable via REST within seconds. There is no off-chain state you can't reconstruct from the chain.
The three surfaces
1. Smart contracts (write path)
Solidity contracts on Ethereum (see addresses). Call them
directly with viem / ethers.
Most-used entrypoints:
| Contract | What it does |
|---|---|
FeeRouter | User-facing swap entrypoint. Charges the 0.70% protocol fee on the quote leg, then routes through MotoSwapRouter02. |
MotoSwapRouter02 | Uniswap-V2-shaped router (liquidity add/remove; swap variants are perimeter-gated). |
MotoSwapPair | Per-pair AMM. Emits Swap/Mint/Burn/Sync. |
MotoSwapZap | Single-sided LP entry. Optionally stake into a farm in one call. |
VampChef | The launch farming (ended) contract. Uniswap V2 LP (or MOTO on its own, in pool 1) in, MOTO out, one flat 14-day emission window (DURATION()), no withdraw cooldown. |
MasterChef | Motoswap LP farm contract. Deployed; no emission campaign is running and none is planned. |
MotoStaking | MOTO lock/boost + multi-token revshare from Collector, once a contract upgrade registers the reward tokens on the deployed implementation. |
MotocatStaking | Motocat NFT escrow with per-block checkpoints; PvE airdrops pay from PveVault against its snapshots. |
RakebackV2 | Merkle-proof claim of accrued Rakeback, one root per weekly epoch. |
Every contract's full ABI, functions, events, errors and access controls
are in reference/contracts-full-inventory.
2. REST API (read path)
Every list, chart, price, per-user metric and derived stat is served from the backend. Base URL:
https://api.motoswap.orgHighlights:
| Endpoint | Purpose |
|---|---|
GET /config | Every contract address (0x0 when unset for the phase), chainId and launchPhase. |
GET /chain/head | Current indexer tip (block # + timestamp). |
GET /tokens | Token directory (address, symbol, name, decimals). |
GET /token/{addr}/price | One token's USD price. |
GET /tokens/{addr}/chart | Price candles + volume window. Empty for a token with no Motoswap trading history. |
GET /dex/pools | Cursor-paginated pool list, TVL-sorted. |
GET /explore/tokens | Cursor-paginated token discovery. |
GET /farms | All farm pools (unpaginated - bounded set). |
GET /holdings/tokens | User-agnostic token universe + prices. |
GET /{addr}/meta | Per-user activity watermark (lastActivityBlock). |
GET /portfolio/{addr}/lp-fees | LP fees earned, one row per pair. |
GET /rakeback/{addr} | Accrued Rakeback (per epoch), with claim proofs. Empty for every wallet until the first weekly root is posted, and after that for a wallet that paid no protocol fee. |
GET /rakeback/{addr}/proof | Merkle proofs for every published leaf. |
GET /points/{addr} | Per-user points + rank. |
GET /swap/candidates | Candidate pool set for a token→token route. |
Full endpoint reference: reference/api-full-inventory.
Cached GETs carry Cache-Control and a weak ETag: send the tag back in If-None-Match and
expect 304. Two exceptions: /config carries Cache-Control but no ETag, and /health/live
and /version are private, no-store. See caching.
3. TypeScript SDK
The Motoswap TypeScript SDK - pure functions used by the frontend and backend. It has no network I/O; feed it live reserves from your own RPC / API reads and it returns the same math the app uses. The package is not published yet, so the quickstart examples do not depend on it.
Highlights:
bestRoute(tokenIn, tokenOut, pairs, amountIn, maxHops)- the canonical multi-hop router.optimalSwapInput- closed-form zap math.priceImpactBps- sandwich-safe price-impact bps.amountOutMin,amountInMax,submitAmountOutMin- slippage helpers.computeMasterChefPoolAPR,computeVaultAPR- APR math.
Full SDK reference: reference/sdk-full-inventory.
Fee model
These are the values the contracts launched with. Several are owner-settable, so read the live
ones from the contracts rather than trusting this page. On a FeeRouter trade:
- LP fee: 0.30% - kept by liquidity providers (V2 pair invariant fee).
- Protocol fee: 0.70% - charged by
FeeRouteron the quote leg only (WETH > USDT > USDC > MOTO). Forwarded toCollector, which splits it by weight into four buckets:- 2 / 7 → MotoStaking (revshare to locked MOTO stakers).
- 2 / 7 → Treasury.
- 2 / 7 → Rakeback (paid to the trader by merkle claim, 50/25/25 vest).
- 1 / 7 → buyback and burn.
- Creator fee: 0% to 0.50% (contract cap) - optional per-registered-token; same quote leg. Motoswap sets it to
0.30%; the range here isMAX_CREATOR_FEE_BPS, the registry's hard ceiling.
Total: 1.00% on a one-hop route with no registered moto.fun token: the 0.30% pair fee plus the 0.70% protocol fee. The pair fee is paid per hop and the protocol fee once per trade. Each path endpoint that is a registered moto.fun token adds the creator fee (0.30%), so a route between two registered tokens pays it twice. The trader gets ~0.20% back via Rakeback. The fee table on the aggregators page has every combination.
Full fee constants: reference/addresses-config-events.
Gas
This page carries no gas figures. Estimate gas per call against the deployed contracts
(eth_estimateGas, or viem's estimateContractGas) rather than budgeting from a published number.
Where to go next
- Building an aggregator, bot, scanner, or AI agent? → pick your path.
- New here? →
quickstart. - Need to call a specific contract? →
reference/contracts-full-inventory. - Building a UI on top of Motoswap data? →
reference/api-full-inventory. - Doing swap math? →
reference/sdk-full-inventory. - Watching events? →
guides/watch-events.