In the LLMOracleCoordinator
contract, platform, generation, and validation fees are not separately tracked, allowing the contract owner to withdraw all accumulated funds, including those intended for validators and generators. This lack of separate tracking could prevent validators and generators from receiving their designated fees, compromising the integrity of the reward distribution mechanism.
Currently, the contract lacks dedicated variables to track the balances of platform fees. The withdrawPlatformFees
function allows the contract owner to withdraw the entire token balance, which includes fees meant for validators and generators. This oversight means validators and generators may not receive their earned fees if the owner withdraws the total balance.
Loss of Earnings: Validators and generators may not receive their expected fees, which undermines trust in the contract and prevents fair compensation.
Compromised Fee Distribution: The lack of proper tracking for each fee type could result in unintended fund distribution, impacting the contract’s reliability.
To ensure proper fund distribution, implement tracking for platformFee. Here’s how:
Define Separate Fee Balances:
Add new state variables:
Allocate Fees to Respective Balances:
Update the request
, finalizeValidation
functions to allocate collected fees to the respective balances:
In request
function
In finalizeValidation
function
Update Withdrawal Function:
Modify withdrawPlatformFees
to withdraw only platformFeeBalance
:
This approach ensures validators and generators receive their fees, while platform fees remain accessible to the contract owner, preserving the contract’s intended fee distribution logic.
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.