• Logic Flow

Perpetual Contract Pricing (Decentralized Exchange):

contract_price = Oracle.fetchPrice(underlying_asset_price, funding_rate, index_price, funding_rate_interval)

contract_price represents the current price of the perpetual contract.

Oracle is the decentralized oracle service used to fetch price data.

underlying_asset_price is the current price of the underlying asset.

funding_rate is the rate used to calculate funding payments in the perpetual contract. index_price is the reference price used to settle the perpetual contract.

funding_rate_interval is the time interval for funding rate calculations.

In decentralized exchange perpetual contracts, an Oracle service is utilized to fetch price data for the underlying asset. The contract_price is calculated based on the underlying_asset_price, funding_rate, index_price, and funding_rate_interval. The funding rate is used to determine funding payments between long and short positions in the perpetual contract. The index_price serves as a reference for settling the contract at expiry or in case of liquidation.

Last updated