Claim Manager
Insurance Smart Contract
Last updated
Insurance Smart Contract
Last updated
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.
"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
Name | Type | Description |
---|---|---|
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
Name | Type | Description |
---|---|---|
[0] | bool | True if the assessment is submitted successfully. |
This event is emitted when the assessment is submitted successfully.
Name | Type | Description |
---|---|---|
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. |
"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.
Name | Type | Description |
---|---|---|
claimId | uint256 | The claim id. |
isAccepted | bool | The voter is a flag that indicates whether the submitted claim is accepted or rejected. |
Name | Type | Description |
---|---|---|
[0] | bool | True if the assessment is voted successfully. |
This event is emitted when the assessment is voted successfully.
Name | Type | Description |
---|---|---|
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. |
This event is emitted when the assessment is voted successfully.
Name | Type | Description |
---|---|---|
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. |
This event is emitted when the claim is consensus.
Name | Type | Description |
---|---|---|
claimId | uint256 | The claim id. |
status | The claim status. |
This event is emitted when the claim is consensus.
Name | Type | Description |
---|---|---|
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. |