Abundant Navy Kestrel
Medium
Vesting position fees and removed liquidity will be stuck when there are no stakers
The protocol implements a functionality where a vesting position gradually vests to incentivize users. The issue is that if there are no stakers (this can happen either when the vesting position is created with no stakers or when all users leave upon its creation), those funds will be stuck in the contract as the dead address who has dead shares minted will hold those tokens.
- No stakers, they/he either left or the vesting position was created when no stakers
No
- Bob is a staker in the vault, protocol decide to create a vesting position to incentivize new users as there's currently only 1
- Bob leaves the protocol for some reason, now there's 1000 total supply, all controlled by the dead address
- Now, fees will be collected for some time
- Alice joins the protocol after the vesting position is over, fees are collected and liquidity of the vesting position is removed, all of these tokens are now in the contract
- Alice gets minted shares based on her tokens provided, through a normal share conversion formula which factors in all of the assets in the contract from the vesting position
- If Alice withdraws immediately, she will only have access to her own tokens (that's expected and normal), all of the tokens from the vesting positions are "owned" by the dead address, they are stuck forever.
Stuck tokens.
No response
Implement a rescue functionality.