Skip to content

Commit

Permalink
Update Concentrator tvl (#11151)
Browse files Browse the repository at this point in the history
* Add arUSD

* Add Concentrator arUSD

* Update arUSD

* Update fx-protocol tvl

* Update concentrator tvl

---------

Co-authored-by: Andrew <Andrew@aladdin>
  • Loading branch information
0xAndrewClark and Andrew authored Jul 30, 2024
1 parent a9f8bdc commit 712da45
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions projects/concentrator/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ const aladdinCVXAddress = "0xb0903Ab70a7467eE5756074b31ac88aEBb8fB777";
const arUSDAddress = "0x549716F858aefF9CB845d4C78c67A7599B0Df240";
const arUSD4626Address = "0x07D1718fF05a8C53C8F05aDAEd57C0d672945f9a";
const rUSDAddress = "0x65D72AA8DA931F047169112fcf34f52DbaAE7D18";
const aFXNAddress = "0x00Bac667a4cCf9089aB1Db978238C555C4349545";
const fxnAddress = "0x365AccFCa291e7D3914637ABf1F7635dB165Bb09";

const concentratorNewVault = "0x3Cf54F3A1969be9916DAD548f3C084331C4450b5";
const concentratorAfxsVault = "0xD6E3BB7b1D6Fa75A71d48CFB10096d59ABbf99E1";
Expand Down Expand Up @@ -81,6 +83,7 @@ async function tvl(api) {
getAsdCRVInfo(balances, block),
getAladdinCVXInfo(balances, block),
getAladdinRUSDInfo(balances, block),
getAladdinFXNInfo(balances, block),
getVaultInfo("old", balances, block),
getVaultInfo("New", balances, block),
getVaultInfo("afxs", balances, block),
Expand Down Expand Up @@ -268,6 +271,22 @@ async function getAladdinRUSDInfo(balances, block) {
);
}

async function getAladdinFXNInfo(balances, block) {
const aladdinFXNTotalUnderlying = (
await sdk.api.abi.call({
target: aFXNAddress,
block,
abi: AladdinAFXSABI.totalAssets,
})
).output;
sdk.util.sumSingleBalance(
balances,
fxnAddress,
aladdinFXNTotalUnderlying,
chain
);
}

module.exports = {
doublecounted: true,
ethereum: {
Expand Down

0 comments on commit 712da45

Please sign in to comment.