What is a Native Token?
Native tokens are the gas tokens of a blockchain or network. For example Ethereum (ETH) is the native token for the Ethereum blockchain and Polygon (MATIC) is the native token for the Polygon blockchain. Some networks like L2s or rollups use the native token from their underlying networks. For example ETH is used as the native token on the Optimism Layer 2 Optimistic Rollup network.
Native tokens do not have ERC20 functions like
balanceOf, etc. and as such must be treated differently from basic tokens with respect to obtaining balances and handling value transfers. This difference is abstracted by the Portals API allowing you to treat native tokens and basic tokens in the same way. The Portals API treats the zero address (i.e.
0x0000000000000000000000000000000000000000) as the native token on its own chain (e.g. ETH on Ethereum is assigned the zero address).
Properties of a Native Token
The object shown below is an example of a response for a native token returned by the the Portals API.
|The ID of the token|
|A unique key identifying this token|
|The formatted name of the token|
|The symbol of the token|
|An image representing the token|
|The current USD price of the token|
|The current USD market cap of the token|
|An array of underlying tokens belonging to this token. See below for more details|
|The platform the token belongs to|
|The address of the token|
|An object containing the addresses of the token on other networks|
|The network this token exists on|
|The date and time of the last update for this token|
- For native tokens, the
addressprop is always the zero address (i.e.
liquidityprop refers to market capitalization (i.e. price * circulating supply).
tokensarray will be empty as native tokens are not composed of other tokens like LP Tokens.