How Tessel works
Pools, fees, tools and contracts, in short.
Bin pools
Liquidity in price bins. No slippage inside a bin.
Each bin holds one price. Inside a bin a swap trades at exactly that price, so there is no slippage until the bin runs out and the swap moves to the next one. Only the active bin holds both tokens: bins above it hold the X token, bins below hold the Y token.
You choose which bins to fill and how much goes in each: spot, curve or bid-ask shape.
- Deposit into a bin
- Proportional to what the bin already holds, so a deposit can never be used as a free swap.
- First deposit in a bin
- 1,000 shares are locked forever, so a bin can never be emptied to a broken share price.
- Withdraw
- Any time, any bins, in any share amount.
Limit orders
One bin on one side of the price fills like an order.
- 1Put one token in a single bin away from the active bin.
- 2When the price crosses that bin, swaps convert it fully into the other token at the bin's price.
- 3Withdraw the bin to take the filled side. Before it fills, withdrawing it cancels the order.
Range pools
One fixed range for everyone. LP shares are ERC-20 tokens.
One fixed price range for the whole pool, with concentrated-liquidity math. Every LP holds the same range, so a position is a plain ERC-20 share of the pool. Good for new tokens that need one simple market.
A launch fee starts high when the first liquidity arrives and falls in a straight line to the base fee. Early buyers who rush in pay more, and that fee goes to the LPs.
Fees
Bin fees follow the market. Range fees start high and settle.
The base comes from the bin step. The variable part grows with the number of bins the price crossed recently and decays when the market is quiet, so LPs earn more when prices move fast. Range pools use the launch fee, then the base fee.
- Bin pool fee cap
- 10% per swap (contract constant).
- Range launch fee cap
- 10% at launch (contract constant).
- Protocol share
- A set part of each fee goes to the protocol fee recipient; the rest stays with LPs. Capped at 50% in the contracts.
- Fee now
- Each pool page shows its current fee read from the chain.
Router
One swap across bin and range pools, checked after the last hop.
- Routes
- Found off chain: direct and two-hop, best output first.
- Pools it calls
- Only pools registered in the hub.
- Your minimum
- Checked after the last hop; the swap reverts below it.
- Balances
- The router never keeps tokens between transactions.
LP Agents
An agent manages your position inside limits the contract enforces.
A charter lets an agent key manage one of your positions within limits you set. Each charter has its own vault, and every token that leaves it goes to you.
- Actions
- Rebalance (bin pools), collect fees and move range (range pools), close (both). You pick which.
- Move range
- Near either end of the range, the agent can move the whole position to another range pool of the same two tokens. Both pools must be priced within about 1% of each other; fees earned and anything the new pool does not take go to you.
- Daily cap
- Per token, per UTC day, counted on what leaves the bins.
- Band
- Rebalances may only place liquidity inside the bin range you set.
- Expiry and revoke
- The charter stops at expiry; revoke takes effect in the same block.
- You
- Can always withdraw everything, with no cap and no band.
Locks and vesting
Lock a position as an NFT, with a hard date or vesting.
A lock puts a position in its own vault and gives you an NFT for it. Whoever holds the NFT owns the position. The liquidity opens on the unlock date.
- Hard lock
- Start and end on the same date: nothing leaves before it, everything after it.
- Vesting
- Between start and end, the unlocked part grows in a straight line, by time.
- Extend
- You can move the end date later, never earlier.
- Fees
- Range pool fees can be collected at any time; they are never locked. Bin pool fees stay in the bins and unlock with them.
- Transfer
- Selling or sending the NFT moves the whole position and its schedule.
Credit
Borrow USDG against range LP, or lend USDG and earn the fees.
Borrow USDG against range pool LP for a fixed term, or lend USDG and earn the borrowing fees. Collateral is valued at an oracle price inside the pool's range, so moving the pool price does not change what a loan is worth.
- Terms
- 7, 14, 30 or 90 days. The fee is fixed when you borrow and rounded up.
- Limits
- Each market has its own loan-to-value and liquidation level, shown on the Credit page.
- While borrowed
- Your LP keeps earning; you can collect its fees, and anyone may add collateral or repay for you. Repaying returns the LP to you.
- Liquidation
- When health drops below the market's level, or one day after the due date, anyone can buy the LP at the oracle value less a set discount (at most 5%). What is left after the debt is yours to claim.
- Lenders
- Withdraw idle USDG at any time. The reserve covers bad debt first.
Private withdraw
Deposit a fixed amount, withdraw to any address with a ZK proof.
Deposit a fixed amount of USDG and get a secret note. Later, the note withdraws the same amount to any address, and a zero-knowledge proof made in your browser shows the chain that the note is valid without showing which deposit it came from.
- Amounts
- Each pool takes one amount only, so all deposits in it look the same.
- Proofs
- PLONK over the public Perpetual Powers of Tau, so there is no circuit-specific setup. Notes sit in a Poseidon Merkle tree of depth 16.
- Relayer
- A new address with no ETH can withdraw through the relayer, which pays the gas for a 0.5% fee taken from the amount. The proof fixes the recipient and fee, so the relayer cannot change them.
Data for bots (x402)
Pool data and quotes over HTTP 402, paid per request in USDG.
Your bot signs a USDG transfer authorization (EIP-3009); the server sends it on chain and returns the data only after it settles. USDG goes straight from your wallet to the fee recipient. A signed payment is charged once at most.
| Endpoint | Price | Returns |
|---|---|---|
| GET /api/x402 | Free | Discovery: asset, payee, prices |
| GET /api/x402/pools | 0.002 USDG | Every Tessel pool: tokens, kind, price, fee now, and for bin pools the bins around the active bin |
| GET /api/x402/quote tokenIn, tokenOut (addresses), amountIn (atomic units) | 0.005 USDG | Exact-input quotes for every direct and two-hop route, best first, with the hops to pass to TesselRouter |
- Headers
- x402 v2 (PAYMENT-SIGNATURE) or v1 (X-PAYMENT); scheme "exact".
- Nothing charged when
- Parameters are wrong, the chain cannot be read, or the payment is invalid.
With the SDK, a bot pays in a few lines. It never signs above your price limit and checks its balance first.
npm install tessel-sdk ethers
import { Wallet } from "ethers";
import { X402Payer } from "tessel-sdk/payer";
import { createProvider } from "tessel-sdk/relayer";
const provider = createProvider(RPC_URL, CHAIN_ID);
const payer = new X402Payer({
signer: new Wallet(PAYER_KEY, provider),
provider,
chainId: CHAIN_ID,
usdg: USDG_ADDRESS, // "asset" from GET /api/x402
maxPrice: 10_000n, // 0.01 USDG per request at most
});
const quote = await payer.pay(`${API}/api/x402/quote?tokenIn=…&tokenOut=…&amountIn=…`);
const { data, payment } = await quote.response.json();Contracts
Pools are not upgradeable. Every address is listed below.
- Pools
- Not upgradeable. No proxy, no pause, no admin withdraw.
- This site
- Never holds your funds. Every action is a transaction you sign in your own wallet.
- Source
- Verified on Sourcify; open any address below on the explorer.
- CoreTesselHub
Pool factory and registry. Sets fee presets; cannot move or pause pools.
0xd54a1c…7d09F0 - RoutingTesselRouter
Exact-input swaps across bin and range pools in one transaction.
0x540296…fCa1e0 - LP AgentsTesselCharters
Charters for LP agents. Funds leave a charter only to its owner.
0x686363…73c7Ba - LocksTesselPositions
Position NFTs with lock and vesting. One vault per NFT.
0xDF7d8c…3B0814 - CreditTesselCredit
USDG loans against range LP, valued at an oracle price.
0x87cc18…E08c0E - CreditPrice feed · WETH
The WETH/USD price the credit market reads.
0xDAc15C…A9A05c - PrivatePrivate pool · 10 USDG
Fixed-amount deposits, withdrawn with a ZK proof.
0x8d7e78…33099d - PrivatePrivate pool · 100 USDG
Fixed-amount deposits, withdrawn with a ZK proof.
0x3c852f…bbFFa1 - PrivatePrivate pool · 1000 USDG
Fixed-amount deposits, withdrawn with a ZK proof.
0xFBEdcD…7F1EE7 - PoolsBin pool · WETH/USDG
25 bps bins, dynamic fee.
0x35032B…a47279 - PoolsRange pool · TSLA/USDG
One range, launch fee decay.
0xe6dF0c…5Ad6D9 - PoolsRange pool · WETH/USDG
One range ±10%, launch fee decay.
0x5d0b5a…27C163