UpliftOnlyExample::onAfterSwap
hook incorrectly transfers funds to UpliftOnlyExample
contract instead of the owner address, coupled with a lack of withdrawal function in the UpliftOnlyExample
contract, permanently locking the fees in the contract.
In UpliftOnlyExample::onAfterSwap
. The vault transfers funds to this contract instead of the owner address. This contract doesn't have any function to transfer out the funds, meaning all owner fees are permanently locked in this contract
Proof of Code
Add this function to the UpliftExample.t.sol
The test log indicates that the swap fees are sent to the UpliftExample
contract. There is no function for transferring or donating the tokens, which leaves the funds locked in the contract.
onAfterSwap
hook is called each time a user swaps tokens from the pool.
Owner cannot access their entitled fees, resulting in direct financial loss
Manual
Foundry
Modify the onAfterSwap
function to send the fees directly to the owner:
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.