Skip to content

Latest commit

 

History

History
42 lines (24 loc) · 1.69 KB

068.md

File metadata and controls

42 lines (24 loc) · 1.69 KB

Abundant Navy Kestrel

Medium

Vesting position fees and removed liquidity will be stuck when there are no stakers

Summary

Vesting position fees and removed liquidity will be stuck when there are no stakers

Root Cause

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.

Internal Pre-conditions

  1. No stakers, they/he either left or the vesting position was created when no stakers

External Pre-conditions

No

Attack Path

  1. Bob is a staker in the vault, protocol decide to create a vesting position to incentivize new users as there's currently only 1
  2. Bob leaves the protocol for some reason, now there's 1000 total supply, all controlled by the dead address
  3. Now, fees will be collected for some time
  4. 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
  5. 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
  6. 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.

Impact

Stuck tokens.

PoC

No response

Mitigation

Implement a rescue functionality.