You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We highly suggest you to look at existing adapters to understand how it works and reuse as much code as possible.
If your protocol is a fork of an existing one, odds are there's already some code implemented.
Adapters are made of 2 functions:
getContracts: identify protocol contracts. Most likely found in the protocol docs, in DefiLlama adapter code, in a graph or by listing pools of a factory contract.
getBalances: add amounts to contracts above. Most likely an erc20 balanceOf call + some transformation (ex: LP token ratio)
Welcome llamas π π¦ , following a list of missing (or with some issues) adapters for LlamaFolio (frequently updated):
Status:
Adapters
Boilerplate code can be generated using:
To test your adapter with a user address:
Methodology
We highly suggest you to look at existing adapters to understand how it works and reuse as much code as possible.
If your protocol is a fork of an existing one, odds are there's already some code implemented.
Adapters are made of 2 functions:
getContracts
: identify protocol contracts. Most likely found in the protocol docs, in DefiLlama adapter code, in a graph or by listing pools of a factory contract.getBalances
: add amounts to contracts above. Most likely an erc20balanceOf
call + some transformation (ex: LP token ratio)Docs
Check out hands-on adapter tutorials
https://docs.llamafolio.com/docs/tutorials/aave/
Don't see your protocol ?
If you don't see your protocol in the list above nor in our adapters, please leave a comment on this issue with the link to DefiLlama adapter.
Help
Reach out on
#contributors
Discord if you need any help.Thanks π π
The text was updated successfully, but these errors were encountered: