Ā©ļø
Coin CapitalĀ® - Docs
  • šŸŖ™Welcome to Coin CapitalĀ®
  • Accounting & Flow of Funds
  • Borrow & Lending [SOL/USDC]
  • Borrow & Lending [NFTs]
  • Staking [SOL/USDC]
  • Concentrated Liquidity Mining
  • Trading Bots
  • Liquidators
  • Risks
  • Funds/Vault/Distribution Addresses
Powered by GitBook
On this page

Accounting & Flow of Funds

šŸ“ˆPerpetual Futures and Spot Trading with up to 10x leverage

PreviousWelcome to Coin Capital®NextBorrow & Lending [SOL/USDC]

Last updated 1 year ago

Within Coin CapitalĀ®, all mint funds and profit deposits are held in a global collateral vault. This is required for seamless cross-margin and borrow-lend. The only exception to this is the insurance fund vault residing outside.

Ensuring proper accounting across all allocation requires a robust tracking mechanism. The fund uses intermediate Pool Balances to facilitate transfers and ensure that claimed gains are required to come from settled offsetting losses, this is done by the efficient mechanism on Drift.

High Level Architecture

Perpetual Market

An individual perpetual market has two pools:

A. P&L Pool: to accumulate funds from users with losses for settlement to users with profits B. Fee Pool: to accumulate a fraction of exchange fees for the Quote Spot Market's Revenue Pool

The P&L Pool receives the highest priority on claimed funds, in order to give our funds the best possible allocation.

The Fee Pool will only get partially filled up by up to 1% of intermediate P&L settled from Drift users losses and aggressively drawn down for the benefit of the P&L Pool otherwise.

Spot Market

An individual spot market has two pools:

A. Revenue Pool: to accumulate revenue across the Drift protocol, denominated in this token B. Fee Pool: to pay fillers and settle portions to the revenue pool

The Revenue Pool can collect fees from:

  • Borrow interest

  • Liquidations

  • Perpetual Markets

and can pay out to:

  • Insurance Fund

  • Perpetual Markets

Future Work

Currently, a Perpetuals Market can only pull from the Spot Market Revenue Pool and Insurance Fund for its quote currency.

  • In the future, it may be possible for a distressed associative perp market (BTC-PERP) to be able to pull funds from the associated spot market (BTC) revenue/insurance pool and immediately swap for USDC to top off its fee/P&L pool.

The fund's operations on orderbook, liquidity, and liquidation layer is powered by a validator-like Keeper Network via Drift Protocol.

High Level Architecture