Skip to main content

InsurancePool Contract

The InsurancePool contract collects fees from loans and covers lender losses when borrowers default.

Contract Overview

Key Functions

Deposit Insurance Fee

Called when a new loan is created:

Claim for Default

Called when a loan defaults:

Voluntary Contribution

Users can contribute to increase coverage and earn surplus distributions:

Withdraw Contribution

Contributors can withdraw their share plus earned surplus:

Distribute Surplus

When pool grows beyond target, distribute surplus to contributors:

View Functions

Get Pool Status

Get Contributor Info

Events

Pool Economics

Fee Collection

Default Coverage

Surplus Distribution

Constants

Access Control

Integration Example

Trust Vault

Main liquidity pool

P2P Loan

Loan contract integration