Surplus & Free Streams
TL;DR
Surplus = the extra value a trader gets when our solver beats their minOut (and/or captures MEV that would’ve hurt them).
We split surplus automatically into three free streams—no staking or farming required to earn the first one:
Trader Rebate (instant) — cashback to the trader
LP Flow Earnings — a stream to LPs of the pools actually used
Locker Stream — a stream to stXPGN / veFlow lockers
These streams are independent of emissions and run every time orders settle through Paragon Flow (intents + batch auctions).
What is “Surplus”?
When a user signs an intent, they provide minOut
(their worst acceptable price).
Our solver batch-routes orders across Paragon and external venues, then returns a settlement that often achieves actualOut > minOut
and/or avoids MEV loss.
We define Surplus as:
Surplus=(actualOut−minOut)×markPrice+MEV_saved_value\textbf{Surplus} = (\text{actualOut} - \text{minOut}) \times \text{markPrice} \quad + \quad \text{MEV\_saved\_value}Surplus=(actualOut−minOut)×markPrice+MEV_saved_value
Price Improvement: better pathing than a naïve router (multi-hop, crossing orders, netting flows).
MEV Saved: batch auctions reduce sandwich/front-run leakage; the solver also backruns its own flow to bring value back on-chain.
Gas-normalized: the system accounts for gas costs used to secure/execute the settlement.
If Surplus ≤ 0, there’s no stream (the trade still executes if it meets minOut
).
Default Split (governance-tunable)
After a tiny protocol take (e.g., 5%), the net surplus is split:
60% — Trader Rebate (instant)
30% — LP Flow Earnings (claimable by LPs of the used hops, pro-rata)
10% — Locker Stream (periodic drip to stXPGN / veFlow voters)
The exact percentages are parameters the DAO can update. The aim is to reward the maker side (LPs) and align lockers with order-flow quality—without taxing traders.
The Three Free Streams
1) Trader Rebate (Instant Cashback)
Credited at settlement into a TraderRebateVault.
One-click claim in the swap UI, or auto-compound (optional):
Auto-stake to stXPGN for compounding governance yield, or
Leave as XPGN to keep liquidity.
Traders see “You saved X — claim now” after each swap.
Why it matters: visible, immediate value → stickier order-flow and a real “best execution” narrative.
2) LP Flow Earnings (Utilization-Based)
Credited to an LPRebateVault by pool and block for the pools used in the winning path.
LPs claim pro-rata by liquidity actually touched (based on pool snapshots around the settlement block), not just by TVL.
Combines naturally with fees and farm APR—it’s a third rail of earnings that rewards utilized liquidity.
Why it matters: emissions and fees alone don’t capture execution quality; flow earnings do, and they’re non-dilutive.
3) Locker Stream (stXPGN / veFlow)
A portion of surplus continuously accrues to lockers.
veFlow votes can direct the weight of which routes/pairs share more of the locker stream (bribes are possible in the Order-Flow Market).
Claimable in XPGN; auto-stake to stXPGN toggle recommended.
Why it matters: lockers earn from execution quality & demand, not only emissions. It’s a durable yield source as volumes grow.
Example (Walk-through)
User signs intent: sell 10,000 USDT for XPGN with
minOut = 8,900 XPGN
.Solver batches & settles at
actualOut = 9,000 XPGN
(price improvement = 100 XPGN).MEV saved worth $20. Mark XPGN ≈ $1 for simplicity.
Gross surplus ≈ $100 + $20 = $120.
Protocol fee 5% → $6. Net surplus = $114.
Split:
Trader (60%) → $68.40 instant rebate
LPs used (30%) → $34.20 to LPRebateVault (claimable by LPs of those hops)
Lockers (10%) → $11.40 to stXPGN/veFlow stream
UI & UX
Swap Preview: “Expected savings: ~0.28% → you keep ~60% instantly.”
Post-Trade Banner: “You saved $68.40. Claim or auto-stake to stXPGN.”
LP Dashboard: new Flow Earnings row (separate from fees & farm APR).
Lockers Page: Surplus Stream APR module + epoch claim.
Dev Notes (Integrators)
Events
SurplusCaptured(tradeId, gross, protocolCut, traderCut, lpCut, lockerCut)
LPFlowAccrued(pool, tradeId, amount)
TraderRebateCredited(user, tradeId, amount)
LockerStreamAccrued(epochId, amount)
Vaults
TraderRebateVault
: instant balances + gasless permit/claim.LPRebateVault
: pool-keyed accrual; snapshoted distribution to LP token holders at settlement block.LockerVault
: epoch-based distribution to veFlow/stXPGN lockers.
Math
Computation done in FlowSettlement with on-chain checks for
minOut
, signature validity, and solver bounds.Pricing uses TWAP/oracle guards (see Pricing & Oracles) to prevent wash surplus.
Negative surplus → no stream; trade executes if
minOut
met.
Governance Switches
Percentages (trader / LP / locker)
Protocol fee on surplus
Eligible venues (which pools/DEXs can be used)
Minimum per-trade surplus to stream (dust filter)
Epoch length for lockers, snapshot lookback windows for LPs
Auto-stake defaults (opt-in/out)
Limits & Safety
Surplus spoofing protection:
Oracle/TWAP bound checks; reject pathological routes.
Batch auction netting must improve aggregate value.
Paused mode: streams can pause without disabling basic swaps.
Cap per trade/epoch: configurable to avoid pathological distributions.
Testnet (Next 3–4 Weeks)
Enabled: full Trader Rebate flow with live claims and swap banner.
Enabled: LP Flow Earnings accrual + per-pool claim page (simple snapshot model).
Enabled: Locker Stream accrual to stXPGN; weekly epoch claims.
Observability: Surplus events shown in “BestEx Leaderboard” + per-pool analytics.
Why “Free Streams”?
Because they’re earned by activity, not by emissions dilution:
Traders earn for showing up (best execution).
LPs earn for being used, not just being parked.
Lockers earn from demand/quality, not just inflation.
This converts execution excellence into a perpetual, sustainable yield engine for the entire ecosystem.
Last updated