ElyPerpsDOCSOpen app

Funding

The rate

Funding settles every block. The rate is set by the skew: the heavy side pays, and the rate is the skew divided by the skew scale times the cap, at most 0.1% per hour, about 0.0000028% per block at 100 ms.

Rate: +0.0000006% per block (0.0200% per hour), longs pay shorts. 90% to the receiving side, 10% to the pool's LPs.

10% to LPs

Of everything the paying side pays, 90% goes to the receiving side and 10% accrues for the pool's LPs. Anyone calls flushLPFunding() to donate it into the pool; the keeper does it each pass.

The market maker's trade

When longs pay, a bot shorts the perp and buys the same size of the coin in the spot pool, through KyberSwap or 0x routes, then collects funding while flat. That trade is what pulls the light side in when the vault is empty.