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

Support safe disposal of faulty RAMM pools #25

Merged
merged 23 commits into from
Apr 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
dd221ef
Create sketch of RAMM deletion function
rockbmb Apr 21, 2024
a5ded03
Transfer RAMM balances and collected fees upon deletion (WIP)
rockbmb Apr 21, 2024
8c7ccce
Remove unnecessary `&` from new method syntax operation
rockbmb Apr 21, 2024
04102f5
Fully account for deleted RAMM's balances and fees
rockbmb Apr 21, 2024
82a9ed6
Handle the deleted RAMM's LP token `Bag` of `Supply`es
rockbmb Apr 21, 2024
842e63e
Introduce `LPTSupplyBag` to manage LP token `Supply` after RAMM deletion
rockbmb Apr 22, 2024
52b6d65
Comment `LPTSupplyBag` structure
rockbmb Apr 22, 2024
e7cc252
Rename fields in LP token bag struct
rockbmb Apr 22, 2024
46b9a78
Rework LP token supply handling in RAMM deletion func.
rockbmb Apr 22, 2024
894c3f5
Add missing `store` ability to LP token supply bag
rockbmb Apr 22, 2024
1257bb4
Document 3-asset RAMM deletion function
rockbmb Apr 22, 2024
2a86c09
Expand comment's abort conditions for 3-asset deletion function
rockbmb Apr 22, 2024
064defb
Add note about RAMM deletion function
rockbmb Apr 22, 2024
86e4f69
Add sketch of test for 3-asset RAMM deletion
rockbmb Apr 22, 2024
adeece7
Correct type from `Supply<Asset>` to `Supply<LP<Asset>>` in RAMM dele…
rockbmb Apr 22, 2024
19a18cd
Check returned amounts from RAMM in deletion test
rockbmb Apr 22, 2024
d7c8a38
Check for RAMM and admin cap deletion in test
rockbmb Apr 22, 2024
185f2c2
Add basic `LPTSupplyBag` API for tests
rockbmb Apr 22, 2024
6739875
Comment `LPTSupplyBag` functions
rockbmb Apr 22, 2024
8c59f3e
Test correct reception of LP tokens' `Supply` objects (WIP)
rockbmb Apr 22, 2024
78e5449
Test LP token `Supply` objects for all 3 of RAMM's assets
rockbmb Apr 22, 2024
f903b28
Update `Cargo.lock` from running `mainnet update`
rockbmb Apr 23, 2024
5109a9d
Update `published-at` field for `ramm-sui`
rockbmb Apr 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
103 changes: 68 additions & 35 deletions ramm-sui-deploy/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions ramm-sui/Move.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ edition = "2024.beta"
#published-at = "0xd4e097d82d73dc5d152f277bd17ba7980cad4c0b238c3609517cbd0cf686ddd1"
# Upgraded to ID:
#published-at = "0xcb6640194b37023f6bed705f40ff22883eb6007d4c69e72c317c64671f9f6b29"
# Upgraded to ID:
# published-at = "0xce6fe657125970687c9065815974a351fe7c0389589308816740bd5197c220a4"
# The above ID was done in the `imbr-ratio-event` branch, as otherwise it would not be possible
# to upgrade the package - a public function's signature was altered since that branch's PR was
# merged to `main`: `ramm_sui::math::{check_imbalance_ratios, imbalance_ratios}`

[dependencies]
Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "mainnet" }
Expand Down
Loading