DECANT
How it worksNetworkDocsFAQ
Base · TestnetTrade ↗Reserve spot

Documentation

Decant · perpetual futures on Base

Decant is a permissionless perpetual-futures protocol on Base. Anyone can launch a leveraged market for any token, and anyone can trade it — fully on-chain, with no order book and no listing gatekeeper. This page explains how the protocol works and how to use the testnet app at /trade.

Status: live on Base Sepolia (testnet). Tokens have no monetary value and the contracts are not audited. See the risk disclaimer.

1. The vAMM

Each market prices trades against a virtual AMM (vAMM) using a constant-product curve x · y = k. The reserves are virtual — no liquidity providers are required — so a market has instant liquidity from the moment it is created. Buying (long) pushes the mark price up along the curve; selling (short) pushes it down. The size of the move depends on trade size relative to the virtual reserves (price impact).

  • Mark price— the vAMM's internal price, used for PnL and liquidation.
  • Index price — the external oracle price of the underlying asset (see below).

2. Oracles

Markets are anchored to an external price via one of two oracle kinds:

  • Pyth — used for curated assets that have a Pyth feed (ETH, BTC, SOL, …). Low-latency, widely used price feeds.
  • Uniswap V3 TWAP— a time-weighted average price from a DEX pool, used as a fallback for long-tail tokens that have no Pyth feed. This is what makes "any token" markets possible.

3. Leverage & margin

Collateral is deposited per market and positions use isolated margin — risk in one market never touches another. Notional exposure is margin × leverage. The current testnet markets allow up to 50× leverage (configurable per market).

Opening a position charges a trading fee on the notional. Because the vAMM has finite virtual liquidity, large positions at high leverage incur meaningful price impact — size sensibly.

4. Funding

A periodic funding payment ties the mark price to the index. When mark trades above index, longs pay shorts; when it trades below, shorts pay longs. This incentivises arbitrage that pulls the mark back toward the oracle price over time.

5. Liquidation & insurance fund

Every position must keep its margin ratio above the maintenance threshold. If it falls below, anyone (typically a keeper bot) can call liquidate() and earn a liquidation fee. Each market has its own insurance fund, funded by trading fees, which absorbs bad debt when an underwater position cannot fully cover its losses. Risk is isolated per market.

6. Permissionless market factory

The MarketFactory lets anyone deploy a new market:

  • createPythMarket(priceId, baseReserve, quoteReserve) — for an asset with a Pyth feed.
  • createTwapMarket(pool, baseToken, twapWindow, baseReserve, quoteReserve) — for any token with a Uniswap V3 pool.

The creator chooses the oracle and initial reserves, but the factory locks collateral, risk parameters and ownership to the protocol governor — so a market creator cannot rug traders by changing the rules after launch.

7. Using the testnet app

  1. Open /trade and connect a wallet on Base Sepolia (the app prompts you to switch networks if needed).
  2. Click Faucet to mint test USDC (tUSDC), then Approve and Deposit collateral into a market.
  3. Pick Long or Short, set your margin and leverage, and open the position.
  4. Close the position any time, then Withdraw free collateral back to your wallet.

Need testnet ETH for gas? Use a Base Sepolia faucet such as the Coinbase faucet.

8. Contracts (Base Sepolia)

All state is on-chain and verifiable on BaseScan:

Market factory0xFdcaF774A34E6a457A43402762727432884e1403
Test USDC (tUSDC)0xD556750FCeD5C6BfB867fb3cDc4F0F709c23adEf
ETH / USD market0xB92951edfeC55296D593be9EA3858337cBc199cc
BTC / USD market0x1D482BcEfe1a4ECBa59662b76D1265DfCa2A94b1
SOL / USD market0xFb9a9df405Ffd8BAa9dAd9CC02946CDEFb2e34a7

9. FAQ

Is this real money?

No. Decant currently runs on Base Sepolia testnet. tUSDC and all positions have no monetary value.

Do I need anyone's permission to launch a market?

No — that is the point. Any token with a Pyth feed or a Uniswap V3 pool can have a market deployed via the factory.

How is the price kept honest?

Marks are derived on-chain from the vAMM, anchored to an oracle (Pyth or a Uniswap V3 TWAP), with funding payments pulling the mark toward the index over time.

Open the appRisk← Back home
DECANT
perpetual futures on Base
XGitHubDocsRoadmapTermsPrivacyRisk
testnet · pre-audit · not real money
Built by @avantisfi© 2026 Decant. Not financial advice.