Docs navigation

Liquidity & bias

Liquidity providers (LPs) seed the pool, earn 25 bps of every trade, and absorb directional risk.

What an LP does

You deposit SOL into the market's pool. In return, the program mints LP shares that represent your fractional ownership of the pool. The pool stores RUG and RUN reserves; trading rebalances them but never removes your share.

First LP and the bias slider

The very first add_liquidity call on a market sets the pool's starting odds via a bias slider that ranges from 5% to 95% RUG odds. So if you think a token is more likely to rug, you can seed at, say, 70% RUG / 30% RUN, and the pool starts there.

Subsequent LPs cannot rebias the pool — they must add at the current ratio (bias_bps = 0).

Why bias matters for your payout

Setting a non-50/50 bias is an implicit directional bet. If the market resolves with your bias, your LP payout is more than what you put in. If it resolves against your bias, you take a loss — sometimes meaningful.

Concretely: at resolution, the LP payout formula is lp_share × (vault − winning_traders_total) / lp_supply. The winning_traders_total is the SOL owed to winning-side traders at 1:1. If your bias was wrong, that bucket is large, and what's left for LPs is smaller.

Warning

Bias is not a neutral choice. If you don't have a strong directional view, default to 50/50.

Adding liquidity later

After the first LP has seeded, any subsequent add_liquidity must pass bias_bps = 0 — the program rejects anything else. You add at the current pool ratio and receive LP shares proportional to your contribution.

Removing liquidity

Calling remove_liquidity burns your LP shares. On v3 markets, you receive RUG + RUN tokens (not raw SOL). To convert those to SOL you can either sell them on the pool or — after resolution — redeem the winning side 1:1.

LP-lock window

In the last 5 minutes before resolution, remove_liquidity is disabled. This prevents LPs from withdrawing on insider knowledge of the imminent oracle price. Trading itself stays open.

LP redeem after resolution

After the market resolves, call redeem_lp to receive your share of leftover SOL:

sol_out = lp_share × (vault − winning_traders_total) / lp_supply

Multiply before divide. Order matters for u64 precision.

rug/run · solana devnet · 0% platform rake · $ROR on bags