curveresearch / curvesim

Simulates Curve Finance pools
MIT License
155 stars 32 forks source link

Tricrypto `get_dy` implementation #214

Closed chanhosuh closed 1 year ago

chanhosuh commented 1 year ago

Currently CurveCryptoPool.get_dy does not handle 3 coins, only 2. Update the implementation in a clean manner to handle this. Similar test as for 2 coins should work. Reference implementation is the Tricrypto-NG vyper fixture.

allt0ld commented 1 year ago

Fixes #148

chanhosuh commented 1 year ago

Fixes #148

Actually #148 doesn't need get_dy, it needs get_y, which is implemented now. Also, i think probably the price scale needs to be used to make sure the axis range is correct.