-
Notifications
You must be signed in to change notification settings - Fork 589
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes: #1277 ## What is the purpose of the change This PR adds scaling factors to current stable swap implementation. For context on why scaling factors are needed: Suppose 1000 stablecoin1 equals 1 dollars, 100 stablecoin2 equals 2 dollars due to precision difference. Currently we compare each pool assets without considering these differences in precisions in `calcOutAmtGivenIn`, `calcInAmtGivenOut`, `SpotPrice`. This PR adds a field of scaling factors for each pool asset so that when internally calculating in `amm.go`, we compare two different assets upon same precision points. We do this by feeding the internal functions assets / scaling factors. ## Brief change log - Adds scaling factor to stableswap *(for example:)* - *The metadata is stored in the blob store on job creation time as a persistent artifact* - *Deployments RPC transmits only the blob storage reference* - *Daemons retrieve the RPC data from the blob cache* ## Testing and Verifying This change is a trivial rework / code cleanup without any test coverage. ## Documentation and Release Note - Does this pull request introduce a new feature or user-facing behavior changes? yes - Is a relevant changelog entry added to the `Unreleased` section in `CHANGELOG.md`? no - How is the feature or change documented? not applicable
- Loading branch information
1 parent
fd7e073
commit 5e9feb5
Showing
4 changed files
with
205 additions
and
44 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.