Temporarily support deletion of RAMM pools
Closed this issue · 1 comments
rockbmb commented
Following #24, and its fix #22, the currently existing SUI/USDC/USDT
pool cannot be fixed, and must thus be dismantled.
Its funds were solely used for testing and no user interacted with it, so its deletion will not be onerous or time-consuming; however, it would be good to formulate a plan for such a situation when it eventually does involve users' funds.
rockbmb commented
Here is a possible set of practices, from #25
/*
IMPORTANT NOTE
Regarding RAMM deletion functions
Under normal circumstances, this module should NOT expose deletion functions.
After https://github.com/aldrin-labs/ramm-sui/issues/24 was found, pools that had been created
before the issue was found/corrected needed to be destroyed.
For this kind of situation, a possible resolution could be:
1. To upgrade the package P, with which the faulty RAMMs were published, into P', making
deletion functions temporarily available as `publiic`
2. Delete the affected RAMM pools
- After the public launch, recovered funds/fees can be used to reimburse traders
- The `LPTSupplyBag` object can also be used to make liquidity providers whole by allowing
redemptions of LP tokens belonging to defunct pools
3. Re-publish (*not* upgrade) the package as P'', with the deletion functions made `public(package)`
Development can then continue in both separate strands:
* P' can be used for reimbursement and redemption purposes - note that `LPTSupplyBag` does not
have an API for that reason: as required, it can be written
* P'' serves as the new development and deployment basis, with the above workflow reapplied if
necessary
*/