Skip to content

Commit

Permalink
separate fusefi lending
Browse files Browse the repository at this point in the history
  • Loading branch information
0xngmi committed Mar 5, 2024
1 parent 237d759 commit 94c71a7
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 17 deletions.
24 changes: 24 additions & 0 deletions projects/fusefi-lending/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
const { usdCompoundExports } = require('../helper/compound');

const unitroller_fuse = "0x26a562B713648d7F3D1E1031DCc0860A4F3Fa340"

const abis = {
oracle: "address:getRegistry",
underlyingPrice: "function getPriceForUnderling(address cToken) view returns (uint256)",
}

const olalending = usdCompoundExports(unitroller_fuse, "fuse", "0x025B0ff0920298e087308F3b2de0CF6399685909", abis)
module.exports = {
fuse:{
tvl: olalending.tvl,
borrowed: async function(timestamp, ...otherParams){
if(timestamp >= 1648684800){
return {}
}
return olalending.borrowed(timestamp, ...otherParams)
}
},
hallmarks: [
[1648684800, "Ola Finance exploit"]
]
}
9 changes: 2 additions & 7 deletions projects/fusefi/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
const sdk = require("@defillama/sdk");
const swap = require("./swap");
const olalending = require("./olalending");
const { stakings } = require("../helper/staking");

const VOLT_TOKEN = "0x34Ef2Cc892a88415e9f02b91BfA9c91fC0bE6bD4".toLowerCase();
Expand All @@ -10,10 +8,7 @@ const VOLT_VOTE_ESCROW = "0xB0a05314Bd77808269e2E1E3D280Bff57Ba85672".toLowerCas
module.exports = {
misrepresentedTokens: true,
fuse: {
tvl: sdk.util.sumChainTvls([swap.tvl, olalending.tvl]),
tvl: swap.tvl,
staking: stakings([VOLT_BAR, VOLT_VOTE_ESCROW], VOLT_TOKEN),
},
hallmarks: [
[1648684800, "Ola Finance exploit"]
]
}
};
10 changes: 0 additions & 10 deletions projects/fusefi/olalending.js

This file was deleted.

0 comments on commit 94c71a7

Please sign in to comment.