็™ป้Œฒใ—ใฆๆ‹›ๅพ…ใƒชใƒณใ‚ฏใ‚’ๅ…ฑๆœ‰ใ™ใ‚‹ใจใ€ๅ‹•็”ปๅ†็”Ÿๅ ฑ้…ฌใจ็ดนไป‹ๅ ฑ้…ฌใ‚’็ฒๅพ—ใงใใพใ™ใ€‚

Nethermind Security
@NethermindSec
Comprehensive security from @Nethermind, from audits to formal verification. Book now:
ๅ‚ๅŠ  September 2024
46 ใƒ•ใ‚ฉใƒญใƒผไธญ    1.6K ใƒ•ใ‚กใƒณ
Every pending transaction in the mempool is a statement of intent. Bots read it before it settles and front-run what's worth front-running. The contract calls ๐˜ˆ๐˜”๐˜”.๐˜ด๐˜ธ๐˜ข๐˜ฑ(๐˜ต๐˜ฐ๐˜ฌ๐˜ฆ๐˜ฏ๐˜๐˜ฏ, ๐˜ข๐˜ฎ๐˜ฐ๐˜ถ๐˜ฏ๐˜ต๐˜๐˜ฏ, ๐Ÿ˜). That zero is 100% slippage tolerance. A frontrunner inflates the price, lets the swap settle, sells back at profit. A 10,000 USDC trade returns 1 ETH instead of 5. ๐˜ณ๐˜ฆ๐˜ฒ๐˜ถ๐˜ช๐˜ณ๐˜ฆ(๐˜ข๐˜ค๐˜ต๐˜ถ๐˜ข๐˜ญ๐˜ˆ๐˜ฎ๐˜ฐ๐˜ถ๐˜ฏ๐˜ต๐˜–๐˜ถ๐˜ต >= ๐˜ฎ๐˜ช๐˜ฏ๐˜ˆ๐˜ฎ๐˜ฐ๐˜ถ๐˜ฏ๐˜ต๐˜–๐˜ถ๐˜ต) lets the user set their worst acceptable price. If a bot moves the price outside that range, the swap reverts. The attacker burns gas for nothing. The mempool stays public. Defense lives in the code, or it doesn't exist.
ใ‚‚ใฃใจ่ฆ‹ใ‚‹