Skip to main content

Claims

Overview

The Claims contract enables cover owners to submit claims and redeem payouts if their claims are accepted. Submitting a claim starts an assessment, which is voted on in the Assessments contract.

The contract integrates with multiple protocol components, including:

  • Assessments (IAssessments) – Handles voting and decision-making for claims.
  • Cover (ICover) – Provides cover data and burns the stake backing a cover on payout.
  • Pool (IPool) – Sends the payout and returns the assessment deposit.
  • Ramm (IRamm) – Updates token prices and liquidity.

Key Concepts

Claim

A claim records the payout requested against a cover.

struct Claim {
uint32 coverId;
uint96 amount;
uint8 coverAsset;
uint32 payoutRedemptionPeriod;
bool payoutRedeemed;
bool depositRetrieved;
}
FieldDescription
coverIdThe cover the claim is made against.
amountThe requested payout amount, in the cover asset.
coverAssetThe asset the payout would be made in.
payoutRedemptionPeriodHow long the claimant has to redeem an accepted payout.
payoutRedeemedWhether the payout has been redeemed.
depositRetrievedWhether the assessment deposit has been retrieved.

Assessment Deposit

Submitting a claim requires an ETH deposit:

uint public constant CLAIM_DEPOSIT_IN_ETH = 0.05 ether;

An accepted claim returns the deposit together with the payout. A claim that resolves as a draw returns the deposit through retrieveDeposit. A denied claim keeps the deposit.

Status and Outcome

An assessment moves through three statuses, and resolves to one of four outcomes.

enum AssessmentStatus { VOTING, COOLDOWN, FINALIZED }
enum AssessmentOutcome { PENDING, ACCEPTED, DENIED, DRAW }

The outcome stays PENDING until the cooldown period after voting has passed. After that, more accept votes than deny votes gives ACCEPTED, more deny votes gives DENIED, and an equal number gives DRAW.


Mutative Functions

submitClaim

Submits a claim against a cover and starts its assessment.

function submitClaim(
uint32 coverId,
uint96 requestedAmount,
bytes32 ipfsMetadata
) external payable returns (Claim memory claim);
ParameterDescription
coverIdThe cover ID to claim against.
requestedAmountAmount requested for payout, in the cover asset.
ipfsMetadataIPFS hash containing the claim details and proof of loss.
  • Behavior:
    • Requires the caller to own the cover.
    • Requires CLAIM_DEPOSIT_IN_ETH to be sent with the call.
    • Requires the cover to be within its cover period or grace period.
    • Starts an assessment for the claim.
    • Emits ClaimSubmitted and MetadataSubmitted.

redeemClaimPayout

Pays out an accepted claim.

function redeemClaimPayout(uint claimId) external;
ParameterDescription
claimIdThe claim to redeem.
  • Behavior:
    • Requires the assessment to be finalized and accepted.
    • Requires the redemption period to still be open.
    • Burns the stake backing the cover, then sends the payout and the assessment deposit from the Pool.
    • Emits ClaimPayoutRedeemed and ClaimDepositRetrieved.

retrieveDeposit

Returns the ETH assessment deposit for a claim that resolved as a draw.

function retrieveDeposit(uint claimId) external;
ParameterDescription
claimIdThe claim whose deposit is retrieved.
  • Behavior:
    • Requires the outcome to be DRAW.
    • Can be called by anyone, and always sends the deposit to the current cover owner.
    • Emits ClaimDepositRetrieved.

View Functions

getClaim

Returns the stored claim.

function getClaim(uint claimId) external view returns (Claim memory);

getClaimDetails

Returns the claim together with its cover, assessment, status, outcome and metadata, and whether the payout is currently redeemable.

function getClaimDetails(uint claimId) external view returns (ClaimDetails memory);

getClaimsCount

Returns the total number of claims submitted.

function getClaimsCount() external view returns (uint);

getMemberClaims

Returns the claim ids submitted by a member.

function getMemberClaims(uint memberId) external view returns (uint[] memory);

lastClaimSubmissionOnCover

Returns the most recent claim submitted against a cover.

function lastClaimSubmissionOnCover(uint coverId) external view returns (uint claimId);

Events

  • ClaimSubmitted(address user, uint claimId, uint coverId, uint productId): Emitted when a claim is submitted.
  • MetadataSubmitted(uint claimId, bytes32 ipfsMetadata): Emitted with the claim's IPFS metadata.
  • ClaimPayoutRedeemed(address user, uint amount, uint claimId, uint coverId): Emitted when a payout is redeemed.
  • ClaimDepositRetrieved(uint claimId, address user): Emitted when the assessment deposit is returned.

Frequently Asked Questions

Who can submit a claim?

The owner of the cover NFT. The cover must be within its cover period or its grace period.

What happens to my deposit?

An accepted claim returns the deposit along with the payout. If the assessment ends in a draw, call retrieveDeposit to collect it. A denied claim keeps the deposit.

How long do I have to redeem an accepted payout?

The period is recorded on the claim as payoutRedemptionPeriod. After it passes, the payout can no longer be redeemed.

What happens if my claim is denied?

You can submit another claim against the same cover with more supporting evidence, as long as the cover is still within its cover period or grace period.


Disclaimer: This documentation provides a high-level overview of the Claims contract. Always refer to the latest contract code and official resources when developing against the protocol.