Skip to content

Latest commit

 

History

History
47 lines (24 loc) · 1.54 KB

File metadata and controls

47 lines (24 loc) · 1.54 KB

Curly Eggplant Bee

Medium

deadline not implemented in unstakeAndRemoveLP()

Summary

The absence of a deadline check in unstakeAndRemoveLP will cause gas waste and fund lockup for users as network congestion can result in transactions executing after the deadline expires.

similar issue

Root Cause

In unstakeAndRemoveLP, there is no validation of the _deadline parameter before initiating token transfers and unstaking operations. The deadline is only enforced in the downstream removeLiquidityV2 call, allowing transactions to proceed even if the deadline has expired.

Internal Pre-conditions

Users must submit transactions with a _deadline that could expire before mining

External Pre-conditions

Ethereum network congestion causes delayed transaction mining

Attack Path

User calls unstakeAndRemoveLP with _deadline = block.timestamp + 10 minutes.

Network congestion delays mining by 15 minutes.

Token transfers and unstaking occur, but removeLiquidityV2 reverts due to an expired deadline.

User’s tokens are locked in the contract until manually refunded.

Impact

  1. Users suffer gas waste (500k gas ≈ $50) and temporary loss of access to transferred tokens.
  2. Protocol accumulates dust tokens, complicating accounting and creating potential attack surfaces.

PoC

No response

Mitigation

No response