-
Notifications
You must be signed in to change notification settings - Fork 610
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* New Pool interface * Make balancer pool implement new API * Comment out files to fix at the end * Update most of keeper for new interface - Does not update JoinPool, will be done in next commit This implements swap, and exit pool for the keeper, both using the AMM interface correctly * Fix many of the cross-module breaks * Finish ExitPool messages for this PR * JoinPool logic * Tests compiling * Test bug fixes - Swap spot price args temporarily to be the old style (which should change to new one) - Spot price rounding fix (needed weight to be decimal) - Change tests to get spot price from keeper, not pool directly - Fix bug in CalcAmountOutGivenIn - Add accounting for TokenInMaxs being nil - Add breaking change note for tokenInMaxs needs 0 coins or all coins * Comment out tests for unimplemented functions, fix lint * Fix CLI tests * Fix long-standing CLI bug for max amounts in * Address roman's pr review comments
- Loading branch information
1 parent
cf910d6
commit f1389ee
Showing
42 changed files
with
1,623 additions
and
1,493 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# List of every known client breaking change in current AMM refactor | ||
|
||
## Queries | ||
|
||
* PoolAssetsQuery | ||
* Deleted | ||
* New query is TotalLiquidity (TODO: Write this query) | ||
* Or if you wanted the pool weights, you must now query the pool itself. | ||
* Please give feedback if more queries should be exposed that are pool-type specific | ||
* QuerySpotPrice | ||
* The `withswapfee` param is now removed. If this was needed for anything, please flag it. Its mainly removed due to not having a clear use, and a better query can probably be crafted for. | ||
* Rename TokenInDenom to QuoteAssetDenom | ||
* Rename TokenOutDenom to BaseAssetDenom | ||
|
||
## Messages | ||
|
||
* (TODO) Rename JoinPool -> JoinPoolNoSwap | ||
* JoinPoolNoSwap | ||
* TokenInMaxs must either contain every token in pool, or no tokens | ||
* JoinPoolSwapExternAmountIn | ||
* Replace sdk.Coin w/ sdk.Coins | ||
* (TODO) Consider renaming to JoinPool, hesistant due to collison with old message | ||
* (TODO) Update the version for all of gamm's proto files | ||
* ExitPool | ||
* Before the message would fail if you had too few shares to get a single token out for any given denom. Now you can 0 of one side out, if the min amount is also not present. | ||
* ExitSwapShareAmountIn | ||
* Switched to a more inefficient algorithm for now, so gas numbers will be much higher. | ||
* Messages now have responses | ||
|
||
## Events | ||
|
||
## Error message | ||
|
||
I anticipate there are lots of error messages that have changed. This is a best-attempt to log ones we know that we changed | ||
|
||
* ExitPool when slippage was too high | ||
|
||
## Gas numbers |
Oops, something went wrong.