The balance of a user is updated in the collateral token type instead of the point token type. This would lead to incorrect calculation of funds.
In the closeBidTaker() function, the pointTokenAmount
is added to the makerInfo.tokenAddress
balance of the user.
This could lead to many issues, one of which is discussed below:
If the point token value is worth less than the collateral token (1000 point token = 1 USDC; usds is taken as an example), then the user will get more than they deserve.
Note this mistake is made in the settleAstTaker function also.
This leads to incorrect fund calculation(either more or less).
Manual Review
Update the code as follows:
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.