Comment on page
Fork helpers
There are a few different helpers for Uni V2 forks but we recommend using
uniTvlExport
.const { uniTvlExport } = require('../helper/unknownTokens')
const chain = 'yourChain'
const factory = '0x...' // v2 factory address
module.exports = uniTvlExport(chain, factory)

DefiLlama-Adapters/index.js at main · DefiLlama/DefiLlama-Adapters
GitHub
Example Uni V2 Adapter
const { gmxExports } = require('../helper/gmx')
module.exports = {
bsc: {
tvl: gmxExports({ vault: '0x...', })
}
}

DefiLlama-Adapters/index.js at main · DefiLlama/DefiLlama-Adapters
GitHub
Example GMX Adapter
const { aaveExports } = require("../helper/aave")

DefiLlama-Adapters/index.js at main · DefiLlama/DefiLlama-Adapters
GitHub
Example Aave Fork Adapter
const { compoundExports } = require("../helper/compound");
module.exports = {
polygon: compoundExports(controller, chain, cETHAddress, '0x0000000000000000000000000000000000000000'),
};

DefiLlama-Adapters/index.js at main · DefiLlama/DefiLlama-Adapters
GitHub
Example Compound Fork Adapter
For MasterChef's we recommend using masterChefExports, but in some more complicated scenarios you may need to use addFundsInMasterChef.
const { masterchefExports } = require("../helper/unknownTokens")
const { addFundsInMasterChef } = require('../helper/masterchef');

DefiLlama-Adapters/index.js at main · DefiLlama/DefiLlama-Adapters
GitHub
Example masterChefExports adapter
const { ohmTvl } = require("../helper/ohm");

DefiLlama-Adapters/index.js at main · DefiLlama/DefiLlama-Adapters
GitHub
Example Olympus DAO Adapter
const { unknownTombs } = require("../helper/unknownTokens")

DefiLlama-Adapters/index.js at main · DefiLlama/DefiLlama-Adapters
GitHub
Example tomb Adapter
Last modified 10mo ago