Skip to content
Open
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
12 changes: 11 additions & 1 deletion src/strkfarm/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,19 @@ export const CONTRACTS_INFO = {

export const TOKENS = {
USDC: standariseAddress('0x053c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8'),
// Native USDC (non-bridged)
USDC_NATIVE: standariseAddress('0x033068f6539f8e6e6b131e6b2b814e6c34a5224bc66947c47dab9dfee93b35fb'),
ETH: standariseAddress('0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7'),
STRK: standariseAddress('0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d'),
USDT: standariseAddress('0x68f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8')
USDT: standariseAddress('0x68f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8'),

// BTC-family assets (needed for Ekubo LST vaults + YOLO vaults)
WBTC: standariseAddress('0x03fe2b97c1fd336e750087d68b9b867997fd64a2661ff3ca5a7c771641e8e7ac'),
tBTC: standariseAddress('0x04daa17763b286d1e59b97c283c0b8c949994c361e426a28f743c67bdfe9a32f'),
solvBTC: standariseAddress('0x0593e034dda23eea82d2ba9a30960ed42cf4a01502cc2351dc9b9881f9931a68'),
LBTC: standariseAddress('0x036834a40984312f7f7de8d31e3f6305b325389eaeea5b1c0664b2fb936461a4'),
xWBTC: standariseAddress('0x06a567e68c805323525fe1649adb80b03cddf92c23d2629a6779f54192dffc13'),
xSTRK: standariseAddress('0x028d709c875c0ceac3dce7065bec5328186dc89fe254527084d1689910954b0a'),
};

export const isTLS = Deno.env.get("IS_TLS") === 'true';
75 changes: 72 additions & 3 deletions src/strkfarm/deposits-withdraws.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,57 @@ const VesuRebalanceStrategies = [{
asset: TOKENS.USDT,
}]

const EkuboLSTVaults = [
{
address: "0x01f083b98674bc21effee29ef443a00c7b9a500fd92cf30341a3da12c73f2324",
name: "Ekubo xSTRK/STRK",
asset: TOKENS.STRK,
},
{
address: "0x02ea99b4971d3c277fa4a9b4beb7d4d7d169e683393a29eef263d5d57b4380a",
name: "Ekubo xWBTC/WBTC",
asset: TOKENS.WBTC,
},
{
address: "0x0785dc3dfc4e80ef2690a99512481e3ed3a5266180adda5a47e856245d68a4af",
name: "Ekubo xtBTC/tBTC",
asset: TOKENS.tBTC,
},
{
address: "0x03af1c7faa7c464cf2c494e988972ad1939f1103dbfb6e47e9bf0c47e49b14ef",
name: "Ekubo xsBTC/solvBTC",
asset: TOKENS.solvBTC,
},
{
address: "0x0314c4653ab1aa01f5465773cb879f525d7e369a137bc3ae084761aee99a1712",
name: "Ekubo xLBTC/LBTC",
asset: TOKENS.LBTC,
},
];

const YoloVaults = [
{
address: "0x018ccdff25a642e211f86ace35ba282ebdf342330319ead98cae37258bc9cce1",
name: "YOLO BTC (31-DEC-2026)",
asset: TOKENS.USDC_NATIVE,
},
{
address: "0x03381380c6cca17c2a20e1167a362d5b939e392311cbcdf2016f9c7c7a23a801",
name: "YOLO vUSDC/xWBTC (31-MAY-2026)",
asset: TOKENS.USDC,
},
{
address: "0x060c8466549a8e51eed0e8c38243fdb57d173c96cfdd4375b49ad1e338ff893",
name: "YOLO vUSDC/xSTRK (31-MAR-2027)",
asset: TOKENS.USDC,
},
{
address: "0x062499970196772c18ccf1da09910ece11d85d5df3e8f6d6e41b4d158fcb8e79",
name: "YOLO vUSDC/xSTRK (30-JUN-2026)",
asset: TOKENS.USDC,
},
];

const EvergreenVaults = [
{
address: '0x7e6498cf6a1bfc7e6fc89f1831865e2dacb9756def4ec4b031a9138788a3b5e',
Expand Down Expand Up @@ -81,8 +132,12 @@ const EvergreenVaults = [
]

function erc4626Processor(_data: any[]) {
const type = standariseAddress(_data[0]) == standariseAddress(depositKey) ? 'deposit' : 'withdraw';
const data = _data.slice(1);
// Some contracts emit `ERC4626Event` as the first key, and the actual event selector
// (Deposit/Withdraw) as the second key.
const isWrapped = standariseAddress(_data[0]) === standariseAddress(erc4626Event);
const actionKey = standariseAddress(isWrapped ? _data[1] : _data[0]);
const type = actionKey === standariseAddress(depositKey) ? 'deposit' : 'withdraw';
const data = _data.slice(isWrapped ? 2 : 1);
console.log(data, type)
if (type == 'deposit') {
return {
Expand Down Expand Up @@ -205,6 +260,12 @@ const CONTRACTS: any = {
processor: dnmmProcessor
},
"erc4626": {
keys: [
[depositKey],
[withdrawKey],
[erc4626Event, depositKey],
[erc4626Event, withdrawKey],
],
contracts: [
{
address: standariseAddress("0x016912b22d5696e95ffde888ede4bd69fbbc60c5f873082857a47c543172694f"),
Expand All @@ -213,12 +274,20 @@ const CONTRACTS: any = {
address: standariseAddress("0x541681b9ad63dff1b35f79c78d8477f64857de29a27902f7298f7b620838ea"),
asset: TOKENS.STRK
},
...EkuboLSTVaults.map((s) => ({
address: standariseAddress(s.address),
asset: s.asset,
})),
...VesuRebalanceStrategies.map((s) => {
return {
address: standariseAddress(s.address),
asset: s.asset
}
})
}),
...YoloVaults.map((s) => ({
address: standariseAddress(s.address),
asset: s.asset,
})),
],
processor: erc4626Processor
},
Expand Down
32 changes: 27 additions & 5 deletions src/strkfarm/harvests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,33 @@ const VesuRebalanceStrategies = [{
asset: TOKENS.USDT,
}]

const EkuboVaults = [{
address: '0x1f083b98674bc21effee29ef443a00c7b9a500fd92cf30341a3da12c73f2324',
name: "Ekubo xSTRK/STRK",
asset: TOKENS.STRK,
}]
const EkuboVaults = [
{
address: '0x1f083b98674bc21effee29ef443a00c7b9a500fd92cf30341a3da12c73f2324',
name: "Ekubo xSTRK/STRK",
asset: TOKENS.STRK,
},
{
address: '0x2ea99b4971d3c277fa4a9b4beb7d4d7d169e683393a29eef263d5d57b4380a',
name: "Ekubo xWBTC/WBTC",
asset: TOKENS.WBTC,
},
{
address: '0x785dc3dfc4e80ef2690a99512481e3ed3a5266180adda5a47e856245d68a4af',
name: "Ekubo xtBTC/tBTC",
asset: TOKENS.tBTC,
},
{
address: '0x3af1c7faa7c464cf2c494e988972ad1939f1103dbfb6e47e9bf0c47e49b14ef',
name: "Ekubo xsBTC/solvBTC",
asset: TOKENS.solvBTC,
},
{
address: '0x314c4653ab1aa01f5465773cb879f525d7e369a137bc3ae084761aee99a1712',
name: "Ekubo xLBTC/LBTC",
asset: TOKENS.LBTC,
},
]

const CONTRACTS = {
"dnmm": {
Expand Down
Loading