Ethereum’s ERC-20 design flaws are a crypto fraudster’s best friend.

Ethereum'S Erc-20 Design Flaws Are A Crypto Fraudster'S Best Friend.


ERC-20 tokens are among the most frequently stolen assets in the crypto industry, and even some updates intended to fix the issues facilitate unwitting theft.

The ubiquitous token standard accounts for 89.5% of the Ethereum network lost to phishing scams in March, according to Scam Sniffer.

These tokens are stolen as a result of unwittingly phishing victims and approving activities such as “authorization” and “increase allowance”. Activities intended to increase the effectiveness of the tokenization phase introduce new vulnerabilities.

First introduced in 2015, ERC-20 tokens are riddled with open security holes, with little chance of a fix anytime soon.

bybit

“The problem is due to historically bad decisions in the designs of ERC-20 and Ethereum,” Mikko Otama, co-founder of Algorithmic Investment Protocol Trading Strategy, told the magazine.

He said issues related to token design are mainly problems specific to Ethereum and (to a lesser extent) Solana.

“The issue has been fixed on other chains such as MultiversX, Radix, Cosmos-based, etc.,” says Ohtamaa.

But the volatile nature of smart contracts complicates efforts to fix ERC-20's flaws.

A Screenshot Of A Tweet From Security Firm Scam Sniffer Detailing March'S Monthly Scam Statistics.
Ethereum is the leading network for phishing scams. (cheat cheater)

Phishing Attacks: Uniswap's Permit2

Uniswap's “Permit2” — a smart contract launched in 2022 — aims to improve transactions by allowing users to grant group tokens to DApps. This eliminates separate approvals for each transaction, saving gas fees in the process.

Permit2 is similar to its predecessor, “Permit” from Ethereum update proposal-2612, which introduced off-chain token approvals. Since these are not on chain, signing these messages will not result in gas charges.

EIP-2612 is an ERC-20 extension, meaning optional feature. But most of the ERC-20 tokens circulating in the market don't have this feature, which means users don't always get the benefits when interacting with DApps.

And this is where Uniswap License2 comes in. This middleware EIP-2612 extends to the entire platform of ERC-20 tokens.

But what appears to be a significant upgrade for DeFi participants in the world's largest decentralized exchange has prompted one researcher to sound the alarm bells.

About a week after Uniswap's new contract was released in November 2022, security researcher Roman Racklin published a Medium article to show how illegal actors can get license signatures through phishing methods.

Racklin shows how the Permit2 cheat works. (Roman Rahlin)

“A month after I published my article, I saw some drains that started using license signatures like I showed,” Racklin says.

Uniswap did not respond to the magazine's request for comment.

ERC-20 and cryptocurrency scams

None of this is to say that ERC-20 tokens weren't a huge advance when they were introduced eight years ago. New fungibles on Ethereum provide a general framework that allows tokens to be created and function smoothly within predefined rules.

The core functions of the standards, such as the “authorization” mechanism, allow token holders to manage their assets in a decentralized ecosystem and authorize transactions on behalf of their assets, thus promoting the growth of DeFi.

There is a difference between Ethereum's native currency, Ether, and ERC-20 tokens, particularly in how they interact with smart contracts.

For one, sending Ether to a smart contract is straightforward. A user simply sends Ether to someone else's wallet, just like you would when sending it to someone else's wallet.

But ERC-20 tokens require approval when interacting with other smart contracts. Malicious actors can target this authentication process to trick users into signing fake messages.

“The standard itself is wrong,” Mikhail Vladimirov, Ethereum developer and smart contract auditor, tells the magazine.

Headshot Of Mikhail Vladimirov.Headshot Of Mikhail Vladimirov.
Ethereum developer and auditor Mikhail Vladimirov.

In the year In 2016, Vladimirov developed a paper that theoretically described the “authorization” attack vector, in which changes in the authorized token amounts can be used by malicious entities to move larger amounts of money than originally authorized by the token owner.

For example, let's say Alice owns 1,000 tokens and wants to trade them on DEX. Alice uses the “Approve” function to have DEX issue 500 tokens on her behalf. But Alice changes her mind and wants to shop more.

Alice can increase the amount of tokens allowed by first setting the subsidy to zero and then approving 800 tokens. In this hypothetical scenario, a malicious actor could initiate the transaction by issuing more tokens than Alice intended, in the short time before the reset to zero and before the new allowance.

This particular theoretical attack can be very difficult to pull off because it relies on targeting a short window when Alice adjusts approval.

The paper proposes a solution to this hypothetical attack that allows users to change allowances instead of setting new ones.

In the year In 2017, the adoption of “allowance increase” and “allowance decrease” functions began to address “endorsement” attacks by allowing tokens to adjust their allowed token amounts without completely adjusting them.

With these actions, Alice does not have to reset to zero but can directly change her bonus to 800 tokens.

Read more

Main characteristics

Wild, Wild East: Why China's ICO Boom Refuses to Die

Main characteristics

How to Prepare for the End of the Bull Run, Part 1: Timing

“The increased allowance function is intended to solve this problem, but in the long run it often creates additional costs for the end user,” Lev Menshikov, a security researcher at the auditing firm Oxorio, told the magazine.

