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 Hyperdrive #11859

Closed
wants to merge 6 commits into from
Closed

add Hyperdrive #11859

wants to merge 6 commits into from

Conversation

wakamex
Copy link

@wakamex wakamex commented Oct 9, 2024

Note this is the new protocol from Delv, the team formerly known as Element Finance. This protocol should be listed under Delv, on our existing page: https://defillama.com/protocol/delv.

Name (to be shown on DefiLlama): Hyperdrive
Twitter Link: https://twitter.com/delv_tech
List of audit links if any: 6 audits: https://github.com/delvtech/hyperdrive/tree/main/audits
Website Link:

https://hyperdrive.box/ for the protocol.
https://delv.tech/ for the team.

Logo (High resolution, will be shown with rounded borders):

hyperdrive-mark-white(1)

Current TVL: $3.0 million
Treasury Addresses (if the protocol has treasury)
Chain: Ethereum, Gnosis, Linea, Base
Coingecko ID (so your TVL can appear on Coingecko, leave empty if not listed): (https://api.coingecko.com/api/v3/coins/list): n/a
Coinmarketcap ID (so your TVL can appear on Coinmarketcap, leave empty if not listed): (https://api.coinmarketcap.com/data-api/v3/map/all?listing_status=active,inactive,untracked&start=1&limit=10000): n/a
Short Description (to be shown on DefiLlama): Hyperdrive is a novel AMM for traders to obtain fixed rates or boosted variable yields.
Token address and ticker if any: n/a
Category (full list at https://defillama.com/categories): Yield
Oracle Provider(s): Specify the oracle(s) used (e.g., Chainlink, Band, API3, TWAP, etc.): none
Implementation Details: Briefly describe how the oracle is integrated into your project: n/a
Documentation/Proof: Provide links to documentation or any other resources that verify the oracle's usage: n/a
forkedFrom (Does your project originate from another project): no
methodology (what is being counted as tvl, how is tvl being calculated): All tokens held by the pool contracts.
Github org/user (Optional, if your code is open source, we can track activity): https://github.com/delvtech (already being tracked)

@llamatester
Copy link

Error while running adapter at projects/hyperdrive.js:

ReferenceError: block is not defined
Truncated error stack:

    at tvl (/home/runner/work/DefiLlama-Adapters/DefiLlama-Adapters/projects/hyperdrive.js:65:64)
    at async tvl (/home/runner/work/DefiLlama-Adapters/DefiLlama-Adapters/projects/hyperdrive.js:74:35)
    at async getTvl (/home/runner/work/DefiLlama-Adapters/DefiLlama-Adapters/test.js:52:23)
    at async /home/runner/work/DefiLlama-Adapters/DefiLlama-Adapters/test.js:171:9
    at async Promise.all (index 0)
    at async Promise.all (index 0)
    at async /home/runner/work/DefiLlama-Adapters/DefiLlama-Adapters/test.js:214:3

@llamatester
Copy link

The adapter at projects/hyperdrive.js exports TVL:

xdai                      1.72 M
ethereum                  1.28 M
linea                     210
base                      189

total                    3.00 M 

@wakamex
Copy link
Author

wakamex commented Oct 9, 2024

I can see the pattern of defining a new protocol in the data.js files and linking them to a parent#name, but I'm not sure if I should be the one doing that.

@llamatester
Copy link

The adapter at projects/hyperdrive.js exports TVL:

xdai                      1.72 M
ethereum                  1.27 M
linea                     210
base                      189

total                    3.00 M 

@wakamex
Copy link
Author

wakamex commented Oct 9, 2024

I can remove the callWithRetry, but it was necessary to get it to run locally for me, and it doesn't seem to be doing any damage 😋

g1nt0ki added a commit that referenced this pull request Oct 9, 2024
@g1nt0ki
Copy link
Member

g1nt0ki commented Oct 9, 2024

@wakamex thanks for the PR, I refactored it a bit and merged it.

I am bit unsure why it is so slow, weird, it is base & linea slowing things down.

I changed it to use multicall, leads to fewer calls, also removed callWithRetry because the api already take care of this, again unsure why it didnt work on your local machine.

Last point, I am guessing the protocol never borrow from morpho, but to be safe, added this: b1a7b77

@g1nt0ki g1nt0ki closed this Oct 9, 2024
@g1nt0ki
Copy link
Member

g1nt0ki commented Oct 9, 2024

oh yeah, dont worry about the listing, we will take care of it and add it under delv, thanks again for the PR :)

@wakamex
Copy link
Author

wakamex commented Oct 9, 2024

thanks for the quick response! the Hyperdrive page was loading fine earlier today, but right now it returns Application error: a client-side exception has occurred (see the browser console for more information). on https://defillama.com/protocol/hyperdrive.

here's the error in console:

TypeError: Cannot read properties of null (reading 'protocolData')
    at P ([...protocol]-ca3cb0669910ea9a.js:1:120316)
    at oo (framework-79bce4a3a540b080.js:1:59417)
    at Wo (framework-79bce4a3a540b080.js:1:68984)
    at Ku (framework-79bce4a3a540b080.js:1:112708)
    at Li (framework-79bce4a3a540b080.js:1:98958)
    at Ni (framework-79bce4a3a540b080.js:1:98886)
    at Pi (framework-79bce4a3a540b080.js:1:98749)
    at bi (framework-79bce4a3a540b080.js:1:95715)
    at framework-79bce4a3a540b080.js:1:45209
    at t.unstable_runWithPriority (framework-79bce4a3a540b080.js:1:129355)

PS it looks fine rn, maybe it was just syncing

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.

3 participants