Skip to content

Commit

Permalink
Move curve-arb-tbtc-ng to convex
Browse files Browse the repository at this point in the history
  • Loading branch information
roman-monk committed Dec 4, 2024
1 parent eb7ca2d commit 1e201b5
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 210 deletions.
8 changes: 7 additions & 1 deletion scripts/findEolPools.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,18 @@ async function main() {
initVaultService();
await serviceEventBus.waitForFirstEvent('vaults/updated');
const vaults = getMultichainVaults();

const res = await fetch('https://api.beefy.finance/tvl').then(r => r.json());
const tvl = Object.keys(res)
.map(k => res[k])
.reduce((p, c) => ({ ...p, ...c }), {});

ids.forEach(id => {
const v = vaults.find(v => v.id === id);
if (!v) {
console.error(id, 'not found');
} else if (v.status === 'eol') {
console.warn(id, 'eol', v.retiredAt, new Date(v.retiredAt * 1000));
console.warn(id, 'eol', v.retiredAt, new Date(v.retiredAt * 1000).toLocaleDateString(), tvl[id]);
}
});
process.exit(0);
Expand Down
49 changes: 0 additions & 49 deletions src/api/stats/arbitrum/getCurveApys.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,55 +9,6 @@ const baseApyUrl = 'https://api.curve.fi/api/getSubgraphData/arbitrum';
const tradingFees = 0.0002;

const stakeDaoPools = [
{
name: 'stakedao-arb-2crv',
oracleId: 'curve-arb-2pool',
gauge: '0x044f4954937316db6502638065b95E921Fd28475',
rewards: [
{
token: '0x11cDb42B0EB46D95f990BeDD4695A6e3fA034978',
oracleId: 'CRV',
},
{
token: '0x912CE59144191C1204E64559FE8253a0e49E6548',
oracleId: 'ARB',
},
],
},
{
name: 'stakedao-arb-crvusd-usdt',
oracleId: 'curve-arb-crvusd-usdt',
gauge: '0x627b57Ad0A2219C44e9B5AE11Ea8802a9411433b',
rewards: [
{
token: '0x11cDb42B0EB46D95f990BeDD4695A6e3fA034978',
oracleId: 'CRV',
},
{
token: '0x912CE59144191C1204E64559FE8253a0e49E6548',
oracleId: 'ARB',
},
],
},
{
name: 'stakedao-arb-fraxbp',
oracleId: 'curve-arb-f-fraxbp',
gauge: '0x9B72d53bb8EF5B42046ea6EDdDF3c95571640685',
rewards: [
{
token: '0x11cDb42B0EB46D95f990BeDD4695A6e3fA034978',
oracleId: 'CRV',
},
{
token: '0x912CE59144191C1204E64559FE8253a0e49E6548',
oracleId: 'ARB',
},
{
token: '0x9d2f299715d94d8a7e6f5eaa8e654e8c74a988a7',
oracleId: 'FXS',
},
],
},
{
name: 'stakedao-arb-asdcrv',
oracleId: 'curve-arb-asdcrv',
Expand Down
67 changes: 0 additions & 67 deletions src/api/stats/arbitrum/getSpellApys.js

This file was deleted.

2 changes: 0 additions & 2 deletions src/api/stats/arbitrum/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
const { getCurveApys } = require('./getCurveApys');
const { getCurveLendApys } = require('./getCurveLendApys');
const { getSpellApys } = require('./getSpellApys');
const getBalancerArbApys = require('./getBalancerArbApys');
const getStargateArbApys = require('./getStargateArbApys');
const { getGmxV2Apys } = require('./getGmxV2Apys');
Expand Down Expand Up @@ -39,7 +38,6 @@ const getApys = [
getCurveApys,
getCurveLendApys,
getConvexApys,
getSpellApys,
getBalancerArbApys,
getStargateArbApys,
getSolidLizardApys,
Expand Down
25 changes: 10 additions & 15 deletions src/api/stats/cronos/getFerroApys.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const getFerroApys = async () => {
};

const getTradingApys = async () => {
return {};
let apys = {};
try {
const response = await fetch(factoryUrl).then(res => res.json());
Expand Down Expand Up @@ -116,21 +117,15 @@ const getMasterChefData = async () => {
const ferContract = fetchContract(fer, ERC20Abi, CRONOS_CHAIN_ID);
const xFerBoostContract = fetchContract(xFerBoost, ERC20Abi, CRONOS_CHAIN_ID);

const [
blockRewards,
totalAllocPoint,
xFerAllocPoint,
xFerTotalSupply,
ferBalance,
xFerBoostTotalSupply,
] = await Promise.all([
masterchefContract.read.ferPerBlock().then(v => new BigNumber(v.toString())),
masterchefContract.read.totalAllocPoint().then(v => new BigNumber(v.toString())),
masterchefContract.read.poolInfo([0]).then(v => new BigNumber(v['1'].toString())),
xFerContract.read.totalSupply().then(v => new BigNumber(v.toString())),
ferContract.read.balanceOf([xFer]).then(v => new BigNumber(v.toString())),
xFerBoostContract.read.totalSupply().then(v => new BigNumber(v.toString())),
]);
const [blockRewards, totalAllocPoint, xFerAllocPoint, xFerTotalSupply, ferBalance, xFerBoostTotalSupply] =
await Promise.all([
masterchefContract.read.ferPerBlock().then(v => new BigNumber(v.toString())),
masterchefContract.read.totalAllocPoint().then(v => new BigNumber(v.toString())),
masterchefContract.read.poolInfo([0]).then(v => new BigNumber(v['1'].toString())),
xFerContract.read.totalSupply().then(v => new BigNumber(v.toString())),
ferContract.read.balanceOf([xFer]).then(v => new BigNumber(v.toString())),
xFerBoostContract.read.totalSupply().then(v => new BigNumber(v.toString())),
]);

const xFerToFer = ferBalance.dividedBy(xFerTotalSupply);

Expand Down
101 changes: 25 additions & 76 deletions src/data/arbitrum/curvePools.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
"name": "curve-arb-tbtc-ng",
"pool": "0x186cf879186986a20aadfb7ead50e3c20cb26cec",
"gauge": "0xb7e23a438c9cad2575d3c048248a943a7a03f3fa",
"convex": true,
"rewards": [
{
"token": "0x912CE59144191C1204E64559FE8253a0e49E6548",
Expand Down Expand Up @@ -216,81 +217,6 @@
}
]
},
{
"name": "curve-arb-knox-rgusd",
"pool": "0x0acacb4f6db7708a5451b835acd39dfebac4eeb5",
"gauge": "0xf4754dfc1960af974f54bc8d86026f1bf85fac9c",
"rewards": [
{
"token": "0xCa5Ca9083702c56b481D1eec86F1776FDbd2e594",
"oracleId": "RSR"
},
{
"token": "0x912CE59144191C1204E64559FE8253a0e49E6548",
"oracleId": "ARB"
}
],
"tokens": [
{
"oracleId": "KNOX",
"decimals": "1e18"
},
{
"oracleId": "rgUSD",
"decimals": "1e18"
}
]
},
{
"name": "curve-arb-eusd-rgusd",
"pool": "0xbdf44492ac1c81b1bd9b9a8b075026d3e8a3225a",
"gauge": "0x8cecdc462d5b39c29bd7e01027c944e4361191c2",
"rewards": [
{
"token": "0xCa5Ca9083702c56b481D1eec86F1776FDbd2e594",
"oracleId": "RSR"
},
{
"token": "0x912CE59144191C1204E64559FE8253a0e49E6548",
"oracleId": "ARB"
}
],
"tokens": [
{
"oracleId": "eUSD",
"decimals": "1e18"
},
{
"oracleId": "rgUSD",
"decimals": "1e18"
}
]
},
{
"name": "curve-arb-rgusd-usdc",
"pool": "0x3dcb7b53b6177a04a2aece61d95bf577ecc02241",
"gauge": "0xd27f5809342066e7c1995f6c78f3245593044c27",
"rewards": [
{
"token": "0xCa5Ca9083702c56b481D1eec86F1776FDbd2e594",
"oracleId": "RSR"
},
{
"token": "0x912CE59144191C1204E64559FE8253a0e49E6548",
"oracleId": "ARB"
}
],
"tokens": [
{
"oracleId": "rgUSD",
"decimals": "1e18"
},
{
"oracleId": "USDC",
"decimals": "1e6"
}
]
},
{
"name": "curve-arb-usdc-usdm",
"pool": "0x4bd135524897333bec344e50ddd85126554e58b4",
Expand Down Expand Up @@ -352,7 +278,6 @@
"oracleId": "ARB"
}
],
"getDy": ["v2", 1, 0],
"tokens": [
{
"oracle": "tokens",
Expand All @@ -371,6 +296,30 @@
}
]
},
{
"name": "curve-arb-asdcrv-v2.1",
"pool": "0x5c959d2c1a49b637fb988c40d663265f8bf6d289",
"gauge": "0xf1bb643f953836725c6e48bdd6f1816f871d3e07",
"convex": true,
"getDy": ["v2", 2, 0],
"tokens": [
{
"oracle": "tokens",
"oracleId": "CRV",
"decimals": "1e18"
},
{
"oracle": "tokens",
"oracleId": "sdCRV",
"decimals": "1e18"
},
{
"oracle": "tokens",
"oracleId": "asdCRV",
"decimals": "1e18"
}
]
},
{
"name": "curve-arb-tricrvarb",
"pool": "0x845c8bc94610807fcbab5dd2bc7ac9dabaff3c55",
Expand Down

0 comments on commit 1e201b5

Please sign in to comment.