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

asset value normalization #28

Merged
merged 60 commits into from
Jan 17, 2024
Merged

asset value normalization #28

merged 60 commits into from
Jan 17, 2024

Conversation

iboss-ptk
Copy link
Collaborator

  • 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

@iboss-ptk iboss-ptk merged commit c2485fc into main Jan 17, 2024
1 check failed
@iboss-ptk iboss-ptk deleted the asset-value-normalization branch January 17, 2024 05:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant