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

Defillama additional integration #210

Open
wants to merge 5 commits into
base: dev
Choose a base branch
from

Conversation

iamsahu
Copy link
Contributor

@iamsahu iamsahu commented Aug 1, 2023

No description provided.

@sgzsh269
Copy link
Collaborator

sgzsh269 commented Aug 2, 2023

@iamsahu this PR is in draft, if it's ready for review, please change the status.

@iamsahu iamsahu marked this pull request as ready for review August 4, 2023 09:36
Copy link
Collaborator

@sgzsh269 sgzsh269 left a comment

Choose a reason for hiding this comment

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

Left a few comments

knowledge_base/widgets.yaml Show resolved Hide resolved
@@ -22,6 +22,15 @@ def container_name(self) -> str:
def container_params(self) -> Dict:
return dataclass_to_container_params(self)

def fetch_tvl(protocol) -> str:
url = f"https://api.llama.fi/tvl/{protocol}"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Wondering how are users supposed to know the canonical name/protocol slug that Defillama supports, like what would be the canonical name for the Yield protocol

We may need to have a normalizer that is able to map parsed protocol name to Defillama's protocol slug

Copy link
Collaborator

@sgzsh269 sgzsh269 left a comment

Choose a reason for hiding this comment

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

@iamsahu quickly did another pass on this PR

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.

2 participants