Dria

Swan
NFTHardhat
21,000 USDC
View results
Submission Details
Severity: medium
Valid

withdrawPlatformFees shouldn’t be withdrawing the entire contract’s balance

Summary

The function withdrawPlatformFees of LLMOracleCoordinator is transferring the entire feeToken balance of the contract to the owner, instead of transferring the platform fees.

Vulnerability Details

The contract LLMOracleCoordinator is missing a variable that aggregates all the fees the platform has collected, in order to transfer these fees to the owner when he calls withdrawPlatformFees.
That can result in the owner mistakenly withdrawing generator and validator fees, that have not been transferred out or that have not been allocated yet.

Impact

The generators and validators that haven't transferred out their fees, will suffer losses.

Tools Used

Manual Review

Recommended Mitigation

Introduce a variable to track the platform fees, and use it in order to send the right amount of fees to the owner when withdrawPlatformFees is called.

Updates

Lead Judging Commences

inallhonesty Lead Judge 9 months ago
Submission Judgement Published
Validated
Assigned finding tags:

`withdrawPlatformFees` withdraws the entire balance

Support

FAQs

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