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

Feat: mCap_check #12973

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Feat: mCap_check #12973

wants to merge 6 commits into from

Conversation

0xpeluche
Copy link
Contributor

@0xpeluche 0xpeluche commented Jan 6, 2025

Added a check to ensure that no token of a protocol exceeds its own market cap during the computeTvl, preventing a token from being counted if an incorrect price is injected while a market cap exists.
If no market cap is found, it is suggested to act cautiously, and the token is included in the TVL

If a market cap is found and CoinGecko provides an updated price, the updated CoinGecko price is used, and the token is counted. However, if the market cap is exceeded and there is no updated price on CoinGecko, the token is ignored

node test.js .\projects\pendle\index.js

image

=========================================

node test.js .\projects\unitrade\index.js

image

@0xpeluche 0xpeluche self-assigned this Jan 6, 2025
@0xpeluche 0xpeluche marked this pull request as ready for review January 6, 2025 10: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.

1 participant