Tadle

Tadle
DeFi
30,000 USDC
View results
Submission Details
Severity: low
Valid

Calculation of platform fee is not in favor of the protocol.

Summary

PreMarkets.createTake() rounds down calculating the platform fee.
It is not in favor of the protocol.

Vulnerability Details

The relavance code of listOffer() is following.

function createTaker(address _offer, uint256 _points) external payable {
... SKIP ...
uint256 platformFee = depositAmount.mulDiv(
platformFeeRate,
Constants.PLATFORM_FEE_DECIMAL_SCALER
);
... SKIP ...
}

Impact

Calculation of platform fee is not in favor of the protocol.

Code Snippet

Tools Used

Manual Review

Recommendations

It is recommended to round up.

Updates

Lead Judging Commences

0xnevi Lead Judge 10 months ago
Submission Judgement Published
Validated
Assigned finding tags:

finding-PreMarkets-Rounding-Direction

Duplicate of #456, however, for issues noting rounding directions, will be low severity given the impact is not proven sufficiently with a PoC/numerical example and most rounding will not result in significant losses e.g. most examples only proved at most a 1 wei difference when computing `depositAmount/platFormFees` and involves lower amount offers

Support

FAQs

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