This repository has been archived by the owner on May 26, 2023. It is now read-only.
clems4ever - Multiple payments for one contributor but only one invoice required #242
Labels
Low/Info
A valid Low/Informational severity issue
Non-Reward
This issue will not receive a payout
Sponsor Confirmed
The sponsor acknowledged this issue is valid
Will Fix
The sponsor confirmed this issue will be fixed
clems4ever
medium
Multiple payments for one contributor but only one invoice required
Summary
In OngoingBounty, a claimId is a hash encoding the contributor and the PR and this id is used as a key for whether supporting documents have been provided or an invoice has been completed. However, if a contributor makes several contributions and get paid multiple times, I guess we should verify that there is a new invoice for each payment. However, this is not checked in the contract since the mapping are all overridden since multiple payouts would generate the same claimId.
Vulnerability Detail
Impact
Only one invoice required to get the payment instead of as many invoices as there are payments for the same developers on the same PR.
Code Snippet
https://github.com/sherlock-audit/2023-02-openq/blob/main/contracts/Bounty/Implementations/OngoingBountyV1.sol#L107
Tool used
Manual Review
Recommendation
Include the number of payments in the encoding function for generating a unique claim id for every claim from the same user and PR in order to verify whether there is an invoice for each payment.
The text was updated successfully, but these errors were encountered: