The withdrawPlatformFees()
function in LLMOracleCoordinator transfers all tokens from the contract to the owner:
LLMOracleCoordinator.sol#L374-L377
This is problematic because:
The contract uses an allowance-based system for paying oracles in respond()
and validate()
:
LLMOracleCoordinator.sol#L393-L398
Tokens aren't transferred immediately to oracles but rather their allowance is increased
Oracles can claim their fees at any time after the allowance is set
Different tasks are in different phases at any given time:
Some tasks are pending validation
Some tasks are completed but oracles haven't claimed fees yet
Some tasks are in progress
If withdrawPlatformFees()
is called while oracles still have unclaimed allowances:
All tokens are transferred to the owner
When oracles try to claim their fees using their allowance, the transfers will fail due to insufficient balance
There is no mechanism to track which tokens in the contract belong to platform fees vs unclaimed oracle fees
Oracles can lose their earned fees if owner withdraws before they claim
No way to determine a "safe" time to withdraw platform fees
Owner could accidentally drain funds meant for oracles
Breaks the core economic incentives of the protocol
Could lead to oracles abandoning the protocol due to payment uncertainty
Track platform fees separately from oracle fees.
Or switch to immediate transfers instead of allowances.
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.