llamafolio-api icon indicating copy to clipboard operation
llamafolio-api copied to clipboard

Adapters 🦙

Open 0xsign opened this issue 2 years ago • 0 comments

Welcome llamas 👋 🦙 , following a list of missing (or with some issues) adapters for LlamaFolio (frequently updated):

Status:

  • empty: to do
  • 🦙: in progress (grazing)
  • ✅: done

Adapters

status id chain comments
crvusd ethereum
morpho-aavev3 ethereum
radiant-v2 bsc
velodrome optimism
equalizer fantom
solidly-v2 ethereum
thena bsc
solidlizard arbitrum
maverick-protocol bsc,ethereum,zksync contracts not verified atm
pendle Ethereum, arb, bsc, avalanche
timeless Ethereum, optimism, arb, polygon

Boilerplate code can be generated using:

pnpm run create-adapter {adapter_id}

To test your adapter with a user address:

pnpm run adapter {adapter_id} {chain} {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 erc20 balanceOf 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 🙏 🙏

0xsign avatar Jun 09 '23 06:06 0xsign