Assessment reports>GTE -- Perp>Discussion>The setIndexPrice() update frequency

The setIndexPrice() update frequency

The setIndexPrice() function is responsible for updating the index price used across the protocol, a critical input for functions such as funding-rate calculation, liquidation checks, profit and loss (PNL) estimation, and position health monitoring.

While the function is currently designed to be called periodically (e.g., once per hour), it’s important to note that the security and correctness of the protocol depend on how frequently this function is triggered. If setIndexPrice() is not updated often enough, the on-chain price may drift from the current market price, especially during periods of high volatility or trading activity.

This may lead to the following.

  • Delayed reaction to market conditions, which may allow traders to exploit stale prices during funding updates or liquidation checks

  • Inaccurate PNL and margin calculations, especially during volatile periods

  • Increased risk of incorrect liquidations or missed liquidations due to outdated price references

Zellic © 2025Back to top ↑