Twilight
Search…
Hourly Funding Rate
Funding rate incentivizes arbitragers to open orders on the opposite side of the skew in order to take advantage of the funding rate.
Since the system is stateless and paying continuous funding is not an option, funding is charged every hour instead of every 8 hours. Calculated funding rate is further divided by 8 to normalize the payments to hourly funding.
The funding payment is settled directly with the Twilight Pool. For example, if longs pay shorts, longs pay to the twilight pool and shorts get paid by the twilight pool.
There's no future price in the system that needs to converge to the index. Therefore, we use a funding rate mechanism similar to Futureswap, where the skew in orderbook determines the funding. However, instead of skew being relative to the total locked value in the pool in case of futureswap, we determine the skew relative to the open interest.
funding=(totalLongPositionstotalShortPositionsallPositionSizes)218ψfunding={(\frac{totalLongPositions-totalShortPositions}{allPositionSizes})^2}*\frac{1}{8 *\psi}
where:
  • totalLongPositions=longPositionSizeitotalLongPositions=\sum longPositionSize_i
  • totalShortPositions=shortPositionSizeitotalShortPositions=\sum shortPositionSize_i
  • allPositionSizes=totalLongPositions+totalShortPositionsallPositionSizes=totalLongPositions+totalShortPositions
  • ψ\psi
    is a variable divisor that can be adjusted for desired output.
The result above is always positive. To determine whether the funding is positive or negative, there's a logical check s.t.:
  • If
    totalLongPositions>totalShortPositionstotalLongPositions>totalShortPositions
    funding is positive
  • If
    totalLongPositions<totalShortPositionstotalLongPositions<totalShortPositions
    funding is negative
Funding is charged on the notional value of the positionSize:
positionValue=positionSize(1currentPrice)positionValue=positionSize*(\frac{1}{currentPrice})
Last modified 1yr ago
Copy link