Skip to content

Commit

Permalink
Update AgentFi TVL (#10667)
Browse files Browse the repository at this point in the history
* fix agent fi address not matching issue

* add pac finance strategy to looper
  • Loading branch information
max-yilang committed Jun 17, 2024
1 parent 6bff07d commit f5102f6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion projects/agentfi/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ async function tvl(api) {


await getTvlForDexBalancer(dexBalancerAgents.map(i => i.agentAddress), api)
await getTvlForLooperWithOrbit(looperAgentsAddresses, api)
await getTvlForLooperWithOrbit(looperAgentsAddresses, api)
await sumTokens2({
tokensAndOwners: [
...thrusterv2,
Expand Down
4 changes: 2 additions & 2 deletions projects/agentfi/strategies/dex-balancer.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ async function getTvlForDexBalancer(agentAddresses, api) {
const reserve1BigN = BigNumber(reserve1)
const token0Balance = lpBalanceBigN.times(reserve0BigN).div(totalBigN)
const token1Balance = lpBalanceBigN.times(reserve1BigN).div(totalBigN)
api.add(RingTokenMappings[address0], token0Balance.toFixed(0))
api.add(RingTokenMappings[address1], token1Balance.toFixed(0))
api.add(RingTokenMappings[address0.toLowerCase()], token0Balance.toFixed(0))
api.add(RingTokenMappings[address1.toLowerCase()], token1Balance.toFixed(0))
}
const hyperlocklpBalance = hyperlocklpBalances.find(b => b.input.params[0] === address)
if (hyperlocklpBalance.success) {
Expand Down
3 changes: 2 additions & 1 deletion projects/agentfi/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ async function getAllAgent(api) {
const DexBalancerModules = ["0x7e8280f5Ee5137f89d09FA61B356fa322a93415a", "0x35a4B9B95bc1D93Bf8e3CA9c030fc15726b83E6F", "0x067299A9C3F7E8d4A9d9dD06E2C1Fe3240144389"]
const MultioliooorModule = ["0x54D588243976F7fA4eaf68d77122Da4e6C811167"]
const ConcentratedLiquidityModule = ["0x10C02a975a748Db5B749Dc420154dD945e2e8657", "0x41D68d86545D6b931c1232f1E0aBB5844Ada4967", "0xa11D4dcD5a9ad75c609E1786cf1FD88b53C83A5E"]
const Looper = ["0x6A9D21A09A76808C444a89fE5fCc0a5f38dc0523", "0xe5fe6f280CEadc5c4DDE69eF2DF6234dd7Bd82E2"]
const pacLooperModule = '0x5E38765FF50D9b8932441Cd668c1fDA365D358b5'
const Looper = ["0x6A9D21A09A76808C444a89fE5fCc0a5f38dc0523", "0xe5fe6f280CEadc5c4DDE69eF2DF6234dd7Bd82E2", pacLooperModule]
if (modules.some(i => DexBalancerModules.includes(i))) {
return {
...i,
Expand Down

0 comments on commit f5102f6

Please sign in to comment.