Tadle

Tadle
DeFiFoundry
27,750 USDC
View results
Submission Details
Severity: medium
Invalid

no check whether "stockStatus" is already finished in settleAskTaker.

Summary

there is no check in settleAskTaker whether stockInfo.stockStatus is already finished or not.

Vulnerability Details

function settleAskTaker(
address _offer,
address _stock,
uint256 _settledPoints,
uint256 _settledPointTokenAmount
) external onlyDeliveryPlace(tadleFactory, _msgSender()) {
StockInfo storage stockInfo = stockInfoMap[_stock];
OfferInfo storage offerInfo = offerInfoMap[_offer];
offerInfo.settledPoints = offerInfo.settledPoints + _settledPoints;
offerInfo.settledPointTokenAmount =
offerInfo.settledPointTokenAmount +
_settledPointTokenAmount;
@ stockInfo.stockStatus = StockStatus.Finished;
emit SettledBidTaker(
_offer,
_stock,
_settledPoints,
_settledPointTokenAmount
);
}

Impact

if stockInfo.stockStatus is already finished then settleAskTaker will not work.

Tools Used

Recommendations

there should be a check on settleAskTaker for stockInfo.stockStatus is finished or not.

Updates

Lead Judging Commences

0xnevi Lead Judge
12 months ago
0xnevi Lead Judge 12 months ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.