seelabs
3f7ce939c8
fix amendment: AMM swap should honor invariants: ( #5002 )
...
The AMM has an invariant for swaps where:
new_balance_1*new_balance_2 >= old_balance_1*old_balance_2
Due to rounding, this invariant could sometimes be violated (although by
very small amounts).
This patch introduces an amendment `fixAMMRounding` that changes the
rounding to always favor the AMM. Doing this should maintain the
invariant.
Co-authored-by: Bronek Kozicki
Co-authored-by: thejohnfreeman
2024-04-25 21:15:19 -04:00
..
2020-04-23 10:02:04 -07:00
2023-10-18 13:01:12 -07:00
2022-10-13 15:44:43 -07:00
2024-03-05 16:43:31 -05:00
2024-04-25 21:15:19 -04:00
2023-07-12 13:52:50 -04:00
2024-04-25 21:15:19 -04:00
2022-12-19 17:35:35 -08:00
2023-07-13 18:00:32 -07:00
2023-08-21 16:15:08 -07:00
2020-04-23 10:02:04 -07:00
2021-01-08 14:43:06 -05:00
2024-03-22 11:09:54 -04:00
2020-04-23 10:02:04 -07:00
2020-09-01 10:37:19 -07:00
2023-08-21 16:15:08 -07:00
2023-03-28 09:03:25 -07:00
2023-10-30 14:05:46 -07:00
2023-08-21 16:15:08 -07:00
2021-12-14 17:47:38 -08:00
2023-03-28 09:03:25 -07:00
2024-03-05 12:02:53 -05:00
2023-08-17 18:43:47 -07:00
2024-03-05 12:02:53 -05:00
2023-03-28 09:03:25 -07:00
2024-03-05 12:02:53 -05:00
2024-04-24 13:54:46 -04:00
2023-08-17 18:43:47 -07:00
2024-02-02 14:27:21 -08:00
2024-01-19 21:55:57 -08:00
2023-03-20 14:47:46 -07:00
2024-01-19 21:55:57 -08:00
2020-04-23 10:02:04 -07:00
2024-02-26 06:28:26 -05:00
2020-04-23 10:02:04 -07:00
2023-08-21 16:15:08 -07:00
2024-03-22 15:28:16 -04:00
2024-04-19 11:32:15 -05:00
2023-02-02 16:20:35 -08:00
2020-04-23 10:02:04 -07:00
2023-03-28 09:03:25 -07:00
2023-06-22 22:20:25 -07:00
2024-04-24 13:54:46 -04:00
2020-04-23 10:02:04 -07:00
2021-01-08 14:43:06 -05:00
2023-10-05 16:25:16 -07:00
2023-06-27 17:52:15 -07:00
2023-02-07 15:43:28 -08:00
2024-04-19 11:32:15 -05:00
2021-03-11 14:35:31 -08:00
2023-12-20 09:30:12 -08:00
2023-08-21 16:15:08 -07:00
2024-04-24 13:54:46 -04:00
2024-03-05 12:02:53 -05:00
2024-03-05 12:02:53 -05:00
2024-03-19 12:13:52 -04:00
2024-04-19 11:32:15 -05:00