Skip to content
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

update our description etc. #13255

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

Conversation

xbankingorg
Copy link
Contributor

@xbankingorg xbankingorg commented Jan 27, 2025

NOTE

Please enable "Allow edits by maintainers" while putting up the PR.


  • If you would like to add a volume adapter please submit the PR here.
  • If you would like to add a liquidations adapter, please refer to this readme document for details.
  1. Once your adapter has been merged, it takes time to show on the UI. If more than 24 hours have passed, please let us know in Discord.
  2. Sorry, We no longer accept fetch adapter for new projects, we prefer the tvl to computed from blockchain data, if you have trouble with creating a the adapter, please hop onto our discord, we are happy to assist you.
  3. Please fill the form below only if the PR is for listing a new protocol else it can be ignored/replaced with reason/details about the PR
  4. For updating listing info It is a different repo, you can find your listing in this file: https://github.com/DefiLlama/defillama-server/blob/master/defi/src/protocols/data2.ts, you can edit it there and put up a PR
  5. Do not edit/push package-lock.json file as part of your changes, we use lockfileVersion 2, and most use v1 and using that messes up our CI
  6. No need to go to our discord and announce that you've created a PR, we monitor all PRs and will review it asap

Name (to be shown on DefiLlama): XBANKING
Twitter Link: https://twitter.com/xbankingapp
List of audit links if any: https://www.cyberscope.io/audits/coin-xbanking

https://skynet.certik.com/projects/xbanking

Website Link: xbanking.org
Logo (High resolution, will be shown with rounded borders): https://xbanking.org/xbanking.png
Current TVL: around 200 millions
Treasury Addresses (if the protocol has treasury)
Chain: SOLANA
Coingecko ID (so your TVL can appear on Coingecko, leave empty if not listed):

XB

Coinmarketcap ID (so your TVL can appear on Coinmarketcap, leave empty if not listed): https://coinmarketcap.com/currencies/xbanking/
Short Description (to be shown on DefiLlama):

Non-custodial staking & liquid pools provider.

Token address and ticker if any: XB
Category (full list at https://defillama.com/categories) *Please choose only one: Staking Pool
methodology (what is being counted as tvl, how is tvl being calculated): calculating our vaults with staked coins.
Github org/user (Optional, if your code is open source, we can track activity): github.com/xbankingorg

true tvl xbanking on solana chain
@xbankingorg
Copy link
Contributor Author

xbankingorg commented Jan 27, 2025

also, right now we updating our methodology (code)
when you can check it?

@waynebruce0x
Copy link
Collaborator

what has happened to the fantom tvl? Can we keep this for historical data and data completeness?

@waynebruce0x waynebruce0x self-assigned this Jan 27, 2025
tvl calculator of xbanking chains
@xbankingorg
Copy link
Contributor Author

no. check out our pull request xbankingorg#15

@xbankingorg
Copy link
Contributor Author

oh wait i need new PR. wait

@xbankingorg
Copy link
Contributor Author

xbankingorg commented Jan 27, 2025

we need to update our TVL calculator to this

let _response;

function fetchChain(chainId, staking) {
  return async () => {
    if (!_response) {
      _response = utils.fetchURL('https://api.xbanking.org/v2/platform/tvl');
    }
    const response = await _response;
    let tvl = 0;

    const chainName = Object.keys(response).find(key => key.toLowerCase() === chainId.toLowerCase());
    
    if (chainName) {
      tvl = Number(response[chainName]);
    }

    if (tvl === 0) {
      throw new Error(`chain ${chainId} tvl is 0`);
    }
    return tvl;
  };
}

const chains = {
  ethereum: 'ethereum',
  avax: 'avax',
  arbitrum: 'arbitrum',
  binance: 'binance',
  solana: 'solana',
  bitcoin: 'bitcoin',
  ton: 'ton',
  aptos: 'aptos',
  sui: 'sui'
};

module.exports = {
  timetravel: false,
  misrepresentedTokens: true,
  doublecounted: true,
  ...Object.fromEntries(Object.entries(chains).map(chain => [chain[0], {
    tvl: fetchChain(chain[1], false),
    staking: fetchChain(chain[1], true),
  }]))
};

@waynebruce0x
Copy link
Collaborator

Please use on chain methods for counting token balances. This API is unauditable and hard to debug. Also please include the old fantom TVL for completeness

@xbankingorg
Copy link
Contributor Author

we will not support fantom TVL anymore

@xbankingorg
Copy link
Contributor Author

and please access our new links and smart contract in the start of topic

@xbankingorg xbankingorg reopened this Jan 28, 2025
@xbankingorg
Copy link
Contributor Author

waiting for your answer

const chainName = Object.keys(response).find(key => key.toLowerCase() === chainId.toLowerCase());

if (chainName) {
tvl = Number(response[chainName]);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we cant use this

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so u need new code to just change our token chain and new links and smart contract in the start of topic?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we cant fetch a tvl number from your api endpoint. please rewrite the adapter to use on chain data

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.

2 participants