Skip to content
This repository has been archived by the owner on Dec 31, 2023. It is now read-only.

Latest commit

 

History

History
30 lines (16 loc) · 1.08 KB

162.md

File metadata and controls

30 lines (16 loc) · 1.08 KB

kutugu

medium

buyToken / sellToken have no expiration time protection

Summary

buyToken / sellToken have no expiration time protection, when tx stays in mempool for a long time before being executed, even in the slippage range, it may also cause losses to the user.

Vulnerability Detail

Assume user wants to buy 100 tokenA for $100, but due to the gasprice is too low to stay in mempool, after some time the tokenA price drops to $0.8, the searcher finds the tx in the mempool, wraps it with a sandwich, extracts MEV $20, and the user loses $20.

Impact

No expiration time protection results in user's tx can still be executed for a long period of time, possibly causing a loss of funds

Code Snippet

Tool used

Manual Review

Recommendation

Add expiration time protection