LLMOracleCoordinator.sol
contract's withdrawPlatformFees()
function allows the owner to withdraw the entire contract balance, including fees that rightfully belongs to the generators and validators of the protocol, potentially leading to loss of earned rewards for protocol participantswithdrawPlatformFees()
https://github.com/Cyfrin/2024-10-swan-dria/blob/main/contracts/llm/LLMOracleCoordinator.sol#L375feeToken.transfer(owner(), feeToken.balanceOf(address(this)));
respond
and validate
(because the fees is not instantly transferred to the generators and validators instead it increases allowance of the generators and validators by using function _increaseAllowance
https://github.com/Cyfrin/2024-10-swan-dria/blob/main/contracts/llm/LLMOracleCoordinator.sol#L396transferfrom
and are just stacking up fee and before them claiming there rewards the owner uses withdrawPlatformFees()
this makes the contract out of funds thus there is no amount left for the genrators and validators to claim from this contracttransferFrom
withdrawPlatformFees
is never safe(as there will always be unclaimed rewards in the protocol) so the owner will hypothetically never be able to claim the platformfees without griefing the protocols validators and generators
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.