HomeEIPs
EIPsEIP-3014
EIP-3014

eth_symbol JSON-RPC method

StagnantStandards Track: Interface
Created: 2020-09-30
Peter Grassberger (@PeterTheOne)
DiscussionsOriginal linkEdit
1 min read

The EIP-3014 proposal suggests adding a new JSON-RPC method called eth_symbol to the Ethereum protocol. This method would allow clients to retrieve the symbol associated with a given token address on the Ethereum network. The proposal notes that while this may not be the best mechanism for communication between applications and the blockchain, it aligns with established practices within the community and would enable quick integration with existing systems. The security considerations section notes that the relationship between the Ethereum Provider and client is trusted, and assumes that the user trusts the Ethereum Provider. The proposal includes the necessary parts for a successful EIP, including a preamble, abstract, and optional motivation section.

Video
Anyone may contribute to propose contents.
Go propose
Original

Simple Summary

Add eth_symbol method to the JSON-RPC that returns the symbol of the native coin of the network.

Abstract

The new method eth_symbol (eth_-namespaced) has no parameters and returns a string of the native coin of the network. For the Ethereum mainnet this will be ETH, other networks will have other symbols.

Motivation

Wallets that deal with multiple networks need some basic information for every blockchain that they connect to. One of those things is the symbol of the native coin of the network. Instead of requiring the user to research and manually add the symbol it could be provided to the wallet via this proposed JSON-RPC endpoint and used automatically. There are lists of networks with symbols like https://github.com/ethereum-lists/chains where a user can manually look up the correct values. But this information could easily come from the network itself.

Specification

Method: eth_symbol.

Params: none.

Returns: result - the native coin symbol, string

Example:

curl -X POST --data '{"jsonrpc":"2.0","method":"eth_symbol","params":[],"id":1}' // Result { "id": 1, "jsonrpc": "2.0", "result": "ETH" }

Rationale

This endpoint is similar to EIP-695 but it provides the symbol instead of chainId. It provides functionality that is already there for ERC-20 tokens, but not yet for the native coin of the network. Alternative naming of eth_nativeCurrencySymbol was considered, but the context and the fact that it just returns one value makes it clear that that it returns the symbol for the native coin of the network.

Security Considerations

It is a read only endpoint. The information is only as trusted as the JSON-RPC node itself, it could supply wrong information and thereby trick the user in believing he/she is dealing with another native coin.

Copyright and related rights waived via CC0.

Further reading
Anyone may contribute to propose contents.
Go propose
Adopted by projects
Anyone may contribute to propose contents.
Go propose

Not miss a beat of EIPs' update?

Subscribe EIPs Fun to receive the latest updates of EIPs Good for Buidlers to follow up.

View all
Serve Ethereum Builders, Scale the Community.
Resources
GitHub
Supported by