Axis-Fi / axis-core

Axis Protocol
https://axis.finance
Other
3 stars 0 forks source link

[DRAFT] Sherlock: Fix for incorrect prefunding calculation in claimProceeds #104

Closed 0xJem closed 3 months ago

0xJem commented 3 months ago

Fixes https://github.com/sherlock-audit/2024-03-axis-finance-judging/issues/187

Issue: the prefunding calc in claimProceeds() did not take into account whether the bids had been claimed. If bids were claimed beyond a certain threshold, routing.funding would underflow.

There were a few approaches that could be taken to solving this:

It seemed easier to track the bid payouts remaining.

0xJem commented 3 months ago

Some tests are failing:

0xJem commented 3 months ago

Superseded by #111