Curve - Code Explaind - get_y() | DeFi
ฝัง
- เผยแพร่เมื่อ 3 มิ.ย. 2024
- Curve StableSwap has complex code, difficult to understand, one of them being the function get_y. This video explains how the function get_y is implemented.
github.com/t4sk/defi-by-examp...
#DeFi #Curve #SmartContract #Ethereum
References
Curve curve.fi/
Follow on Twitter: @ProgrammerSmart / programmersmart
Join me on Discord: / discord
Website: smartcontractprogrammer.com - วิทยาศาสตร์และเทคโนโลยี
Awesome video! Love the code explanation videos.
Wonderful, you hit every points
great, now I got to learn vyper to use curve
Thank you very much for your detailed explain about Curve underlying math. It really helps. It would be nice if you can make another video to cover Curve crypto swap math too. It uses gamma to calculate get_dy seems it's a different story to stable swap.
Thank god I found this!!!!
thanks for the video! any idea on how to get the input amount given the output on curve v2?
solve the Curve's equation using Newton's method.
@@smartcontractprogrammer fees are dependent on the post-trade reserves though
Great video!
Can you explain the origin of Amp = A * n ** (n-1)?
how to work vy with solidity contract ? etc import or inheritance thx.
interface
It's there a reason you coded this in vyper over solidity?
Curve is written in Vyper
@@smartcontractprogrammer gotcha. Thx!
Can't thank you enough for covering this material! Doesn't g(y) = 0? Since you're subtracting all the terms from the left. Wouldn't that make the derivative zero everywhere?
here we're using Newton's method to find a specific y* such that g(y*) = 0
the function g(y) is not necessary = 0 for all y
@@smartcontractprogrammer sweet, thanks for clarification
EVM can run in Vyper? I thought it was only Solidity.
Solidity and Vyper compiles down to bytecode that runs on EVM
Can you make a video on the ether honeypot works...where the guy autowithraws ether when the victim tries to send in ether to reterive the tokens...the one where eth private key is publicaly put in groups and stuff..
any links? tx hash?
It was hard to understand
Am I that dumb?
I wonder if there is something like 'getAmountIn' but for curve pool. Like get_x which will return you amount of x needed to get amount of y.