Skip to content

Commit

Permalink
fix: h-5 Wrong calculation for excess of funds
Browse files Browse the repository at this point in the history
  • Loading branch information
dangerousfood committed Jan 16, 2024
1 parent 6dfa87a commit ec2ec13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/settlement/DutchAuctionSettlement.sol
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ abstract contract DutchAuctionSettlement is Settlement, AmountDeriver {

if (carry > 0 && loan.debt[0].amount + interest - carry < settlementPrice) {
consideration = new ReceivedItem[](2);
uint256 excess = settlementPrice - loan.debt[0].amount + interest - carry;
uint256 excess = settlementPrice - (loan.debt[0].amount + interest) - carry;
consideration[0] = ReceivedItem({
itemType: loan.debt[0].itemType,
identifier: loan.debt[0].identifier,
Expand Down

0 comments on commit ec2ec13

Please sign in to comment.