Bitcoin
$42,396-7.28%
Ethereum
$2,977.47-7.24%
XRP
$0.933965-5.81%
Cardano
$2.07-5.32%
Polkadot
$28.50-10.29%
Stellar
$0.278094-6.36%
Dogecoin
$0.206393-7.67%
Chainlink
$23.04-11.95%
Uniswap
$20.70-9.48%
Polygon
$1.13-10.06%
Litecoin
$157.02-6.41%
Bitcoin Cash
$532.38-8.98%
Cosmos
$34.25-19.85%
Wrapped Bitcoin
$42,439.66-7.25%
Algorand
$1.66-10.77%
Filecoin
$73.27-8.93%
The Graph
$0.687396-11.51%
Tron
$0.091293-5.68%
Ethereum Classic
$48.46-8.85%
Aave
$289.79-10.93%
Tezos
$5.08-13.79%
Monero
$226.93-10.87%
NEO
$40.41-11.07%
EOS
$4.13-11.41%
IOTA
$1.28-12.66%
BitTorrent
$0.003289-9.97%
Bitcoin SV
$135.48-10.49%
Maker
$2,451.57-7.08%
Waves
$23.79-5.93%
Dash
$168.21-8.07%
Decred
$117.10-12.65%
OmiseGO
$10.94+21.07%
ICON
$1.62-2.91%
Decentraland
$0.662304-12.77%
NEM
$0.151812-10.43%
Zcash
$116.61-8.40%
NuCypher
$0.277407-10.14%
Paxos Standard
$0.999993+1.31%
Yearn Finance
$28,954.54-8.53%
Qtum
$10.19-11.18%
Bitcoin Gold
$54.21-10.72%
Basic Attention Token
$0.646296-7.58%
0x
$0.895031-10.39%
Bancor
$3.49-8.42%
Ren
$0.764813-9.05%
Fetch.ai
$0.658601-8.91%
Band Protocol
$7.46-11.37%
Siacoin
$0.015225-11.07%
Kava.io
$5.05-10.19%
Nano
$4.78-7.65%
Loopring
$0.399363-7.47%
Storj
$1.13-9.57%
Lisk
$3.01-13.02%
Numeraire
$38.65-12.23%
Civic
$0.412542-11.31%
Orchid
$0.325246-8.05%
PAX Gold
$1,773.75+0.82%
Augur
$21.34-10.76%
Aragon
$4.89-13.99%
Enzyme
$103.15-7.29%
district0x
$0.148802-10.02%
Kyber Network
$1.47-9.86%
SingularDTV
$0.001390-0.36%
Tether
$0.999918-0.02%
USD Coin
$1.00+0.02%
Dai
$1.00-0.02%

Coinbase and ZenGo Spar Over QR Code Standards That Could Strand ERC-20 Tokens

Users who must use QR codes should verify transaction details before finally confirming the transaction to save themselves money and headaches.

Mar 25, 2021 at 1:42 p.m. UTC
Updated Sep 14, 2021 at 12:32 p.m. UTC

Small problems, compounded by a lack of developer coordination, can have a huge impact on the safety of crypto users’ coins. 

Case in point:

Wednesday, the head of security at ZenGo, a cryptocurrency wallet provider, tweeted out research showing that issues with QR codes generated by Coinbase.com's app had resulted in some users sending funds to the contract address rather than to the intended wallet address within the app. This error effectively strands the funds, with no way to reverse the transaction. 

The QR code issue ZenGo identified is based on a backward-compatibility issue between ERC-67 (the original QR URL format standard) and the newer EIP-681 standard. Coinbase uses EIP-681, creating compatibility issues between it and other wallets using the older standard.

“QR codes are a very problematic format for the cryptocurrency domain,” said Tal Be'ery, co-founder and security researcher at ZenGo. “As QR codes are not humanly readable, it’s hard for users to detect errors, introduced either by malice or by mistake. Due to the irreversibility of cryptocurrency, errors are usually fatal.”

That being said, QR codes can be more reliable and less prone to error overall than a human copying and pasting a wallet address. 

