Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

policy.payoutMaxAmount may change after creation of first claim #107

Open
rapidddenis opened this issue May 29, 2023 · 1 comment
Open
Assignees
Labels
bug Something isn't working

Comments

@rapidddenis
Copy link

In confirmClaim

function confirmClaim(
bytes32 processId,
uint256 claimId,
uint256 confirmedAmount
)

policy.payoutMaxAmount may be decreased in-between creation and confirmation of the claim thus enforcing claim.claimAmount > claim.confirmedAmount

@matthiaszimmermann matthiaszimmermann self-assigned this May 31, 2023
@matthiaszimmermann matthiaszimmermann added the bug Something isn't working label May 31, 2023
@matthiaszimmermann
Copy link
Contributor

good catch, thank you. indeed using adjustPremiumSumInsured the payoutMaxAmount can be decreased below a value that makes sense from existing confirmed claim amounts. this is a state that the framework needs to avoid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants