In LLMOracleRegistry whenever register is called an amount is transferred from sender to the contract. However when user calls unregister that amount of stake sent when registering is not refunded.
In LLMOracleRegistry::register() we can see that the user transfers a stake amount to the contract when registering
But when we observe the unregister function we see that the allowance is being restored to msg.sender i.e the stake has been re-approved, After that there's no transfer of stake amount back to user.
So when the user registers an oracle, unregisters it and try to register the oracle back looking at `register` the user will pay another stake amount making the user pay the stake amount 2x, which is not right.
For instance:
Bob calls register(LLMOracleKind), it executes successfully then Bob calls unregister
it also executes successfully but when Bob tries to call register again with the same Oracle kind
the register function will check for allowance and try to send the same stake amount from msg.sender to contract, making him pay stake amount twice.
User will lose his stake amount when he calls unregister.
manual review
Refund stake amount back to user when he calls unregister and add a fee mechanism to protect the implementation
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.