BigShort Docs

Funding

A quadratic daily Funding curve based on lending utilization, gross-notional accrual, and Q128 time accumulation, with exact rounding examples.

Funding is the USDC 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 USDC notional shares determine each position's payment.

Quadratic relationship between lending utilization and the daily Funding rate

The chart uses FULL parameters. The daily-rate curve is not an investment return.

1. Parameters and Units

Symbol / parameterValue and unitPurpose
L0199,861,071 TokenFULL initial lending principal
LbadToken, 18 decimalsConfirmed unrecovered lending principal
BtotalToken, 18 decimalsTotal borrowing by all currently active positions
Ubps, 10,000 = 100%Inventory utilization quantized downward
Start / end1,000 / 9,000 bps10% / 90% utilization
A99,990 ppm / dayCurve increment coefficient
b10 ppm / dayMinimum daily fee rate
HiSmallest USDC units, 18 decimalsPosition shortShares, measured by gross notional
Q2128Funding fixed-point index precision

1,000,000 ppm = 100%; a day is 86,400 seconds. USDC parameters expressed with ether simply use Solidity's 1018 scaling syntax.

2. Utilization and the Quadratic Curve

First exclude confirmed bad debt:

Leffective=L0−LbadU=⌊Btotal⋅10,000Leffective⌋

If effective principal is zero, the code directly sets U=10,000. Donating Token directly to the Engine does not increase L0 and cannot bypass the ledger to reduce utilization.

For 1,000<U<9,000 , the normalized variable is also rounded down as an integer:

x=⌊(U−1,000)⋅10,0008,000⌋

The daily rate rd is measured in ppm / day:

rd(U)={10,U≤1,00010+⌊99,990⋅x210,0002⌋,1,000<U<9,000100,000,U≥9,000

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.

UtilizationxInteger daily rateDaily percentageApproximate one-day fee on 1,000 USDC of shares
≤10%Not applicable10 ppm0.001%0.010 USDC
30%2,5006,259 ppm0.6259%6.259 USDC
50%5,00025,007 ppm2.5007%25.007 USDC
70%7,50056,254 ppm5.6254%56.254 USDC
≥90%Not applicable100,000 ppm10%100.000 USDC

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 Δt seconds have elapsed since the last update, and let the global Funding index be I. Each interval with a fixed rate adds:

ΔI=⌊rd⋅Δt⋅Q1,000,000⋅86,400⌋Inew=Iold+ΔI

Position i records its last settlement snapshot Ii. Its unpaid amount is:

Fi=⌊Hi⋅(I−Ii)Q⌋

Both steps round down. Across multiple checkpoints, calculate each ΔI 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 M:

Fpaid=min(Fi,M),Funpaid=Fi−Fpaid

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.

OperationFunding treatment
New positionUpdate the global index; new shares accrue from the current snapshot and are not charged for earlier intervals
Increase positionSettle the old interval on old shares first; then add new shares and charge the combined shares thereafter
Add collateralAdd funds first, then settle fees on all shares; new funds may cover old unpaid fees
Full closeSettle all shares first, then perform the respective safety checks
Close partiallySettle only closing shares; remaining shares retain their old snapshot and corresponding historical unpaid fees
LiquidateSettle Funding first; if it cannot be fully paid, enter the dedicated Funding-insolvency branch

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 FULL-Parameter Example

Continue the Short opening example: 18,390,419.136168399731870069 Token borrowed, effective principal of 199,861,071 Token, with no other positions or bad debt.

U=⌊18,390,419.136168399731870069⋅10,000199,861,071⌋=920

Utilization quantized into bps is 9.20%, below 10%, so rd=10. Position Funding shares are H=1,000×1018. Keep that utilization for one day, with only one update at the end:

ΔI=⌊10⋅21281,000,000⌋F=⌊1,000×1018⋅ΔI2128⌋=9,999,999,999,999,999

This is 0.009999999999999999 USDC, one smallest 18-decimal unit below the ideal decimal value 0.01 USDC , because the index and final multiplication each round down.

If other positions instead keep utilization at 50%, the exact one-day fee for the same 1,000 USDC gross-notional shares is 25.006999999999999999 USDC. This is a scenario on the same FULL curve, not test parameters with reduced initial inventory.

Separate Intervals before and after Increasing a Position

If a position holds H1 for two days and then adds ΔH, those first two days settle using H1 ; only subsequent time uses H1+ΔH. 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.

Position operation limits

Only collateral additions are supported; no separate withdrawal entry point exists for live positions. Partial closes also return no funds to the wallet.

If the latest successful opening or position increase occurs in block N, a partial or full close is possible no earlier than block N+1 and must still pass all other execution checks.

BigShort Protocol · ARCIssue · Trade · Short