Mango Markets
Searchโ€ฆ
๐Ÿ’ธ
Funding
  • funding is paid continuously and is automatically added to the user's Unsettled Pnl
  • To see past funding earned, visit the Account page in the UI
Funding is computed continuously as a daily difference in the index price and current book price (current mid). The UpdateFunding instruction is called by the Keeper roughly every 5 seconds and so funding is paid out roughly every 5 seconds. The calculation is as follows:
1
book_price = (bid + ask) / 2
2
diff = clamp(book_price / index_price - 1, -0.05, 0.05)
3
time_factor = (now - last_updated) / TIME_IN_DAY
4
funding = diff * time_factor * contract_size * index_price
Copied!
Copy link