DeFi Attack | Our monitoring system reported that XSTABLE.PROTOCOL was attacked (etherscan.io/tx/0x873f7c77d…), and the loss is around 27.13 WETH.
This is a Logic Vulnerability.
#DeFi #ETH #CryptoSecurity
2.1/ The Attack Process
Attacker: 0x334f3606886456537d0eb616497e770cbd2fbe5d
Mal Contract: 0x4fbb8840d37a21e38c8e438db27aae7bb91af052
Pool1: UniswapV2 WETH/USDT
Pool2: UniswapV2 WETH/XST
2.2/
1)Flashloan
from Pool1: 77.99 WETH
2)Swap in Pool2
77.99 WETH for 403,258 XST
3)Transfer 92,415 XST -> Pool2
4)Pool2.skim(Pool2)
Pool2 -> Pool2: 92.415 XST
..skims
5)Pool2.skim(Attacker)
6)Swap in Pool2:
3,413,549 XST for 105.35 WETH
Profit: 27.13 WETH
3/ The Vulnerability
$XST encourage users to purchase XST in the pool, users who purchase XST will be additionally rewarded with some XST. However, it has a logic problem of identifying "purchasing XST": when the sender is SupportedPool, it is considered "purchasing XST".
4/ This judgment method ignores that the sender of the transfer caused by the skim function of the Uniswap Pool is also the Uniswap Pool.
The correct hash:
etherscan.io/tx/0x873f7c77d…
Share this Scrolly Tale with your friends.
A Scrolly Tale is a new way to read Twitter threads with a more visually immersive experience.
Discover more beautiful Scrolly Tales like this.
