Etherscan is broken

You’re right. Etherscan is not the source of truth of all chain transactions, the Ethereum blockchain is.

The wallet balance displayed on Etherscan is correct because Etherscan is simply querying the NMR contract balanceOf for the specified wallet. This number is coming from the source of truth - the blockchain.

The ERC-20 transactions tab on Etherscan, however, is not querying the blockchain. Those transactions are a kind of materialized view that Etherscan constructs based on their own ingestion pipeline that processes all transactions since epoch. You can’t ask Infura or Geth for all transactions for a given wallet - you need to construct this yourself by processing all transactions ever made starting from epoch.

The reason why there is a discrepancy between ERC-20 tab transactions and the wallet balance is because the early versions of the NMR contract were not ERC-20 compliant and did not emit ERC-20 transfer events. Because of this, these early NMR transfers are interpreted as ETH transactions, or not at all.

Early version of the NMR contract can be found at 0xc75498c67386eba37af1e35d54744d15064ef70f

If you click on that contract you will see that it lists NMR transfers under the Transactions tab, not the ERC-20 tab. Early version of this contract used the numeraiTransfer function, as opposed to transfer, and did not properly emit token transfer events. There were probably other issues that were fixed along the way that I am not familiar with, but suffice to say that these were early days on Ethereum and standards were still in flux.

Lastly, the balance discrepancy you’ve identified only impacts old wallets that interacted with the early contracts. Newer wallets that have only interacted with the latest NMR contract do not have this issue.

Moral of the story, Etherscan is great and super convenient, but is not the source of truth. The blockchain is.

3 Likes