Claim Manager

Insurance Smart Contract

Claim payout operation begins with the claim validator, who is responsible for approving the claim amount and providing approved amount data associated with the claim case to the "Claim Manager". The claim voter will then be notified by the contract and the claim reserve value will be recorded. The claim's status will shift from the voting phase to the finalized phase once the claim voter vote has been concluded and a consensus has been reached.

If the risk subsidy ratio is 50 percent for each risk carrier, for example, the contract will submit a claim to the risk carrier service after the claim payment request is fulfilled, requesting payment of 100 USD. The agreed-upon split is 50/50, with each risk carrier taking responsibility for 50 USD.

Once the payment from the risk carrier service has been paid to the "Claim Manager," the "Claim Manager" will then update the claim case status and the amount that has been paid out in claims. Finally, the token's claim payout value will be paid to the user in an amount that corresponds the approved claim amount according to the accepted token standard.

submitAssessment

function submitAssessment(
    uint256 _claimId_,
    uint256 _claimApprovedAmount_,
    bool _isAccepted_
) external returns (bool)

"The submitAssessment function allows a validator to submit an assessment for an insurance claim. The function takes three parameters: the claim ID, the approved amount for the claim, and a flag indicating whether the claim is accepted or rejected.

The caller must be a validator in the claim case, which means that they are a validator staked in the selected product pool and have been chosen to participate in the assessment of the claim.

Upon successful submission of the assessment, the function emits the ClaimAssessmentSubmitted event. If the validator reward needs to be increased, the function will also emit the ClaimAssessmentRewardIncreased event.

When the consensus on the assessment of a claim is reached, the function will emit the ClaimAssessmentConsensusReached event, indicating that the claim assessment process is complete, and the payout to the policy holder can be initiated. Additionally, if the consensus is reached, the function will also emit the ClaimAssessmentPointIncreased event, signifying that the validator's point will be increased.

The function returns a boolean value, with true indicating that the assessment has been submitted successfully."

Requirements:

  • nonReentrant - The function must not be reentrant.

  • whenNotPaused - The function must not be paused.

Events:

  • ClaimAssessmentSubmitted - Emitted when the assessment is submitted successfully.

  • ClaimAssessmentRewardIncreased - Emitted when the claim validator reward is increased successfully.

  • ClaimAssessmentConsensusReached - Emitted when the consensus on the assessment of a claim is reached. This event signifies that the claim assessment process is complete and the payout to the policy holder can be initiated.

  • ClaimAssessmentPointIncreased - Emitted when the consensus on the assessment of a claim is reached. This event signifies that the claim assessment process is complete and the point will increased to the validator of the claim.

Parameters

NameTypeDescription

claimId

uint256

The claim id.

claimApprovedAmount

uint256

The approved amount of the claim that the validator has approved.

isAccepted

bool

The validator is a flag that indicates whether the submitted claim is accepted or rejected.

Return Values

NameTypeDescription

[0]

bool

True if the assessment is submitted successfully.

ClaimAssessmentSubmitted

event ClaimAssessmentSubmitted(
    uint256 claimId,
    address validator,
    uint256 claimApprovedAmount,
    bool isAccepted
)

This event is emitted when the assessment is submitted successfully.

NameTypeDescription

claimId

uint256

The claim id.

validator

address

The validator address who selected from the submitted claim.

claimApprovedAmount

uint256

The approved amount of the claim that the validator has approved.

isAccepted

bool

The validator is a flag that indicates whether the submitted claim is accepted or rejected.

voteAssessment

function voteAssessment(
    uint256 _claimId_,
    bool _isAccepted_
) external returns (bool)

"The voteAssessment function allows a claim voter, who is a validator staked in a selected product pool but was not chosen to participate in the assessment of a claim, to vote on the assessment. The function takes two parameters: the claim ID and a boolean flag indicating whether the claim is accepted or rejected.

The caller must be a claim voter, which means that they are a validator staked in the selected product pool but were not chosen to participate in the assessment of the claim.

Upon successful voting, the function emits the ClaimAssessmentVoted event. If the claim voter reward needs to be increased, the function will also emit the ClaimAssessmentRewardIncreased event.

When the consensus on the assessment of a claim is reached, the function will emit the ClaimAssessmentConsensusReached event, indicating that the claim assessment process is complete, and the payout to the policy holder can be initiated. Additionally, if the consensus is reached, the function will also emit the ClaimAssessmentPointIncreased event, signifying that the validator's point will be increased.

The function returns a boolean value, with true indicating that the vote has been submitted successfully."

Requirements:

  • nonReentrant - The function must not be reentrant.

  • whenNotPaused - The function must not be paused.

Events:

  • ClaimAssessmentVoted - Emitted when the assessment is voted successfully.

  • ClaimAssessmentRewardIncreased - Emitted when the claim voter reward is increased successfully.

  • ClaimAssessmentConsensusReached - Emitted when the consensus on the assessment of a claim is reached. This event signifies that the claim assessment process is complete and the payout to the policy holder can be initiated.

  • ClaimAssessmentPointIncreased - Emitted when the consensus on the assessment of a claim is reached. This event signifies that the claim assessment process is complete and the point will increased to the validator of the claim.

NameTypeDescription

claimId

uint256

The claim id.

isAccepted

bool

The voter is a flag that indicates whether the submitted claim is accepted or rejected.

NameTypeDescription

[0]

bool

True if the assessment is voted successfully.

ClaimAssessmentVoted

event ClaimAssessmentVoted(uint256 claimId, address voter, bool isAccepted)

This event is emitted when the assessment is voted successfully.

NameTypeDescription

claimId

uint256

The claim id.

voter

address

The voter address.

isAccepted

bool

The voter is a flag that indicates whether the submitted claim is accepted or rejected.

ClaimAssessmentRewardIncreased

event ClaimAssessmentRewardIncreased(uint256 claimId, address caller, uint256 reward)

This event is emitted when the assessment is voted successfully.

NameTypeDescription

claimId

uint256

The claim id.

caller

address

The caller's address means the validator's address or the voter's address.

reward

uint256

The reward amount that given to the voter.

ClaimAssessmentConsensusReached

event ClaimAssessmentConsensusReached(uint256 claimId, ClaimStatus status)

This event is emitted when the claim is consensus.

NameTypeDescription

claimId

uint256

The claim id.

status

The claim status.

ClaimAssessmentPointIncreased

event ClaimAssessmentPointIncreased(uint256 claimId, address validator, uint256 point)

This event is emitted when the claim is consensus.

NameTypeDescription

claimId

uint256

The claim id.

validator

address

The validator address who selected from the submitted claim.

point

uint256

The point amount that given to the validator.

Last updated