Three Distinct Constraints
| Constraint | Question answered | Data source |
|---|---|---|
| Risk Curve | How much theoretical net selling is currently permitted? | Fixed-parameter model |
| TWAP + spot | Which price increases are confirmed, and does the current price contract capacity? | V2 cumulative prices and live reserves |
| Borrowable Token / exact output | Can inventory actually be sold for this much BNB? | Engine ledger, Token balance, live Pair |
The amount that can ultimately be opened depends on all three, not on a single market-cap table.
1. Cumulative Prices and TWAP
V2 records cumulative prices in WBNB18 / token18 . Let A(t) be the cumulative value scaled by 2¹¹² , with Δt:
Converting to native18 market cap:
BNB and WBNB both use 18 decimals. Market cap is calculated directly from the accumulated-price calculation and fixed curve supply, with no additional precision conversion. The current group’s curve supply is 10,000,000,000 Token.
2. A Minimum Window Is Not a Fixed Rolling Window
The current BSC economic group uses 300 seconds:
Δt < 300 seconds: Observation updates neither writes observation state nor raises the confirmed ceiling.Δt ≥ 300 seconds: the average covers the entire period.
3. The Confirmed Ceiling Can Only Rise
At initialization, the capacity ceiling starts from fixed M₀ and C(M₀) , rather than zero capacity. No elapsed-time TWAP sample exists yet.
For a mature sample, the candidate market cap is:
The historical ceiling rises only when the candidate exceeds it. Let H be the confirmed market-cap ceiling and the confirmed capacity ceiling:
Ordinary price declines do not reduce these two historically confirmed ceilings. Actual available capacity is still immediately limited by spot.
4. Immediate Spot Constraints
If total net sold across all existing positions is O = totalOpenShortNative:
- Spot falls: capacity for new positions contracts immediately, without waiting for a new TWAP.
- Spot recovers: capacity can recover immediately within the confirmed ceiling.
- Spot reaches a new high: the portion above the confirmed ceiling still requires mature TWAP confirmation.
- Spot falls below
M₀: the model still has anM₀floor; this does not mean that all market risk disappears.
Scenario Example
| Current spot market cap | Effective capacity (approx. BNB) | Remaining capacity (approximately BNB) | Meaning |
|---|---|---|---|
| 25,000 | 39.627904792016544177 | 37.627904792016544177 | Price increase above the previous limit has not yet released capacity |
| 1,000 | 6.003373265906041571 | 4.003373265906041571 | Immediate contraction when spot falls |
| 10,000 | 39.627904792016544177 | 37.627904792016544177 | Recovering within the previous limit |
The table recomputes the current group’s integer implementation; it is not a live quote for an actual market. Pair inventory, global/local pauses, minimum notional, and other checks may further constrain execution.
5. Token Inventory Constraints
The Engine's actual Token balance must also be at least its ledger balance available for lending. Additional Token transfers do not automatically increase L₀; if the balance is insufficient, the Quoter returns an error instead of continuing to show apparently available capacity.
Let T be the Pair's Token18 reserve,R is the WBNB18 reserve, and L the Token18 available for lending. To ensure that V2's exact-output input calculation does not exceed L the maximum net WBNB18 sale proceeds permitted by inventory are:
L = 0 returns zero separately in that case.
BNB and WBNB have equal precision, so previewed risk capacity and inventory capacity are compared directly:
Quoter also reads the current Factory minimum gross notional and the effective Engine pause status. If paused, or if the calculated maximum gross notional is below the current minimum, the executable net sale amount and notional both return zero; raw risk capacity and inventory capacity remain available for diagnostics.
6. A Quote Is Not an Execution Guarantee
- Preview and confirmed state are distinct fields and should be displayed separately.
- Swaps, other users' position openings, tax-Token conversions, or the passage of time may occur after a quote.
- Executable notional is not a complete transaction quote. Current minimum gross notional, pause state, added collateral, and Token borrowing limits still apply. The opening/increase block lock is separate: after exposure increases in N, partial/full closes and single/batch liquidation begin no earlier than N+1. It does not require waiting for this page’s 300-second window.