With the upcoming launch of optimistic rollups & some recent hacks, it's time to put some focus back on my favorite token standard!
Every day this week, I'll post a thread about ERC-777 and answer any questions about it
Today: an intro to ERC777 ‡οΈ
I like to think of ERC777 as ERC20 2.0
ERC-777 is a standard for fungible tokens, and it's fully backwards-compatible with ERC-20. It works with any existing wallet, but also adds new features.
For more details, check out this thread I made last year:
It's day 5: the final day of ERC-777 week! π°π
This week we've discussed the pros & cons of the ERC-777 token standard. Today I'll cover things that developers should know about to build with ERC-777, and what the next steps are for this standard.
The most popular of these is permit(), which was originally created for Dai, and popularized in Uniswap V2.
Permit allows a the user to sign a message before their transaction, giving another contract permission to "pull" tokens. This signature gets included in the main tx.
This is a big improvement over the standard ERC-20 behavior.
First of all, users don't need to send an extra approve() transaction, saving them time and money.
Also, users typically don't give infinite approval, which avoids the recent security issues.
(1/10) The imBTC/Uniswap hack took advantage of the ERC777 standard, now I'm seeing many people saying that ERC777 is inherently bad or unsafe.
ERC20 is safer than ERC777 in the same way that Bitcoin is safer than Ethereum. It's safe because it's limited.
Here's some thoughts:
(2/12) First of all, for anyone that isn't familiar with ERC-777, you can think of it as ERC-20 2.0. It's a token standard that's backwards compatible with ERC-20, but adds some new features.
(3/12) The ERC-20 standard was written in 2015. It's very simple, which has helped it become so popular.
However, it's very "underpowered" for a system that's trying to create "programmable money". Many of Ethereum's UX problems come from limitations of the ERC-20 standard.