The implementation of perpetual contracts is very different from centralized exchanges to decentralized exchanges, but What they have in common is that they all have two very important basic elements: mark price (Mark Price) and index price (Index Price). Among them,
Mark Price refers to a The price of the perpetual contract itself at a certain point in time is generally directly derived from the market transaction price of the contract. It is also used to calculate profit and loss and help trigger liquidations.
Index price refers to the price calculated based on the proportionally weighted average of the spot market transaction prices of the underlying assets on major exchanges.
Ideally, the value of a perpetual contract should be roughly the same as the spot value of its underlying asset, that is, the mark price should be roughly equal to the index price. In traditional finance, as the expiration date approaches, the futures value will gradually converge to the spot value. But perpetual is different. Since it never expires, and the futures contract has its own supply and demand dynamics, its mark price may deviate significantly from the index price of its target asset.
Therefore, we need a mechanism to ensure that the mark price converges to the index price so that it floats near the index price. This mechanism is called the Funding Rate.