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

I've just read one of the most lucid, wide-ranging, cross-disciplinary critiques of cryptocurrency and blockchain I've yet to encounter. 1/


It comes from David "DSHR" Rosenthal, a distinguished technologist whose past achievements including helping to develop X11 and the core technologies for Nvidia.

https://t.co/tkAMShno4k 2/

Rosenthal's critique is a transcript of a lecture he gave to Stanford's EE380 class, adapted from a December 2021 talk for an investor conference. 3/

It is a bang-up-to-date synthesis of many of the critical writings on the subject, glued together with Rosenthal's own deep technical expertise. He calls it "Can We Mitigate Cryptocurrencies' Externalities?"

The presence of "externalities" in Rosenthal's title is key. 4/

Rosenthal identifies blockchainism's core ideology as emerging from "the libertarian culture of Silicon Valley and the cypherpunks," and states that "libertarianism's attraction is based on ignoring externalities."

This is an important critique of libertarianism. 5/
1/ @MIT discussing the need for blockchain gateways to achieve interoperability across different blockchain networks, and to support the cross-blockchain mobility of virtual assets

https://t.co/PbjQkSlTT3

@quant_network are collaborating with MIT in the creation of ODAP

$QNT

2/ "In order for blockchain-based services to scale globally, blockchain networks must be able to interoperate with one another following a standardized protocol and interfaces (APIs)"

Gilbert founded ISO TC307 which 60 countries are working towards standardizing the interfaces


3/ "We believe that a blockchain gateway is needed for blockchain networks to interoperate in a manner similar
to border gateway routers in IP networks. Just as border gateway routers use the BGPv4 protocol to interact with one another in a peered fashion we believe that a...

4/ blockchain gateway protocol will be needed to permit the movement of virtual assets and related information across blockchain networks in a secure and privacy-preserving manner"

You can read more about the gateway protocol ODAP in this 21 tweet


5/
"We motivate the need for blockchain gateways and blockchain gateway protocols in the following summary:

✅Enables blockchain interoperability:
Blockchain gateways provide an interface for the interoperability between blockchain/DLT systems that operate distinct consensus...
1. You also have to give them a landing. It's tempting, I know, to take the pent up rage out on the only ones who respond to you (like @ProjectLincoln!) or Never Trumpers like @RadioFreeTom or @BillKristol bc they were "guilty" in the past or "waited too long" like @WalshFreedom


2. but at each of the big inflection moments where Trump lost support I've begged non-Rs to consider the fact that if Trump supporters see that they have nowhere to go, they will stay w the only people that DO accept them, & the price might actually be the collapse of democracy

3. which, until Weds, some people thought I was being hyperbolic about. I WASN'T! When the MAINSTREAM of a major political party divorces themselves from democratic norms & values & its supporters turn to a fictionalized world to justify their political party's actions, your

4. country's stability is at risk & one by-product of poor messaging on the Dem side is that extremism on the Right was able to not only take root in the Rep Party, it was able to take OVER the R party & become the party's mainstream- pinnacled w the presidential win via the EC

5. of Donald Trump, w/o the GOP paying any electoral price for their extremism. A healthy Rep Party might have found the courage to reject Trump's nomination & accept the short term costs that would have come w refusing to endorse his 2016 candidacy. But the Rep Party of 2016

You May Also Like

First update to https://t.co/lDdqjtKTZL since the challenge ended – Medium links!! Go add your Medium profile now 👀📝 (thanks @diannamallen for the suggestion 😁)


Just added Telegram links to
https://t.co/lDdqjtKTZL too! Now you can provide a nice easy way for people to message you :)


Less than 1 hour since I started adding stuff to https://t.co/lDdqjtKTZL again, and profile pages are now responsive!!! 🥳 Check it out -> https://t.co/fVkEL4fu0L


Accounts page is now also responsive!! 📱✨


💪 I managed to make the whole site responsive in about an hour. On my roadmap I had it down as 4-5 hours!!! 🤘🤠🤘