Dria

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

`LLMOracleCoordinator` owner can withdraw all fees

Summary

LLMOracleCoordinator.sol::withdrawPlatformFees() transfers balance of address(this) to the owner, which allows the owner to withdraw all fees, include generation fee and validation fee.

/// @notice Withdraw the platform fees & along with remaining fees within the contract.
function withdrawPlatformFees() public onlyOwner {
feeToken.transfer(owner(), feeToken.balanceOf(address(this)));
}

Impact

Once user issues a oracle request and transfers fees to LLMOracleCoordinator, the owner can withdraw all fees before or during any generating and validating process. Generator and validator won't get the fees that they derseve. Theire is a crisis of trust.

Tools Used

Manual

Recommendations

add a variable to storage platform fee and remaining fees instead of using balanceOf(address(this)

Updates

Lead Judging Commences

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