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.
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.
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.
Manual Code Review
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.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.