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: update Reserve adapter to dynamically fetch TVL #5408

Merged
merged 5 commits into from
Feb 24, 2023

Conversation

larrythecucumber321
Copy link
Contributor

@larrythecucumber321 larrythecucumber321 commented Feb 22, 2023

This implementation relies on listening for the deployer contract's RTokenCreated event to populate the owners array. The relevant tokens are then subsequently queried

closes reserve-protocol/protocol#423

@llamatester
Copy link

The adapter at projects/reserve exports TVL:

ethereum                  28.92 M

total                    28.92 M 

@g1nt0ki
Copy link
Member

g1nt0ki commented Feb 24, 2023

@larrythecucumber321 thanks for the PR, I updated it to cache logs and blacklisted RSR from being counted towards tvl

@g1nt0ki g1nt0ki merged commit 376bb04 into DefiLlama:main Feb 24, 2023
@larrythecucumber321
Copy link
Contributor Author

Thank you for the upgrades @g1nt0ki 🙏 I was wondering if it would be possible to remove RSR from the blacklist, because users stake it to provide insurance for the protocol, just like how AAVE is used for that purpose (and I see it's being counted towards TVL).

@g1nt0ki
Copy link
Member

g1nt0ki commented Feb 24, 2023

sorry, we are more strict/conservative when it comes to CDP, for example: in the daI-USDC arrakis LP of collateral, we only count the USDC part, same for curve LP with FRAX in it for FRAX

@larrythecucumber321
Copy link
Contributor Author

Thanks for that explanation. Would RSR staking be more appropriate under the staking category instead? I can create another PR for that!

@g1nt0ki
Copy link
Member

g1nt0ki commented Feb 24, 2023

yup, that is correct

@g1nt0ki
Copy link
Member

g1nt0ki commented Feb 24, 2023

hope this is correct: 15520b2

@larrythecucumber321
Copy link
Contributor Author

Beauty! Sniffing the creation event for stRSR... 🤌
image

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.

Update our Defillama adapter for proper accounting
3 participants