1/ ERC-20 token standard approve() has caused an unnecessary cost of $53.8M for #Ethereum and #DeFi users

This is bad. Continue reading why and how to avoid this in the future.

👇👇👇

2/ Before you go all rage on the flaws of my analysis, please read the whole Twitter thread for disclaimers and caveats.
3/ approve() is an unnecessary step of ERC-20 tokens when they interact with smart contracts.

You know this because when you do a Uniswap trade you need press two transaction buttons instead of one.
4/ Why there is approve() - you can read the history in this Twitter thread

https://t.co/ZHXzPBbqJJ
5/ I queried all approve() transactions on Google BigQuery public dataset and calculated their ETH cost and then converted this to the USD with the current ETH price.
6/ These queries were made possible to awesome @EthereumETL team. They have created Google BigQuery dataset from real-time blockchain data. You can query over terabytes of Ethereum data FOR FREE.
7/ Here are instructions on how to execute your own queries:

https://t.co/YnK1p8u75n

(But links are outdated because Google Cloud has new UI)
8/ Total transaction on #Ethereum blockchain: 989,461,092

Woo! One billion transactions will be done in a few days!
9/ Total ERC-20 transfers(): 304,382,558

Includes only Externally Owned Accounts, EOAs.
10/ Total ERC-20 approves(): 14,921,106

Includes only Externally Owned Accounts, EOAs.
11/ The gas cost ERC-20 approves():

41327.870139658684 ETH
12/ Here is my query

https://t.co/FqNWBAxjwt
13/ You can query Ethereum transactions that call a particular smart contract function by the 4-byte signature of the function that is 1st parameter of tx data field.
14/ Binary function signatures are 4-bytes keccak256() hash of the @solidity_lang signature string. Here is an example:
15/ If you are a @solidity_lang or Vyper developer, consider ditching ERC-20 and include alternative token standard in your next token.

Alternatives for ERC-20 include:

ERC-777
ERC-667
ERC-827
ERC-223
(did I miss any?)
16/ Most of the new token standards, like ERC-777 are backwards compatible and work with ERC-20 enabled centralised exchanges.

Centralised exchanges do not need to do anything to support these new, better, token standards that make smart contract and #DeFi interactions safer.
17/ Or let's put it this way...

Every time someone creates a new ERC-20 token, hundreds of thousands of dollars die.

Let's actively demanding non-ERC 20 tokens from developers.

And if that does not work I suggest we start punching ERC-20 developers to face over the internet
18/ Newer token standards may "increase the attack surface", but in practice, this has not been a problem for high-quality #DeFi projects since 2018 or so.
18/ Note that raw approve() cost calculation comparison to newer token standard is not 1:1.

Newer token standards need some similar mechanism to pass user data as the part of the transaction, but this cost is lower compared to additional approve() tx.

Prove me wrong.
19/ FIN

CC @dmihal @FrancescoRenziA @abcoathup

Now I am going to climb the mountain, get fresh air and visit monkies

More from Crypto

A primer on how to use @coingecko for your crypto data/research/trading needs.

Share it with a friend who needs it!

1/ Getting started with crypto and want to check prices/projects? https://t.co/LFnk4vukxj has info on just about every crypto you'll need :)


2/ Search over 6000+ cryptocurrencies available on the market. You can see what's trending in the space as well.

Researching by categories? Filter (left side) -> Select categories -> DeFi, DOT ecosystem, Exchange-based tokens, NFTs - anything!


3/ Lets say you're looking at #Bitcoin
https://t.co/g205lj03pG

At a glance you get:
- Price
- Mkt Capitalization (valuation)
- Circulating/Total supply
- 24h trading volume
- Links to websites, social media, block explorers
- Calculator

Next - check valuation?


4/ Market cap is used to rank coins, and we'll show you how its calculated - Hover over Circulating Supply (?) for breakdown.

Note: used @chainlink as example here - https://t.co/Jc46fe79Ag

While MC is important also consider product fit, narrative, team, community etc.


5/ If you're trading on AMMs like @Uniswap or @SushiSwap, you can copy the contract address directly to your clipboard.

Using @metamask_io? Add the token directly so it shows as one of the "Assets" that you own in the wallet.

See: https://t.co/94XihMf5oz
Back with another #FreeLoveFriday. Last time, we covered how Mastercoin/@Omni_Layer pioneered digital asset issuance on blockchains. Today, let’s discuss @Chainlink and the vital role it plays in connecting blockchains to the real world.


I have said repeatedly that digital asset issuance is the killer application for blockchains. The next frontier is bringing real world assets to networks like @AvalancheAVAX, but we often face a significant problem:

Namely, how do you get data from the real world onto blockchains and into applications running on them? More critically, how do you achieve that securely and transparently in real-time? Smart contracts are tamper-proof, but they're only as reliable as their input data.

Enter ChainLink in September 2017, with a whitepaper outlining a vision for a decentralized network of “oracles,” entities that inject facts from the external world into blockchains in a suitable format for smart contracts.

Until ChainLink, oracles were trusted and centralized. This is a huge problem for high-value assets and smart contracts. High value projects, such as @CelsiusNetwork, @synthetix_io, @Aaveaave and others depend critically on oracle data.

You May Also Like

Margatha Natarajar murthi - Uthirakosamangai temple near Ramanathapuram,TN
#ArudraDarisanam
Unique Natarajar made of emerlad is abt 6 feet tall.
It is always covered with sandal paste.Only on Thriuvadhirai Star in month Margazhi-Nataraja can be worshipped without sandal paste.


After removing the sandal paste,day long rituals & various abhishekam will be
https://t.co/e1Ye8DrNWb day Maragatha Nataraja sannandhi will be closed after anointing the murthi with fresh sandal paste.Maragatha Natarajar is covered with sandal paste throughout the year


as Emerald has scientific property of its molecules getting disturbed when exposed to light/water/sound.This is an ancient Shiva temple considered to be 3000 years old -believed to be where Bhagwan Shiva gave Veda gyaana to Parvati Devi.This temple has some stunning sculptures.