Skip to content

add TVL on Movement #15962

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Conversation

jpgpng342
Copy link
Contributor

Add USDa TVL on Movement.

Logic: WFBTC token on Treasury.

Product URL: https://app-move.avalonfinance.xyz/

  • fbtc: 0x0eac3fe6113d7172d686382836547ea25d6ddc9a617536f32ff7cfc4a6e26beb
  • treasury: 0xb79ef25caca96b35a45d58d771f162bd4c2e87984a2776a1cb029d7941cc9af8

@llamabutler
Copy link

Error while running adapter at projects/avalon-finance-usda:

Error: 
    Unknown chain(s): movement
    Note: if you think that the chain is correct but missing from our list, please add it to 'projects/helper/chains.json' file
    
Error saving cache: Error: ENOENT: no such file or directory, open '/home/runner/work/DefiLlama-Adapters/DefiLlama-Adapters/node_modules/@defillama/sdk/build/util/local_cache/zlib-1.0/BlockCache.json'

@waynebruce0x
Copy link
Collaborator


Error in move: [Error: Promise pool failed! 
 PromisePoolError: invalid address (argument="address", value="0xb79ef25caca96b35a45d58d771f162bd4c2e87984a2776a1cb029d7941cc9af8", code=INVALID_ARGUMENT, version=6.13.1) (argument="account", value="0xb79ef25caca96b35a45d58d771f162bd4c2e87984a2776a1cb029d7941cc9af8", code=INVALID_ARGUMENT, version=6.13.1)] {

@waynebruce0x waynebruce0x self-assigned this Aug 18, 2025
@jpgpng342
Copy link
Contributor Author

jpgpng342 commented Aug 19, 2025

We have update the FBTC address on Movement. The logic to calc TVL is to check the FBTC balance in treasury. Could you pleas help us to use the correct method to read FBTC balance on Movement? @waynebruce0x

treasuryAddress: '0xb79ef25caca96b35a45d58d771f162bd4c2e87984a2776a1cb029d7941cc9af8',
fbtcAddress: '0x16e733c5c943d78dbbaf1fc5beebbcc8db4ed647d2bdfcab74c2a527184a16aa'

@waynebruce0x
Copy link
Collaborator

generally it seems movement projects use const { function_view } = require("../helper/chain/aptos") but you can see other examples in the repo if you search for move:

@jpgpng342
Copy link
Contributor Author

Please review @waynebruce0x

const v3MoveConfig = {
  move: {
    treasuryAddress: '0xb79ef25caca96b35a45d58d771f162bd4c2e87984a2776a1cb029d7941cc9af8',
    fbtcAddress: '0x16e733c5c943d78dbbaf1fc5beebbcc8db4ed647d2bdfcab74c2a527184a16aa'
  },
}


const getMovementTvl = async (api) => {
  const primary_fungible_asset_balance = "0x1::primary_fungible_store::balance"
  const tvl = await function_view({
    "functionStr": primary_fungible_asset_balance,
    "type_arguments": ["0x1::fungible_asset::Metadata"],
    "args": [v3MoveConfig.move.treasuryAddress, v3MoveConfig.move.fbtcAddress]
  })
  return tvl
}

@waynebruce0x
Copy link
Collaborator

Did you test this like described in the docs?

@llamabutler
Copy link

The adapter at projects/avalon-finance-usda exports TVL:

bsc                       272.11 M
ethereum                  226.37 M
klaytn                    47.29 M
move                      44.03 M
sonic                     22.52 M
berachain                 113
mantle                    4

total                    612.32 M 

@jpgpng342
Copy link
Contributor Author

@waynebruce0x YES. I DID.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants