-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
lulo tvl adapter with timetravel #11333
Conversation
The adapter at projects/lulo exports TVL:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@0xBraunGuy thanks for the PR
But please compute tvl using on chain data
We don't store our specific deposits on-chain, It's not possible without adding the SDK's for all 5 different protocols which we integrate. And doing so, we would still have to fetch ~10k users at 5 different protocols == ~50k on-chain fetches using the 5 different SDK's. And we would lose historical data doing it that way. |
do users interact with contracts deployed by lulo? right now, the adapter is a blackbox, there is no way for us/our users to verify the data |
The smart contracts are just boilerplate deposit and withdraw transactions. There is no state that we maintain on-chain. It's the same dataset we use to support the app itself, and manage user transactions: |
but for a given token, interaction of all users and all platforms go through the same account controlled by Lulo? like https://solscan.io/account/91vPdPvYZ2W8VgUkQ28r2nePyE7V6qMq1ZyNRB9RrJ1k for PYUSD but end of (lets say) a transaction where user deposits 100k PYUSD into drift, where is the state recorded? in user controlled account or 91vPdPvYZ2W8VgUkQ28r2nePyE7V6qMq1ZyNRB9RrJ1k? i.e can the user directly interact with drift and withdraw? |
Yep that's the user controlled account (authority) in the Lulo smart contract. But the deposited state is kept at Drift/Kamino/Marginfi,etc. It's just the authority to deposit/withdraw that lives inside Lulo. The user needs to directly interact with Lulo to withdraw from Drift (wallet -> authority -> Drift), but the tokens/deposited amount are not kept in Lulo. So in order to fetch TVL on-chain, you would need to query each user / mint / protocol combo, and that requires each protocol's SDK (and thousands of RPC calls). Which is exactly what our backend does and persists it behind the API. |
Also, a few portfolio trackers have us integrated. If you plug the wallet for the above account into Sonar.Watch, you should see the Lulo deposits. Or similarly for the Lulo authority above: |
NOTE
Please enable "Allow edits by maintainers" while putting up the PR.
package-lock.json
file as part of your changes, we use lockfileVersion 2, and most use v1 and using that messes up our CIName (to be shown on DefiLlama):
Lulo
Twitter Link:
https://x.com/uselulo
List of audit links if any:
https://docs.lulo.fi/audits
Website Link:
https://lulo.fi/
Logo (High resolution, will be shown with rounded borders):
Current TVL:
$30M
Treasury Addresses (if the protocol has treasury)
Chain:
Solana
Coingecko ID (so your TVL can appear on Coingecko, leave empty if not listed): (https://api.coingecko.com/api/v3/coins/list)
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)
Short Description (to be shown on DefiLlama):
Lulo is a decentralized lending aggregator, which automatically optimizes users deposits by migrating their deposits to the lending pool with the best yield, while allowing for personalized risk settings
Token address and ticker if any:
Category (full list at https://defillama.com/categories) *Please choose only one:
Yield Aggregator
Oracle Provider(s): Specify the oracle(s) used (e.g., Chainlink, Band, API3, TWAP, etc.):
Implementation Details: Briefly describe how the oracle is integrated into your project:
Documentation/Proof: Provide links to documentation or any other resources that verify the oracle's usage:
forkedFrom (Does your project originate from another project):
methodology (what is being counted as tvl, how is tvl being calculated):
TVL is calculated by summing the total USD value of deposited funds in Lulo across all tokens
Github org/user (Optional, if your code is open source, we can track activity):