Tadle

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

Incorrect Platform Fee in CreateTaker Event

Summary

PreMarktes::createTaker The CreateTaker event is emitted with remainingPlatformFee instead of the full platformFee, leading to inaccurate representation of the total platform fee charged.

Vulnerability Details

//..
// @audit-info the real platform fee is this sum here
makerInfo.platformFee = makerInfo.platformFee + remainingPlatformFee;
//..
/// @dev emit CreateTaker
emit CreateTaker(
_offer,
msg.sender,
stockAddr,
_points,
depositAmount,
tradeTax,
remainingPlatformFee // @audit incorrect
);

however in the event's definition in IPerMarkets::CreateTaker

event CreateTaker(
address indexed offer,
address authority,
address stock,
uint256 points,
uint256 amount,
uint256 tradeTax,
uint256 platformFee // @audit expects platformFee (total) not the remaining
);

Impact

This discrepancy doesn't affect contract functionality but may lead to misinterpretation of emitted event data off-chain.

Tools Used

Manual review

Recommendations

Modify the event emission to use the makerInfo.platformFee instead of remainingPlatformFee:

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.