In UpliftOnlyExample::onAfterSwap function, ownerFee tokens are sent to UpliftOnlyExample contract in stead of owner and are stuck there.
In onAfterSwap function, whenever user swap, they will be charged a swap fee divided into two parts adminFee and ownerFee.
The adminFee tokens will be sent to quantAMMAdmin
And the ownerFee tokens in stead of transfer to owner(), they are transfers to UpliftOnlyExample contract address. UpliftOnlyExample.sol#L343.
Unfortunately, UpliftOnlyExample contract have no function to transfer ERC20 tokens out or implement some logic to use these tokens after receiving them. So there is no way to take these tokens out.
Place this test in UpliftExample.t.sol
Then in /2024-12-quantamm/pkg/pool-hooks run forge test --mt test_feeTokenStuckInUpliftContract -vv. Look into the terminal, the last call will revert with ERC20InsufficientAllowance error.
The owner can not take the ownerFee out.
Owner lost all ownerFee tokens.
Manual review
Foundry
Send ownerFee to owner, not the UpliftOnlyExample contract.
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.