๐๏ธ Day 86 โ Solving Damn Vulnerable DeFi Challenges ๐ ๏ธ
๐น Current Challenge: Puppet v3 ๐ต๏ธโโ๏ธ
๐ Key Learnings:
โ Learned how ticks simplify liquidity provision by specifying tickLower and tickUpper ranges
โ Learned how ticks can be converted to prices and vice versa using the standard formula
โ Learned how TWAP values are fetched using the consult function from a pool contract
โ Learned that when creating a pool via NonfungiblePositionManager, it expects the initial price in โprice ร 2^96 (Q64.96 fixed-point format)
โ Understood the developer intent behind the challenge
๐ก Notes:
- Still figuring out whether TWAP can be manipulated when a protocol does not use it correctly
- Most of these concepts are still at a high level for me; I have not yet gone deep into how they work internally
๐๏ธ Day 85 โ Solving Damn Vulnerable DeFi Challenges ๐ ๏ธ
๐น Current Challenge: Puppet v2 โ๏ธ
๐ Key Learnings:
โ Learned how Uniswap V2 Router simplifies swaps by routing everything through factory and pair contracts
โ Understood that Uniswap V2 can handle any ERC20 โ ERC20 token swaps through liquidity pairs
โ Understood basic router flow and how trades are executed indirectly through liquidity pools
โ Saw that Puppet v2 uses the same pricing weakness as Puppet v1, but now through Uniswap V2 liquidity
๐ก Security Mindset:
Donโt trust onchain DEX prices as a source of truth , they can be easily manipulated ๐จ
๐ก Reflection:
Even decentralized prices can be unreliable when liquidity is low. Protocols must not assume AMM prices are always โfairโ or accurate.
๐๏ธ Day 84 โ Solving Damn Vulnerable DeFi Challenges ๐ ๏ธ
๐น Current Challenge: Puppet v1 โ๏ธ
yo i canโt even hold the urge for 3 days to grind ๐ญ been slacking on school work too so Iโm swapping peak hours for school sessions and non-peak hours for coding
๐ Key Learnings:
โ Understood the risk of using Uniswap v1 as a price oracle
โ Learned how token swaps can manipulate AMM reserves and distort pricing
โ Saw how lending logic can be broken when it depends on spot price from external liquidity pools
๐ก Security Mindset:
Never trust AMM spot price as a source of truth , liquidity can be manipulated to game collateral calculations ๐จ
๐ก Reflection:
Small changes in liquidity can completely break financial assumptions in DeFi systems
๐๏ธ Day 83 โ Solving Damn Vulnerable DeFi Challenges ๐ ๏ธ
๐น Current Challenge: Puppet v1 ๐ต๏ธโโ๏ธ
I'm going to pause my grinding for a while since exams are approaching. Maybe after I round everything up, Iโll continue the grind again.
Today was all about AMMs and DeFi.
๐ Key Learnings:
โ Learnt about liquidity and how liquidity providers earn their share for contributing funds
โ Understood the math behind x * y = k, why both sides must maintain equal value, and the problems AMMs solve
โ Found out that Vyper is quite similar to Solidity, just more minimalistic
โ Understood how TWAP is used in Uniswap V2 to reduce price manipulation risks
๐ก Security Mindset:
Price is not truth in DeFi, liquidity depth and oracle design determine how reliable that truth really is ๐จ
๐ก Reflection:
Math quietly controls almost everything in DeFi, from pricing to incentives to security itself. The deeper I learn, the more it feels like the future will belong to people who truly understand systems and numbers