# Insurance Fund

nftperp v2 introduces a refined insurance fund, a critical feature for risk management and protocol security. The insurance fund acts as a backstop for system debt while providing a yield-generating mechanism for Liquidity Providers (LPs) who contribute to maintaining the protocol's financial integrity.

### Security for the Protocol&#x20;

The insurance fund will be denominated in ETH and is strictly used to manage bad debt from liquidations and protocol-level risks within the ClearingHouse. The fund operates as an ERC4626 Vault, enabling straightforward liquidity contributions. In return, LPs receive an appreciating ERC20 token linked to the protocol's profits. &#x20;

#### Incentives for LPs

* **Transaction Fee Allocation:** LPs earn returns from a 50% share (15bps) of the 30 basis points paid by takers per order filled by the DLOB, or a 16.67% share (5bps) of orders filled by the AMM
* **Liquidation Residuals:** They also gain 50% of the leftover value from liquidated positions, enhancing the fund's capacity to cover potential shortfalls.&#x20;

#### Staking/Unstaking

LPs can stake into the insurance fund at any time, minting **NIP** tokens in return. NIP is the insurance fund receipt token, which represents a user's stake in the insurance fund. Staking requires a 0.1% entry fee, so that the base balance of the insurance fund gradually increases over time, creating a backstop.

The ratio of NIP/WETH starts out at 1, and changes in value relative to WETH inflow. So as more WETH flows in from fees/liquidations, the value of NIP appreciates against WETH. Conversely, if the insurance fund is needed to clear some bad debt and WETH flows out, the value of NIP depreciates against WETH.

Insurance fund contributions are locked for a minimum of 48 hours, ensuring stability and value alignment with LPs. After this lockup period, LPs are free to withdraw their WETH and accrued rewards, following a 48-hour withdrawal period. Withdrawing WETH from the insurance fund results in the burning of NIP.

Incorporating these features into the user interface facilitates ease of participation for Liquidity Providers, promoting both their financial benefit and the robustness of the nftperp ecosystem.

**Insurance fund contract address:** 0x087E8C29d0743120A9b9d003F702FB7F450291ba

