Block: 69

Author: AuditProfile

AuditProfile

Security blog

Gas swap in

#swap

#uniswap

#slot0

Hint

What do you know about slot0?

Answer

An attacker can simply manipulate the sqrtPriceX96 and if the Uniswap.swap function is called with the sqrtPriceX96, the token will be bought at a higher price and the attacker would run the transaction to sell; thereby earning gains but causing a loss of funds to whoever called those functions. It's better to use the TWAP function to get the value of sqrtPriceX96.

Регистрация прошла успешно! Спасибо за внимание!

loader