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

Add cryptoswap liquidity density metric #211

Closed
wants to merge 1 commit into from

Conversation

nagakingg
Copy link
Collaborator

@nagakingg nagakingg commented Aug 22, 2023

Description

  • Use pool.get_min_trade_size() for cryptoswap liquidity density estimate
  • Add virtual price and block timestamp to get_cryptoswap_pool_state()
  • Reorganize PriceDepth metric to minimizie duplication
  • Re-add PriceDepth to default metrics

Closes #206

Hygiene checklist

  • Changelog entry
  • Everything public has a Numpy-style docstring
    (modules, public functions, classes, and public methods)
  • 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-->

@nagakingg nagakingg force-pushed the cryptoswap-liquidity-density branch 2 times, most recently from ab798e5 to cae5c27 Compare August 22, 2023 20:41
@github-actions
Copy link
Contributor

github-actions bot commented Aug 22, 2023

Coverage report

The coverage rate went from 78.27% to 79.8% ⬆️
The branch rate is 66%.

100% of new lines are covered.

Diff Coverage details (click to unfold)

curvesim/metrics/metrics.py

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

curvesim/metrics/state_log/pool_state.py

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

curvesim/pipelines/common/init.py

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

@nagakingg nagakingg force-pushed the cryptoswap-liquidity-density branch 2 times, most recently from cb21fdb to 0fc26a9 Compare August 23, 2023 18:18
@nagakingg nagakingg marked this pull request as ready for review August 23, 2023 18:19
@nagakingg
Copy link
Collaborator Author

nagakingg commented Aug 23, 2023

Tests at 0fc26a9 test against previous data (ignoring the liquidity density metric). After that the test.ci (volume limited arb) data was regenerated, and I re-tested to ensure consistency.

I also tested main vs. this branch locally, including the liquidity density metric for stableswap pools, and it was successful.

@nagakingg nagakingg marked this pull request as draft September 5, 2023 15:45
@nagakingg
Copy link
Collaborator Author

Converted back to draft pending more testing and formalized tests.

- Use pool.get_min_trade_size() for cryptoswap LD estimate
- Add virtual price and block timestamp to cryptoswap state log
- Reorganize PriceDepth metric to minimize duplication
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.

Fix liquidity density metric for cryptoswap
1 participant