shadowpaperDocsTrade ↗
Open AppTrade ↗
Martingaler LP

Martingaler LP

The LP needs no upfront capital: winners are paid immediately when cash is available and otherwise wait in a first-in, first-out queue funded by later losses.

Background#

On-chain trading games have traditionally required a pre-funded liquidity pool. This depends either on a trusted capital provider or on token incentives to attract liquidity providers, and the pool can be drained by a run of large winners.

shadowpaper's LP follows the Martingaler mechanism: it operates with no upfront LP capital and no bet-size limit beyond the per-position limits.

Queue instead of instant solvency#

The protocol does not promise to pay every winner instantly. Winners are paid immediately while LP cash is available; otherwise the unpaid profit enters a first-in, first-out payout queue and is paid in order as losses arrive. The protocol may be insolvent on aggregate for a period, but no winner is skipped and margin is always returned at close.

Example#

The LP holds 30 USDT of free cash and the queue is empty. Alice closes a winning position with a net profit of 86.38 USDT. Bob later realises a 60 USDT loss.

EventRuleResult
Alice closes, profit 86.38 USDTPay from free LP cash; remainder is queued30 USDT paid, 56.38 USDT queued; 100 USDT margin returned
Bob loses 60 USDTQueue active: loss is earmarked for the queue, no LP-side fee60 USDT available to the queue
Queue payoutPay from the front of the queueAlice receives 56.38 USDT; 3.62 USDT remains in the LP
paid now   = min(86.38, 30)   = 30.00
queued     = 86.38 − 30       = 56.38
after Bob  = 60 − 56.38       = 3.62  → LP

← Scroll sideways for long formulas

Alice's profit was delayed until Bob's loss arrived, but it was paid in full and her margin was never at risk.

Role of SPAPER emissions#

Traders who lose receive SPAPER, which earns protocol fees and LP surplus when staked. This makes losing traders the economic owners of the LP, rewards the activity that refills the queue, and replaces outside LP capital with a claim on the protocol's own revenue.

Implications for traders#

  • Wins are paid in full but may be delayed.
  • LP surplus is distributed to SPAPER stakers, not to outside depositors; no one can deposit into the LP.
  • The larger the LP grows, the more often wins are paid immediately.

See LP & payout queue and Payout & queue for the full rules.