Funding is the BNB fee paid by a Short position for continuously occupying lending capacity. It is neither perpetual-futures funding transferred between longs and shorts nor borrowing interest calculated from the live Token price. In this version, Short positions pay it into the separate fundingNative revenue ledger.
The mechanism has two layers: Token lending utilization determines the rate; gross BNB notional shares determine each position's payment.
The chart uses current BSC group parameters. A daily-rate curve is not an investment return.
1. Parameters and Units
| Symbol / parameter | Value and unit | Purpose |
|---|---|---|
| 1,997,367,528 Token | Initial lending principal of the current BSC group | |
| Token, 18 decimals | Confirmed unrecovered lending principal | |
| Token, 18 decimals | Total borrowing by all currently active positions | |
bps, 10,000 = 100% | Inventory utilization quantized downward | |
| Start / end | 1,000 / 9,000 bps | 10% / 90% utilization |
| 99,990 ppm / day | Curve increment coefficient | |
| 10 ppm / day | Minimum daily fee rate | |
| Smallest BNB units, 18 decimals | Position shortShares, measured by gross notional | |
| Funding fixed-point index precision |
1,000,000 ppm = 100%; a day is 86,400 seconds. USDC parameters expressed with ether BNB parameters merely use Solidity’s scaling syntax.
2. Utilization and the Quadratic Curve
First exclude confirmed bad debt:
If effective principal is zero, the code directly sets . Donating Token directly to the Engine does not increase and cannot bypass the ledger to reduce utilization.
For , the normalized variable is also rounded down as an integer:
The daily rate is measured in ppm / day:
The current implementation is a quadratic curve with a squared term, not a cubic curve. The daily rate is 0.001% below 10% utilization and reaches 10% / day at 90%. Funding costs rise substantially at high utilization; the minimum rate must not be presented as a fixed charge.
| Utilization | Integer daily rate | Daily percentage | Approximate one-day fee on 1 BNB of shares | |
|---|---|---|---|---|
| ≤10% | Not applicable | 10 ppm | 0.001% | 0.000010 BNB |
| 30% | 2,500 | 6,259 ppm | 0.6259% | 0.006259 BNB |
| 50% | 5,000 | 25,007 ppm | 2.5007% | 0.025007 BNB |
| 70% | 7,500 | 56,254 ppm | 5.6254% | 0.056254 BNB |
| ≥90% | Not applicable | 100,000 ppm | 10% | 0.100000 BNB |
The fees in the table are decimal approximations for readability; actual on-chain amounts also go through the Q128 integer calculations below.
3. Accrual by Second and Allocation by Share
Let seconds have elapsed since the last update, and let the global Funding index be . Each interval with a fixed rate adds:
Position records its last settlement snapshot . Its unpaid amount is:
Both steps round down. Across multiple checkpoints, calculate each separately and then add them; do not automatically replace them with one continuous floating-point formula. Tiny integer rounding differences do not imply that an entire extra fee has been added or omitted.
Why Is Past Funding Not Revalued at the Instantaneous Market Price?
- The daily rate comes from the Token inventory ledger and does not directly depend on the Pair price at that moment.
- Position shares come from gross notional,not borrowed Token quantity × spot price at the checkpoint.
- Opening, increasing, partial closing, and liquidation update the index before changing borrowing, fixing the past interval at its previous utilization.
- Bad-debt recovery is permitted only with no active Token borrowing, preventing the lower utilization after recovery from being applied retroactively to earlier intervals.
Market trades may still change the Token quantities required by future new positions and thus indirectly affect future utilization; not charging at the instantaneous market price does not mean that future fees are entirely unaffected by market activity.
4. How Settlement Deducts Fees
Let current position funds be :
The paid portion moves from marginNative into fundingNative without reducing the historical collateral ledger value collateralNative ; amounts due but unpaid do not become realized protocol revenue merely by being owed.
| Operation | Funding treatment |
|---|---|
| New position | Update the global index; new shares accrue from the current snapshot and are not charged for earlier intervals |
| Increase position | Settle the old interval on old shares first; then add new shares and charge the combined shares thereafter |
| Add collateral | Add funds first, then settle fees on all shares; new funds may cover old unpaid fees |
| Full close | Settle all shares first, then perform the respective safety checks |
| Close partially | Settle only closing shares; remaining shares retain their old snapshot and corresponding historical unpaid fees |
| Liquidate | Settle Funding first; if it cannot be fully paid, enter the dedicated Funding-insolvency branch |
Closing and liquidation are subject to the latest opening/increase block. If that is N, partial/full closes and single/batch liquidation are allowed no earlier than N+1. Collateral additions and partial closes do not reset the lock. This version has no collateral withdrawal for live positions and no cash payout on partial closes.
Except during liquidation, an operation reverts if any Funding required to be settled by that operation remains unpaid. After a partial close, historical Funding on remaining shares may remain pending. Reducing shares through partial closing cannot erase historical Funding.
5. Exact examples using current BSC group parameters
This is an independent Funding example: gross-notional shares are 1 BNB, borrowed Token is 132,259,540.801155254764734088, and effective principal is 1,997,367,528 Token, with no other positions or bad debt.
Quantized utilization is 6.62%, below 10%, so the daily rate is 10 ppm. Shares corresponds to 1 BNB of gross notional. Maintain this utilization for one day and update only once at day-end:
This is 0.000009999999999999 BNB which is 1 wei below the decimal ideal of 0.00001 BNB. In a separate scenario with stable 50% utilization, the exact one-day cost for the same 1 BNB shares is 0.025006999999999999 BNB. These are funding-cost examples, not fixed returns, position-size limits, or rate promises.
Separate Intervals before and after Increasing a Position
If a position holds for two days and then adds , those first two days settle using ; only subsequent time uses . Even if the increase moves the daily rate from a low tier to a high tier, the new rate cannot be applied retroactively to the preceding two days.