|
| 1 | +const { PublicKey } = require("@solana/web3.js"); |
| 2 | +const { getConnection } = require("../helper/solana"); |
| 3 | + |
| 4 | +const ALLOCATOR_VAULT = '0xe4470DD3158F7A905cDeA07260551F72d4bB0e77'; |
| 5 | +const ALLOCATOR_BUFFER = '0x065E5De3D3A08c9d14BF79Ce5A6d3D0E8794640c'; |
| 6 | +const ALM_PROXY = '0xa5139956eC99aE2e51eA39d0b57C42B6D8db0758'; |
| 7 | + |
| 8 | +const ETHEREUM_TOKENS = [ |
| 9 | + '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', // USDC |
| 10 | + '0xdAC17F958D2ee523a2206206994597C13D831ec7', // USDT |
| 11 | + '0x6B175474E89094C44Da98b954EedeAC495271d0F', // DAI |
| 12 | + '0xdC035D45d973E3EC169d2276DDab16f1e407384F', // USDS |
| 13 | + '0x83F20F44975D03b1b09e64809B757c47f942BEeA', // sDAI |
| 14 | + '0xa3931d71877C0E7a3148CB7Eb4463524FEc27fbD', // sUSDS |
| 15 | + '0x9D39A5DE30e57443BfF2A8307A4256c8797A3497', // sUSDe |
| 16 | + '0xBc65ad17c5C0a2A4D159fa5a503f4992c7B545FE', // sUSDC |
| 17 | + '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', // WETH |
| 18 | + '0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0', // wstETH |
| 19 | + '0xae78736Cd615f374D3085123A210448E74Fc6393', // rETH |
| 20 | + '0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599', // WBTC |
| 21 | + '0x18084fbA666a33d37592fA2633fD49a74DD93a88', // tBTC |
| 22 | +]; |
| 23 | + |
| 24 | +const KEEL_SVM_ALM_CONTROLLER = 'EeWDutgcKNTdQGJkGRrWYmTXXuKnPUZNvXepbLkQrxW4'; |
| 25 | + |
| 26 | +async function ethereumTvl(api) { |
| 27 | + const owners = [ALLOCATOR_VAULT, ALLOCATOR_BUFFER, ALM_PROXY]; |
| 28 | + return api.sumTokens({ owners, tokens: ETHEREUM_TOKENS }); |
| 29 | +} |
| 30 | + |
| 31 | +async function solanaTvl() { |
| 32 | + try { |
| 33 | + const connection = getConnection(); |
| 34 | + const account = await connection.getAccountInfo(new PublicKey(KEEL_SVM_ALM_CONTROLLER)); |
| 35 | + if (!account) return {}; |
| 36 | + |
| 37 | + // TODO: Parse account data when program structure is known |
| 38 | + return {}; |
| 39 | + } catch (error) { |
| 40 | + return {}; |
| 41 | + } |
| 42 | +} |
| 43 | + |
| 44 | +module.exports = { |
| 45 | + timetravel: false, |
| 46 | + methodology: "Keel Finance is an on-chain capital allocator from the Sky Protocol (formerly MakerDAO) ecosystem, designed to deploy up to $2.5B across Solana DeFi protocols and tokenized real-world assets. TVL is calculated by summing token balances in the AllocatorVault (0xe4470DD3158F7A905cDeA07260551F72d4bB0e77), AllocatorBuffer (0x065E5De3D3A08c9d14BF79Ce5A6d3D0E8794640c), and ALM Proxy (0xa5139956eC99aE2e51eA39d0b57C42B6D8db0758) contracts on Ethereum, plus bridged assets on Solana managed by the SVM ALM Controller.", |
| 47 | + ethereum: { |
| 48 | + tvl: ethereumTvl, |
| 49 | + }, |
| 50 | + solana: { |
| 51 | + tvl: solanaTvl, |
| 52 | + }, |
| 53 | + start: 1727740800, // Oct 1, 2024 |
| 54 | + hallmarks: [ |
| 55 | + [1727740800, 'Keel Finance launches as Pioneer Star in Sky Ecosystem'], |
| 56 | + ], |
| 57 | +}; |
0 commit comments