πŸŽ‰πŸŽ°It's ERC-777 week! πŸŽ°πŸŽ‰

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:

Another way to think of ERC-777 is that it makes tokens that work more like Ether.

Have you noticed that you need to approve every token you use with Uniswap, but you never need to approve ETH?

ERC-777 can be transferred & call other functions in one transaction, just like ETH.
ERC-777 improves upon ERC-20 in the following categories:

- User experience πŸ‘¨πŸΌβ€πŸ’»
- Cost πŸ’°
- Security πŸ”’

I'll cover each of those topics in depth this week...
So who's using ERC-777 tokens today?

Honestly, not too many projects.

@pNetworkDeFi is one of the more notable projects

@Superfluid_HQ uses 777 tokens and really takes advantage of some cool features of it

And my project @DeFi_777 allows wrapping any token into a 777 token
But to be honest, it's clear that ERC-777 is never going to take off on L1. The network effects of ERC-20 are too strong.

But the upcoming transition to L2 provides a blank canvas for us to fix some of the issues of L1 Ethereum!
When you deposit a token into a rollup bridge, you receive a new token on L2. And this is our opportunity to seamlessly "convert" tokens to ERC777.

@arbitrum has already included ERC777 in their token bridge.

And I'm working on a PR right now for 777 bridge for @optimismPBC.
Moving to ERC-777 on L2 will be a huge step forward for Ethereum, but I need the community's support to make it happen!

So let me know if you have thoughts or questions about ERC777!

And check back tomorrow for a thread about how ERC-777 fixes the Ethereum user experience! πŸ˜€

β€’ β€’ β€’

Missing some Tweet in this thread? You can try to force a refresh
γ€€

Keep Current with David Mihal

David Mihal Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @dmihal

5 Mar
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.
ERC-777 is well supported by the @OpenZeppelin contract templates.

You can easily use their ERC777 template, just like you use the ERC20 template.

One small difference is that ERC777 requires an array for default operators, which I usually set to an empty array. Image
One of the best parts of ERC-777 is building applications using receive hooks.

Contracts that receive ERC777s need to:
- register in the ERC-1820 registry
- implement the tokensReceived() function

I made a simple contract that you can inherit for this:
gist.github.com/dmihal/7020e24…
Read 10 tweets
4 Mar
It's day 4 of ERC-777 week! πŸŽ°πŸŽ‰

While I believe ERC-777 is the best standard for fixing ERC-20, it's certainly not the only one.

Today I'll cover the pros & cons of some other standards:

- ERC-2612 permit()
- ERC-3009 transferWithAuthorization()
- ERC-677 transferAndCall()
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.
Read 15 tweets
29 May 20
/1 DeFi has made incredible progress in the past few years, but it still faces many usability problems.

I'm excited to share my newest project: 🎰DeFi777🎰, which introduces a new pattern for interacting with DeFi protocols.

medium.com/@dmihal/introd…
2/ I built this project for the @ETHGlobal #hackmoney hackathon.

Check out the submission videos Television I threw together:

3 minute version:
5 minute version:
3/ Dapps can be scary and confusing. Users need to install Metamask, navigate confusing popups, set gas parameters, etc.

Argent has done amazing work to simplify this experience, but they've had to build custom integrations for each DeFi protocol.

That's not open or scalable.
Read 10 tweets
18 Apr 20
(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.

eips.ethereum.org/EIPS/eip-777
(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.
Read 12 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!

Follow Us on Twitter!