Skip to main content

Token addresses

What is a token address?

A Token address or an Asset address is a representation of the real asset on the blockchain.

How are the token addresses chosen?

We use different strategies to choose the token addresses on Testnet/ Mainnet.

BNB Testnet

As there are no real tokens on the Testnet, we assign random addresses to all the tokens.

BNB Mainnet

If the token exists as a BEP20 on the BNB Chain, we use the BEP20 contract address as the token address. Most of the tokens available on Binance Oracle fall under this category.

In addition, we support fiat currencies such as USD, EUR as tokens. Since they do not have representation on the blockchain, we use currency codes based on ISO 4217 as an alternative. For example, the numeric code of USD per ISO 4217 is 840, so to obtain the tokenized address we could do it as follows:

Example: Obtain USD's address
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

contract CurrencyTokenAddress {
function getCurrencyAddress() public pure returns (address) {
return address(840); //ISO 4217 numeric code of USD
}
}

Finally, if the token is not available as BEP20 on the BNB Chain, we randomly assign an address to it.

You could find the Testnet/ Mainnet addresses in the contract addresses section.

How do we distinguish duplicate tokens?

Since there are many contracts with same token name on the BNB Chain, we curate the original token contract addresses and use them in the Binance Oracle.