๊ฐ€์ž… ํ›„ ์ดˆ๋Œ€ ๋งํฌ๋ฅผ ๊ณต์œ ํ•˜๋ฉด ๋™์˜์ƒ ์žฌ์ƒ ๋ฐ ์ดˆ๋Œ€ ๋ณด์ƒ์„ ๋ฐ›์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

brimigs
@brimigs
building things @solana
๊ฐ€์ž… August 2021
337 ํŒ”๋กœ์ž‰ ์ค‘    8.9K ํŒฌ
Uniswap-style AMMs lose traders money on stablecoin swaps. Not from fees โ€” from math. x*y=k spreads liquidity across every price from zero to infinity. But USDC/USDT trades at $1 โ€” so almost all of that liquidity sits where no trade will ever happen, and traders eat the difference as slippage. Curve's StableSwap invariant fixes this: flat near the peg (nearly zero slippage), constant product at the extremes (pool can't be drained). New whiteboard video: the math visualized side by side, then building a working stable swap AMM on Solana with Rust and Anchor. Full video linked in this thread ๐Ÿงต๐Ÿ‘‡
๋” ๋ณด๊ธฐ