Qilin V2 has fully adapted the funding rate design for the on-chain environment. On Qilin V2, the funding rate is charged from the direction of the unmatched positions and is triggered by any action (trading, LP, liquidation, margin adding, etc.). The amount of funding rate is determined by the size of the unmatched position. Funding rate payments are sent to the LP. The amount of the funding rate charged from each user is based on the number of positions and the size of the positions held by the user. The collection interval for is one block, and a rebase mechanism is used for collection.