Risk management
Drawdown limits, desk halts, liquidation, and circuit breakers.
Perp desks use up to 75× leverage on Avantis. Liquidation is expected at scale, not exceptional.
Risk parameters
From config.RISK:
| Parameter | Default | Purpose |
|---|---|---|
maxPositionUsdc | 500 | Cap single deploy size |
minDeployUsdc | 1 | Dust threshold before desk acts |
maxDrawdownPct | 0.40 | Drawdown before reduction |
drawdownReducePct | 0.50 | Fraction to reduce on drawdown |
circuitBreakerPct | 0.50 | Halt threshold |
liquidationWarningPct | 0.15 | Proximity alert band |
earlyTakeProfitPct | 0.30 | Take-profit trigger |
takeProfitReducePct | 0.25 | Reduce size after profit |
reservePct | 0.20 | Keep collateral reserve |
minWalletBalanceEth | 0.05 | Gas safety floor |
Tune via environment variables — see Deployment.
Desk halts
desk-risk and profit checks can halt a token's desk (isTokenDeskHalted). While halted:
desk-managerskips open/increase- Pending perp USDC stays queued
- PUM buyback leg continues (global, not desk-dependent)
PnL availability
Before acting on desk profit:
if (!position.pnlAvailable) {
// price unavailable — not zero profit
}pnlAvailable === false means oracle/data failure, not necessarily flat PnL.
Liquidation scenario
- Adverse move wipes USDC collateral on Avantis
- Desk position closed onchain
- No creator buyback from that collateral
- Future fee claims fund a new desk open (if agent allows)
Fission docs describe the same tradeoff: cumulative buyback pressure may exceed liquidation losses over time — not guaranteed.
Operational risks
| Risk | Mitigation |
|---|---|
| Hot wallet compromise | Minimize balance; monitor Basescan |
| Venice / Pinata / Neynar key leak | Rotate keys; scope to least privilege |
| Extended backend downtime | In-memory state loss; reconcile on boot |
| Smart contract bug | Registry is minimal Ownable — audit gap remains |
Product disclaimer
Match tone from pumperp.com legal section: experimental, unaudited, not financial advice. High leverage can zero desk collateral quickly.
