The closeBidTaker
function is called by the Taker after the admin has updated the Token Generation Event (TGE) parameters and the Maker has executed the settleAskMaker
function. The purpose of this function is to finalize the bid and ensure that the Taker receives the expected points tokens in their balance. However, an issue has been identified where the addTokenBalance
mapping is updated with the wrong token address. Specifically, instead of updating the mapping with the points token address, it is mistakenly updated with the collateral token address. This results in the Taker not receiving the expected points tokens in their balance.
The addTokenBalance
mapping is supposed to record the correct amount of points tokens to the Taker’s balance. However, the mapping is mistakenly updated with the collateral token address rather than the points token address. This leads to the points tokens being incorrectly allocated, or not allocated at all, to the Taker’s balance.
// create a user4
// Run test on test/PreMarkets.t.sol
when the Taker checks their balance after calling closeBidTaker
, they do not see the expected points tokens. This discrepancy could cause confusion and financial loss.
The incorrect token allocation could prevent the Taker from fulfilling other contract obligations or participating in subsequent actions that depend on the correct points token balance. This could lead to a cascading failure in the contract’s operation, affecting multiple users and transactions.
Manual Review
Change the wrong token address to the correct one.
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.