The hook contract charges a fee on swaps and stores the owner fees in the contract. However, there is no function available for the owner to withdraw these funds. As a result, the accumulated fees are permanently locked in the contract, rendering them inaccessible.
In the hook contract, a fee (ownerFee
) is charged during swaps and stored using the sendTo
function, which transfers the fee to the hook contract's address.
While the fee collection is properly implemented, the contract lacks a withdrawal mechanism, preventing the owner from accessing these funds.
The funds are transferred to the hook contract using _vault.sendTo
. However the absence of a withdrawal function means these funds are permanently locked.
The fees collected from swaps are inaccessible, resulting in a financial loss for the owner.
Manual Code Review
Add a function to the contract that allows the owner to withdraw the accumulated fees. The function should transfer the collected fees (ownerFee
) to the owner's address.
Likelihood: High, every swap. Impact: High, funds are stuck.
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.