Master the DeepBook Predict vault architecture — understand how LPs supply liquidity via PLP tokens, how vault value and exposure are tracked, and how to compute share prices, utilization, and mint amounts for LP operations.
The DeepBook Predict vault is the counterparty to every trade. When a trader mints a position, the vault collects the premium. When a position settles in-the-money, the vault pays out. Understanding this architecture is key to building LP interfaces.
The VaultStats interface captures the real-time state of the vault. Every field serves a purpose — from tracking total deposits to computing fee adjustments based on utilization.
The vault is built from several interconnected components. Each one plays a specific role in tracking the vault's financial state.
PLP (Predict Liquidity Provider) tokens represent your share of the vault. They are minted when you supply DUSDC and burned when you withdraw. The share price changes over time as the vault earns fees or pays out positions.
The supplyLpTx function builds a PTB that deposits DUSDC into the vault and mints PLP tokens to the sender. It handles coin merging, splitting, and the predict::supply call.
The withdrawLpTx function builds a PTB that burns PLP tokens and returns DUSDC to the LP. Withdrawals may be limited by the withdrawal limiter during high-utilization periods.
The vault has multiple risk controls to protect LPs. These limits prevent the vault from taking on too much exposure and ensure orderly withdrawals even under stress.
The API provides a VaultSummaryData object with comprehensive vault statistics. This is the data source for LP dashboards, showing everything from TVL to share price.
LP returns depend on the balance between fees earned and positions paid out. Understanding these scenarios helps LPs make informed decisions about when and how much to supply.