After swap in Vault , the Vault call UpliftOnlyExample.sol#onAfterSwap for the purpose of fees deduction . The fees for Quant Amm Admin is transferred to the admin but the fees for UpliftOnlyExample owner stays in the contract and the contract has no function to withdraw the fees out .
UpliftOnlyExample.sol is a router contract which is used to add/remove from the Vaults . It has some callback functions activated for the hooks as can be seen :
https://github.com/Cyfrin/2024-12-quantamm/blob/a775db4273eb36e7b4536c5b60207c9f17541b92/pkg/pool-hooks/contracts/hooks-quantamm/UpliftOnlyExample.sol#L372-L384
One of the callbacks amongst them is onAfterSwap , which is called after swaps in Vault for deduction Quant AMM Admin fees and Owner fees of the UpliftOnlyExample contract as can be seen here :
https://github.com/Cyfrin/2024-12-quantamm/blob/a775db4273eb36e7b4536c5b60207c9f17541b92/pkg/pool-hooks/contracts/hooks-quantamm/UpliftOnlyExample.sol#L292-L295
The problem in the function is that the fees for the Owner is deducted from the amount used in swap correctly and is transferred to the UpliftOnlyExample contract correctly :
but the UpliftOnlyExample contract has no withdraw function enabled for the Owner to withdraw the fee tokens out of the contract, thereby locking the fee tokens permanently in the contract .
Owner fees get's locked in the contract forever .
Manual Review
Add a access restricted withdraw function in the UpliftOnlyExample contract for the Owner to withdraw the fees out
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.