In a scam, illegitimate actors can send phishing messages asking users to increase their token allowance for seemingly legitimate reasons – such as a fake upgrade that forces users to continue enjoying their services without disruption, or a false security measure that forces them to add valid tokens. .

This allows the hackers to move authorized tokens from the user's wallet to their own, depleting the entire amount in some cases.

ERC-20 tokens: the curse of immutability

Incremental allowances were removed from ERC-20 contracts last year and moved to extensions after independent security researcher pcaversaccio raised concerns about the potential for fraud enabled by the practice.

“Contracts are fixed and cannot be changed,” Picaversaccio told the magazine.

For existing tokens in circulation – and an undisclosed number of them – modifications cannot be made due to the immutable nature of the blockchain.

However, by using modifiable proxies or intermediate contracts, projects have the ability to add or subtract activities such as “incremental allowances” and eliminating non-core activities. 20 signs that are powerless.

A Screenshot Of Pcaversaccio'S Proposal On Openzeppelin To Remove Incremental Allowances And Reduce Allowances From The Erc-20 Level.A Screenshot Of Pcaversaccio'S Proposal On Openzeppelin To Remove Incremental Allowances And Reduce Allowances From The Erc-20 Level.
Researcher pcaversaccio recommends removing activities that enable phishing schemes. (Open Zeppelin)

But pcaversaccio adds that the “validation” function should be kept since it is from the original ERC-20 list.

That means the attack vector lasts forever.

“Immutable behavior is a feature, not a bug at the implementation layer.”

He says the issue is at the application layer – like DApps and wallets.

Vladimirov acknowledges that there are flaws in the ERC-20 design, but the rise in fraud is primarily related to social engineering — deception tactics that trick people who interact with security systems — rather than the technology itself.

Instead of technical jargon or codes that confuse users and make them more vulnerable to fraud, wallets should offer simplified or human-readable formats, he argued.

Eth Hub'S Eric Connor Posted On Twitter The Priorities Of Ethereum Community Members.  Token Validation Issues On The List.Eth Hub'S Eric Connor Posted On Twitter The Priorities Of Ethereum Community Members.  Token Validation Issues On The List.
Token validation issues seem to be a priority for Ethereum. (Eric Connor)

“Unfortunately, we cannot ask everyone. [wallets] To do things the right way, especially if the community can't agree on the right way,” says Vladimirov.

Ohtamaa says the security community doesn't consider scams to be a big deal, as they mainly affect low-knowledge users or face play by mistake.

“Some security researchers are more arrogant, saying ‘stupid user issue' or something like ‘wallet and front-end developers need to fix,'” says Ohtamaa.

Phishing attacks contain crypto OGs

As time goes by, anyone and everyone who trades regularly in the Ethereum ecosystem will start to fall victim to the ubiquitous scams.

Even crypto miners like Nexus and crypto natives partnering with forensics platform Intelligence on Chain have fallen victim to sophisticated social engineering tactics.

Pickle Finance'S Beary The Cucumber Tweets Have Fallen Victim To A Phishing Attack. Pickle Finance'S Beary The Cucumber Tweets Have Fallen Victim To A Phishing Attack.
Beary the Cucumber falls victim to the act of consent. (the pumpkin pumpkin)

“The damage was serious, but I'm slowly working to recover,” said Nexus, which says it lost nearly $20,000 to the phishing scam.

Nexus said it was tricked by an account by an NFT artist and visited a fake Web3 social media project website.

“I didn't know until late at night,” he added.

The co-founder of the DeFi platform Pickle Finance, who goes by the nicknames “Larry the Cucumber” and “Beary the Cucumber,” has also fallen victim to a recent phishing scam involving the “license” function.

Unlike most victims, Larry the Cucumber took extra precautions by using a transaction token that allowed users to review the status before completing the transaction.

Menshikov of Oksorio warned investors that new fishing trends are emerging.

“The most important trend I can highlight in the phishing field is the popularity of attacks against ENS Domain owners,” Meshikov said.

In this phishing technique, attackers send fake email alerts to ENS domain owners to lure them to a fake renewal site where their funds are available.

Read more

Main characteristics

Game Theory Meets DeFi: Brainstorming Around Tokenomic Design

Main characteristics

On… Why don't more law schools teach blockchain, DeFi and NFTs?

Vladimirov notes that the immutability of smart contracts and the ever-growing number of tokens make it difficult for any on-chain solutions to prevent attacks, and notes that social engineering tactics (AKA conmen and tricksters) have existed long before crypto.

Instead, he says, the real solutions will come from the evolution of security tools that can alert users to known attack viruses.

Larry the Cucumber told the magazine that crypto users can use security tools like WalletGuard and Pocket Universe to scan URLs to detect threats like wallet leaks.

Pcaversaccio's general rule for avoiding phishing scams is to be suspicious of everyone and everything: “Be bold about everything you sign.”

But Ohtama takes the somewhat cynical view that more money will be made by “not fixing the issue.”

“It's always more profitable to sell aspirin than to cure the patient,” says Otama.

John YunJohn Yun

John Yun

Yohan Yun is a multimedia journalist who has been reporting on blockchain since 2017. He has contributed as an editor to crypto media outlet Forkast and covered Asian technology stories as an assistant reporter for Bloomberg BNA and Forbes. He spends his free time cooking and experimenting with new recipes.

Leave a Reply

Pin It on Pinterest