This issue has affected some users within the last eight months and, according to Be’ery has likely been around longer. It was publicly reported in December 2020 as well. 

The EIP and ERC QR code standards

ZenGo discovered the issue as part of its quality assurance process. Be’ery said the team was testing the ZenGo QR decoding module by feeding it QR codes, generated by a variety of wallets, and noticed the ZenGo app does not handle Coinbase app QRs for ERC-20 tokens, such as tether or dai.

ERC-20 tokens can typically be used to represent objects, give voting rights, pay transaction fees, crowdfund and incorporate new features into a token. ERC-20 is currently the most popular ERC token standard on Ethereum. 

Once QR codes are decoded according to the older QR code URL standard used by ZenGo, the URL appears in the address field below the QR code as, essentially, “ethereum:<address>” followed by some optional parameters.

In the newer format, supported by Coinbase's app, the decoded URL appears below the QR code as “ERC-20 ethereum:<contract address>/transfer?address=<recipient address>“. 

This means that if developers are not careful with their implementation, an algorithm may decide to just take the first parameter as the relevant address to send to and ignore all others, according to Be’ery. 

“When this ‘naive’ algorithm is applied on the newer format, it will cause the wallet user to erroneously send funds to the ERC-20 contract itself and not the intended recipient, resulting in money loss,” said Be’ery. 

Be'ery tweeted out an example from Coinbase's app, with the first address being the contract address rather than the wallet address.

The EIP-681 standard documentation acknowledges this problem, essentially stating that it’s backwards compatible for ETH but not ERC-20 payments. 

'A terrible standard'

Coinbase did not supply a requested comment by press time but Pete Kim, head of engineering for the Coinbase Wallet replied to Be’ery’s tweet. 

Be’ery said while Coinbase is not “wrong” because it is following some standard, the team at ZenGo believes it’s a classic case of "It’s better to be smart than to be right."

“When implementing a cross-wallet functionality such as QR codes that can be created by one wallet and consumed by another it’s better to use a ‘lowest common denominator’ attitude,” said Be’ery.

“Specifically, ZenGo creates QR codes which encode the address in a raw format (Trust wallet does it, too) that just specifies the address and nothing else. It’s basic and therefore leaves less room for mistakes and incompatibilities.” 

Kim later corrected himself, noting that the new standard was being used on Coinbase's retail app, or their exchange app, rather than Coinbase Wallet, which is a noncustodial wallet app.

Kim went on to say this was a bug in ZenGo for not supporting the EIP-681 standard, noting that other wallets like Trust, Exodus, Crypto.com and Metamask all support EIP-681 correctly.

Choosing the right address

In the meantime, as a general rule, Be’ery said users who must use QR codes should verify transaction details before finally confirming the transaction. For example, searching an address on Etherscan will tell you whether the address is a contract address or a wallet address. Unfortunately checking which standards your preferred wallet supports is quite difficult.

All this may seem arduous for newcomers to the space who are unfamiliar with the contours of crypto, and it can be. However, it's something that may save them quite a bit of money and headaches in the long run. 

“That’s why in ZenGo we augment our QR codes with some visual indicators on the coin/token type and also the address itself for easy comparison and verification,” Be'ery said.

"The most important thing with QR code reading is not getting confused by the different formats and standards, and it's better to fail in case of an unsupported format (as we do) and not try to 'guess' and put our customers' funds at risk. We may decide in future to support this format too, and then we will pick the 'right' address, so no funds [will be lost]."

Correction: Thursday, March 3, 2021, 16:00 UTC: The original version of this article stated that the issue was with the Coinbase Wallet. It has been amended to state that the problem is with wallet addresses within the Coinbase.com app.

Additional comments from Pete Kim of Coinbase Wallet have been added.

DISCLOSURE

The leader in news and information on cryptocurrency, digital assets and the future of money, CoinDesk is a media outlet that strives for the highest journalistic standards and abides by a strict set of editorial policies. CoinDesk is an independent operating subsidiary of Digital Currency Group, which invests in cryptocurrencies and blockchain startups.

Loading...