-
Notifications
You must be signed in to change notification settings - Fork 6
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
asset value normalization #28
Merged
Merged
Conversation
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
Collaborator
iboss-ptk
commented
Jan 17, 2024
- Add todos for place that needs changes
- expand pool_asset_denoms to pool_asset_configs for instantiate
- add to for migraiton
- store asset with normalization factor
- prevent 0 normalization factor + add tests
- handle transmute with normalization factor
- implement calculation logic that handles overflow and rounding for normalization
- use different normalization & rounding based on amount constraint
- refactor transmute function for better testability
- add tests for rounding
- note on what to do next
- update thoughts on alloyed asset norm factor
- alloy asset value conversion
- expand interface for testing with norm factor
- make swap aware of the calc
- fix intemeidate issue
- add pool value invariant check with normalized value
- fix cllippy lints
- refactor swap to alloyed
- add normalization to alloyed swap
- refactor
- refactor SwapExactAmountIn
- refactor SwapExactAmountOut
- assign method name once
- move all swap related to swap mod
- refactor: swap_non_alloyed_exact_amount_in
- refactor: swap_non_alloyed_exact_amount_out
- update osmosis-std / test-tube version
- use swap variant instead of bunch of ifs
- normalize coins in
- normalize coins in
- add math module
- update test to use lcm from math module
- update weight calculation
- add tests
- make a new state
- set normalization factor function
- reset change limiters on new normalization factor / new asset
- remove ability to set arbritary norm factor afterwards since it will change value of alloyed token:
- init alloyed asset normalization factor
- list all asset config includes alloyed asset config
- remove unnescessary todo
- rescale normalization factor
- impl migration
- clippy
- add more migration test
- add reset limiter
- setup for cargo mutants
- add test to reset change limiter states'
- test reset limiters
- use osmosis-std / test-tube non-beta
- add test for swap variant
- add tests for swap_tokens_to_alloyed_asset
- add tests for swap_alloyed_asset_to_tokens
- add swap exact amount in tests and improve error msg
- add test_swap_non_alloyed_exact_amount_out
- update osmosis deps version to v22
- fix non backward compat state key
- fix lint
- update worksapce resolver
…change value of alloyed token:
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.