The settleAskMaker() function in the DeliveryPlace.sol contract has a vulnerability where it incorrectly checks the authority using offerInfo.authority instead of stockInfo.authority. This error prevents ask takers from retrieving their collateral, while bid offers can illegitimately access the collateral of ask takers.
In the settleAskMaker() function, the contract checks the authority to ensure that the caller is authorized to perform the operation. However, the authority check incorrectly references offerInfo.authority instead of stockInfo.authority. This mismatch results in unauthorized access, where bid offers can access collateral intended for ask takers, while legitimate ask takers are unable to retrieve their collateral.
The vulnerability leads to the following impacts:
Ask takers are unable to retrieve their collateral.
Bid offers can illegitimately access the collateral of ask takers, potentially leading to financial loss for the ask takers.
Consider the scenario where an ask taker initiates the settleAskMaker() function:
The function incorrectly verifies the authority using offerInfo.authority instead of stockInfo.authority.
As a result, the ask taker cannot retrieve their collateral, while the bid offer may exploit this mistake to gain access to the collateral.
Manual code review
To fix this vulnerability, replace the offerInfo.authority reference with stockInfo.authority in the settleAskMaker() function to ensure the correct authority is being checked. This will prevent unauthorized access and ensure that ask takers can retrieve their collateral as intended.
Valid high severity, In `settleAskTaker/closeBidTaker`, by assigning collateral token to user balance instead of point token, if collateral token is worth more than point, this can cause stealing of other users collateral tokens within the CapitalPool contract, If the opposite occurs, user loses funds based on the points they are supposed to receive
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.