Formal Charcoal Boa - In the `incase_token_got_stuck::incase_token_got_stuck_handler()` function, there is no limit on the amount of tokens that the pool owner can sweep from the pool, allowing them to even sweep any `unclaimed_fee` accrued in the pool #62
In the incase_token_got_stuck::incase_token_got_stuck_handler() function, there is no limit on the amount of tokens that the pool owner can sweep from the pool, allowing them to even sweep any unclaimed_fee accrued in the pool
Summary
The incase_token_got_stuck_handler() function allows the pool owner to sweep stuck tokens from the pool. However, the function lacks a limit on the sweep amount, enabling the pool owner to also sweep any unclaimed_fee.
Formal Charcoal Boa
High
In the
incase_token_got_stuck::incase_token_got_stuck_handler()
function, there is no limit on the amount of tokens that the pool owner can sweep from the pool, allowing them to even sweep anyunclaimed_fee
accrued in the poolSummary
The
incase_token_got_stuck_handler()
function allows the pool owner to sweep stuck tokens from the pool. However, the function lacks a limit on the sweep amount, enabling the pool owner to also sweep anyunclaimed_fee
.Root Cause
In the incase_token_got_stuck_handler() function, there are no limitations on the amount that can be swept.
This allows the pool owner to sweep any quantity of tokens from the pool, including any
unclaimed_fee
accrued in the pool.Internal pre-conditions
External pre-conditions
Attack Path
incase_token_got_stuck_handler()
function, leaving no protocol fee.Impact
Pool owners can also sweep any
unclaimed_fee
that has accrued in the pool.PoC
Mitigation
It is recommended to enable the
incase_token_got_stuck_handler()
function only in emergencies.