PvPool (PvP) Trading Mechanism

Trading Mechanism Root DEX employs the PvPool (PvP) trading mechanism, which enables direct trading between traders and liquidity pools. In this version, multiple trading pairs utilize a shared fund pool.

All traders' orders interact directly with the fund pools. A trader's profit from perpetual contract trading corresponds to a loss from the fund pool, and conversely, a trader's loss translates into a gain for the fund pool. If a trader profits, these gains are sourced from an LP fund pool; if a trader incurs a loss, this loss is compensated by the LP fund pool.

When a trader initializes a position, they borrow funds from the fund pool, which necessitates payment of borrowing fees for as long as the position is held.

To participate in market making, a liquidity provider merely needs to purchase RLP tokens. When a liquidity provider decides to withdraw funds from a fund pool, they will profit if the net value of the fund pool is higher than when they initially deposited. Conversely, they will incur a loss if the net value has decreased. No impermanent loss is experienced by liquidity providers when adding or removing funds to or from a fund pool.

Transaction Process Opening, closing, or modifying a position on Root DEX involves two steps:

  1. The user sends a transaction request to the blockchain, which includes parameters such as margin amount and leverage.

  2. Keepers monitor the blockchain for the request, retrieve the price feed from the ChainLink oracle, adjust the price based on the price feeds from centralized oracles, and then execute the request.

For instance:

When longing Ethereum, a trader borrows 1,000 USDC from the RLP fund pool with an initial margin of 100 USDC and 10x leverage, anticipating future profits from Ethereum's price increase. When shorting Ethereum, a trader borrows 1,000 USDC from the RLP fund pool with an initial margin of 100 USDC and 10x leverage, aiming to profit from Ethereum's anticipated price decrease. In both scenarios, irrespective of Ethereum's price movement, the trader's maximum loss is limited to 100 USDC (the initial margin of the position), while the maximum profit can reach 1,000 USDC.

Last updated