Dria

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

Lack of Restriction on `withdrawPlatformFees` Allows Owner to Withdraw Non-Platform Fees

Summary

The withdrawPlatformFees function in the LLMOracleCoordinator contract allows the owner to withdraw the entire balance of the contract. This includes not only platform fees but also validator and generator fees. The absence of a mechanism to accurately calculate and separate the platform fees raises concerns about potential misuse of funds intended for other stakeholders.

Vulnerability Detail

The function is intended to enable the owner to withdraw only the accumulated platform fees. However, it currently transfers the entire balance of the fee token held by the contract to the owner's address without distinguishing between different types of fees. This means that the owner can withdraw all funds, including those designated for validators and generators, which should remain within the contract until claimed by their respective parties.

Impact

This flaw could lead to several significant issues, including:

  • Validators and generators may find themselves unable to access their fees, which could impact their compensation and discourage future participation in the system.

  • The potential for unauthorized withdrawals undermines the integrity of the fee distribution model, leading to a loss of trust among participants and affecting the overall functionality of the platform.

Tool used

Manual Code Review

Recommendation

It is essential to implement a mechanism that accurately tracks platform fees separately from other fees. This could involve introducing a method to accumulate platform fees and updating the fee-handling processes to ensure that only the platform fees are available for withdrawal by the owner. This will safeguard the funds meant for validators and generators, preserving the intended economic model of the contract.

Updates

Lead Judging Commences

inallhonesty Lead Judge 7 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.