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

Cryptopool price formula #196

Merged
merged 11 commits into from
Aug 9, 2023
Merged

Cryptopool price formula #196

merged 11 commits into from
Aug 9, 2023

Conversation

chanhosuh
Copy link
Member

@chanhosuh chanhosuh commented Aug 8, 2023

Description

Created methods dydxfee and dydx for the CurveCryptoPool. These are analogous to the same named methods on the other Curve pool classes, i.e. compute spot sprice for a coin pair with and without fee.

Some sanity checking has been done against both 2 and 3-coin vyper fixtures to see the values are reasonable and automated as basic unit tests. Another PR should continue the work of testing more thoroughly against a range of pool balances and parameters.

Closes #178.

Hygiene checklist

  • Changelog entry
  • Everything public has a Numpy-style docstring
    (modules, public functions, classes, and public methods)
  • Pylint score monotonically increased
  • Commit history is cleaned-up with minor changes squashed together
    and descriptive commit messages following Tim Pope's style

Cute Animal Picture

Put a link to a cute animal picture inside the parenthesis-->

@github-actions
Copy link
Contributor

github-actions bot commented Aug 8, 2023

Coverage report

The coverage rate went from 75.16% to 75.75% ⬆️
The branch rate is 62%.

100% of new lines are covered.

Diff Coverage details (click to unfold)

curvesim/pool/cryptoswap/pool.py

100% of new lines are covered (86.18% of the complete file).

@chanhosuh chanhosuh changed the title Crypto price WIP: Crypto price Aug 8, 2023
@chanhosuh chanhosuh marked this pull request as draft August 8, 2023 22:59
@chanhosuh chanhosuh added this to the Cryptopool Sims milestone Aug 8, 2023
@chanhosuh chanhosuh changed the title WIP: Crypto price Cryptopool price formula Aug 9, 2023
@chanhosuh chanhosuh self-assigned this Aug 9, 2023
@chanhosuh chanhosuh marked this pull request as ready for review August 9, 2023 16:57
Copy link
Collaborator

@allt0ld allt0ld left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@nagakingg
Copy link
Collaborator

Looks good

Agreed! This is an exciting one

@chanhosuh chanhosuh merged commit d44cdc7 into main Aug 9, 2023
13 checks passed
@chanhosuh chanhosuh deleted the crypto-price branch August 9, 2023 18:57
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.

price
3 participants