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

vfatio - Bugfix #11051

Merged
merged 5 commits into from
Jul 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions projects/vfat/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,13 +197,11 @@ async function tvlBaseOptimism(api) {
// TVL calculation for Arbitrum and Linea
async function tvlArbitrumLinea(api) {
const { factory, gaugeFactory, gaugeFactory2, voter, fromBlock, fromBlockSickle, chainName } = config[api.chain];

const sickles = await fetchSickles(api, factory, fromBlockSickle);
const gauges = await fetchGauges2(api, fromBlock, gaugeFactory, gaugeFactory2, voter, chainName);
const stakingTokens = await api.multiCall({ abi: 'address:stake', calls: gauges.lp });

await sumLPBalances(api, gauges.lp, sickles, stakingTokens);

await fetchSickleNftPositions(api, sickles, config[api.chain].NonfungiblePositionManager);
await fetchSickleNftPositions(api, sickles, config[api.chain].masterchefV3, true);

Expand Down
2 changes: 1 addition & 1 deletion projects/vfat/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const { sumTokens2 } = require('../helper/unwrapLPs');
async function sumLPBalances(api, gauges, sickles, lpTokens) {
api.log(api.chain, sickles.length, gauges.length,)
lpTokens.forEach((lpToken, index) => lpTokens[index] = lpToken.toLowerCase())
let minLPValue = 4e3
let minLPValue = 10e3
if (lpTokens.length > 200) minLPValue = 15e3
if (lpTokens.length > 400) minLPValue = 25e3

Expand Down
Loading