Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3-coin crypto pool #159

Merged
merged 121 commits into from
Jul 26, 2023
Merged

3-coin crypto pool #159

merged 121 commits into from
Jul 26, 2023

Commits on Jul 25, 2023

  1. Begin 3-coin enhancement

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    13462f9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f13381d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6d40228 View commit details
    Browse the repository at this point in the history
  4. Refactor get_dy

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    6b105f3 View commit details
    Browse the repository at this point in the history
  5. Pass get_dy test

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    50bd41c View commit details
    Browse the repository at this point in the history
  6. Pass test_exchange

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    2d52882 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    3f532f3 View commit details
    Browse the repository at this point in the history
  8. Adjustments to tweak price

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    1305ef7 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    3c70b32 View commit details
    Browse the repository at this point in the history
  10. Cleanup tweak_price

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    937bcc5 View commit details
    Browse the repository at this point in the history
  11. Extend fee calc

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    6037ab8 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    fd19e10 View commit details
    Browse the repository at this point in the history
  13. Fix geometric mean

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    db5c976 View commit details
    Browse the repository at this point in the history
  14. Further fixes

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    2521889 View commit details
    Browse the repository at this point in the history
  15. Placeholder commit: calc change breaks test

    `test_get_virtual_price` works fine before this but gets a several
    hundred wei discrepancy after changing the calc.
    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    09b5123 View commit details
    Browse the repository at this point in the history
  16. Fix fee typo

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    282fc7f View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    8e89c42 View commit details
    Browse the repository at this point in the history
  18. Some cleanup

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    677e3e0 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    4e63faa View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    bd2dcad View commit details
    Browse the repository at this point in the history
  21. Branch on n_coins for now

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    2b6a3de View commit details
    Browse the repository at this point in the history
  22. Branch in fee calc too

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    9a83598 View commit details
    Browse the repository at this point in the history
  23. Remove stray line

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    228b938 View commit details
    Browse the repository at this point in the history
  24. Fix square root issue

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    a9f47aa View commit details
    Browse the repository at this point in the history
  25. Finish fixing unit tests

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    84f1975 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    3cd0390 View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    2feba4b View commit details
    Browse the repository at this point in the history
  28. Cleanup token fee calc

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    40f5c49 View commit details
    Browse the repository at this point in the history
  29. Update tweak price and add_liquidity price logic

    Basically use the same index arg and logic as in the original
    tricrypto pool.  For n == 2, this should amount to the same
    calculations with hopefully minor differences in results.
    
    Fixed the price update in `add_liquidity` to handle n coins.
    Similar changes made elsewhere.
    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    5c58c0f View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    f96aaa8 View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    aebb19b View commit details
    Browse the repository at this point in the history
  32. Configuration menu
    Copy the full SHA
    7c6dc73 View commit details
    Browse the repository at this point in the history
  33. Fix sqrt bug

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    ba61406 View commit details
    Browse the repository at this point in the history
  34. Add pytest debug option

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    d0a4664 View commit details
    Browse the repository at this point in the history
  35. Slight cleanup

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    8516a67 View commit details
    Browse the repository at this point in the history
  36. Remove inexact asserts

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    d050a3a View commit details
    Browse the repository at this point in the history
  37. Configuration menu
    Copy the full SHA
    46eeb6d View commit details
    Browse the repository at this point in the history
  38. Use n=2 branch

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    9ccd3cd View commit details
    Browse the repository at this point in the history
  39. Fix mutation bug

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    2181d22 View commit details
    Browse the repository at this point in the history
  40. Add tricrypto fixtures

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    5d299a1 View commit details
    Browse the repository at this point in the history
  41. Start n=3 unit tests

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    79ea7fa View commit details
    Browse the repository at this point in the history
  42. Configuration menu
    Copy the full SHA
    0ca8d30 View commit details
    Browse the repository at this point in the history
  43. Fix price packing and init values for fixture

    - prices pack in reverse order
    - needed to update values to be consistent with each other
    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    b50ccd2 View commit details
    Browse the repository at this point in the history
  44. Configuration menu
    Copy the full SHA
    902d4ca View commit details
    Browse the repository at this point in the history
  45. Pass test once

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    7ff2ba8 View commit details
    Browse the repository at this point in the history
  46. Add tolerance for tests

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    acf412b View commit details
    Browse the repository at this point in the history
  47. Cleanup imports

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    0b039cc View commit details
    Browse the repository at this point in the history
  48. Configuration menu
    Copy the full SHA
    17d8bcc View commit details
    Browse the repository at this point in the history
  49. Comment-out unneeded code

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    27541f6 View commit details
    Browse the repository at this point in the history
  50. Make linters happy

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    67c4545 View commit details
    Browse the repository at this point in the history
  51. Remove file for future PR

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    df6586d View commit details
    Browse the repository at this point in the history
  52. Cleanup __init__

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    aeb0331 View commit details
    Browse the repository at this point in the history
  53. Extend safety checks to 3 coins

    Also minor cleanup with abs value
    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    ec625d7 View commit details
    Browse the repository at this point in the history
  54. Configuration menu
    Copy the full SHA
    82485eb View commit details
    Browse the repository at this point in the history
  55. Configuration menu
    Copy the full SHA
    e005fd8 View commit details
    Browse the repository at this point in the history
  56. Configuration menu
    Copy the full SHA
    4478b6b View commit details
    Browse the repository at this point in the history
  57. Update initialize_pool

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    fda3f48 View commit details
    Browse the repository at this point in the history
  58. Some cleanup for now

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    0b7bed1 View commit details
    Browse the repository at this point in the history
  59. Fix assert

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    3dfd29b View commit details
    Browse the repository at this point in the history
  60. Cleanup test helper

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    a1a3422 View commit details
    Browse the repository at this point in the history
  61. Add multiple swap test

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    1096d0c View commit details
    Browse the repository at this point in the history
  62. Failing last prices assert

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    12bd647 View commit details
    Browse the repository at this point in the history
  63. Configuration menu
    Copy the full SHA
    8fc5aeb View commit details
    Browse the repository at this point in the history
  64. Fix float division

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    30628d6 View commit details
    Browse the repository at this point in the history
  65. Configuration menu
    Copy the full SHA
    c60a756 View commit details
    Browse the repository at this point in the history
  66. Test get_p (failing)

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    378f24c View commit details
    Browse the repository at this point in the history
  67. Configuration menu
    Copy the full SHA
    1cd89a9 View commit details
    Browse the repository at this point in the history
  68. Configuration menu
    Copy the full SHA
    40cc533 View commit details
    Browse the repository at this point in the history
  69. Update unit tests

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    c2cb372 View commit details
    Browse the repository at this point in the history
  70. Configuration menu
    Copy the full SHA
    864448d View commit details
    Browse the repository at this point in the history
  71. Configuration menu
    Copy the full SHA
    587d4b1 View commit details
    Browse the repository at this point in the history
  72. Further vyper translation

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    9d4baa0 View commit details
    Browse the repository at this point in the history
  73. Fail the test

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    01c4cda View commit details
    Browse the repository at this point in the history
  74. Fix geometric mean

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    e50a4b0 View commit details
    Browse the repository at this point in the history
  75. Fix typo in _cbrt

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    1ec1da6 View commit details
    Browse the repository at this point in the history
  76. Add get_y

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    5110441 View commit details
    Browse the repository at this point in the history
  77. Configuration menu
    Copy the full SHA
    8314221 View commit details
    Browse the repository at this point in the history
  78. Refactor pool for updates

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    476b519 View commit details
    Browse the repository at this point in the history
  79. Fix calc error

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    fe51077 View commit details
    Browse the repository at this point in the history
  80. Update ng constants

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    2b523dd View commit details
    Browse the repository at this point in the history
  81. Fix type error

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    dea0ee2 View commit details
    Browse the repository at this point in the history
  82. Update constants for tests

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    38a4d9a View commit details
    Browse the repository at this point in the history
  83. Fix another typo

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    e9b9894 View commit details
    Browse the repository at this point in the history
  84. Pass get_y test

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    c0ec7b2 View commit details
    Browse the repository at this point in the history
  85. Fix the tweak call

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    ae22646 View commit details
    Browse the repository at this point in the history
  86. Make flake8 happy

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    8037870 View commit details
    Browse the repository at this point in the history
  87. Fix 2 coin test

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    072a675 View commit details
    Browse the repository at this point in the history
  88. Configuration menu
    Copy the full SHA
    013905e View commit details
    Browse the repository at this point in the history
  89. Configuration menu
    Copy the full SHA
    f9a867b View commit details
    Browse the repository at this point in the history
  90. Configuration menu
    Copy the full SHA
    486fb46 View commit details
    Browse the repository at this point in the history
  91. Configuration menu
    Copy the full SHA
    6729911 View commit details
    Browse the repository at this point in the history
  92. Reproduce failure from CI

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    1ca1db2 View commit details
    Browse the repository at this point in the history
  93. Configuration menu
    Copy the full SHA
    e352ce4 View commit details
    Browse the repository at this point in the history
  94. Refactor for readability

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    66c6bb2 View commit details
    Browse the repository at this point in the history
  95. Configuration menu
    Copy the full SHA
    2c7eeae View commit details
    Browse the repository at this point in the history
  96. Cleanup constants

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    4d72274 View commit details
    Browse the repository at this point in the history
  97. Configuration menu
    Copy the full SHA
    332b24b View commit details
    Browse the repository at this point in the history
  98. Configuration menu
    Copy the full SHA
    458fd27 View commit details
    Browse the repository at this point in the history
  99. Configuration menu
    Copy the full SHA
    9469747 View commit details
    Browse the repository at this point in the history
  100. Configuration menu
    Copy the full SHA
    20905ba View commit details
    Browse the repository at this point in the history
  101. Use snekmate wad for alpha

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    5375faa View commit details
    Browse the repository at this point in the history
  102. Configuration menu
    Copy the full SHA
    d28fd21 View commit details
    Browse the repository at this point in the history
  103. Configuration menu
    Copy the full SHA
    0984f75 View commit details
    Browse the repository at this point in the history
  104. Pass wad_exp test

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    8aa14d0 View commit details
    Browse the repository at this point in the history
  105. Configuration menu
    Copy the full SHA
    6e3e858 View commit details
    Browse the repository at this point in the history
  106. Fix EMA update to include price cap

    Test passes now but we need to remove the kludge
    with the fixed value of `ma_time`.
    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    c90a276 View commit details
    Browse the repository at this point in the history
  107. Configuration menu
    Copy the full SHA
    02850bb View commit details
    Browse the repository at this point in the history
  108. Configuration menu
    Copy the full SHA
    fb91fcf View commit details
    Browse the repository at this point in the history
  109. Solve the c mystery! (credit to benny)

    Vyper will do signed integer division which rounds toward zero
    and thus behaves differently when dividing a negative number.
    
    Solving this issue allows us to reproduce to-the-wei results
    for tricrypto-ng operations.
    
    Tests updated to check for exact values.
    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    cb460e7 View commit details
    Browse the repository at this point in the history
  110. Pass the get_y test

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    12e447c View commit details
    Browse the repository at this point in the history
  111. Fix sqrt_arg

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    e92b3f2 View commit details
    Browse the repository at this point in the history
  112. Handle sign for root_K0

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    d1934ef View commit details
    Browse the repository at this point in the history
  113. Lower dx_perc max for test

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    06bcfdf View commit details
    Browse the repository at this point in the history
  114. Cleanup comments

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    6ecae8d View commit details
    Browse the repository at this point in the history
  115. Configuration menu
    Copy the full SHA
    61022b6 View commit details
    Browse the repository at this point in the history
  116. Configuration menu
    Copy the full SHA
    a1d682a View commit details
    Browse the repository at this point in the history
  117. Extend test coverage

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    8960e9a View commit details
    Browse the repository at this point in the history
  118. Configuration menu
    Copy the full SHA
    b23db08 View commit details
    Browse the repository at this point in the history
  119. Remove unused test helpers

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    ac2150e View commit details
    Browse the repository at this point in the history
  120. Use mpz in newton_D

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    4f0902d View commit details
    Browse the repository at this point in the history
  121. Add changelog entry

    chanhosuh committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    d4c0ebb View commit details
    Browse the repository at this point in the history