razgraf Profile Banner
Razvan Gabriel | razgraf.eth Profile
Razvan Gabriel | razgraf.eth

@razgraf

Followers
1K
Following
8K
Statuses
2K

Co-founder and CPO @Sablier Prev. @PodsFinance Product designer & engineer πŸ‘¨β€πŸ’»πŸ¦‡πŸ”Š a16z CSX β€˜24

πŸ‡·πŸ‡΄
Joined November 2014
Don't wanna be here? Send us removal request.
@razgraf
Razvan Gabriel | razgraf.eth
2 days
Picture this: you're building the next big thing on @ethereum Your app allows users to __ ERC20 tokens. Cats, dogs, penguins, the US dollar, you name it, anything that's a token, users can __. They click the button. Something breaks. Let's explore the dark side of ERC20sπŸ‘‡πŸ§΅
Tweet media one
2
4
15
@razgraf
Razvan Gabriel | razgraf.eth
2 days
Did you know some tokens store their details as bytes32 instead of strings? Famous example of this was @SkyEcosystem’s OG $MKR token.
@razgraf
Razvan Gabriel | razgraf.eth
2 days
Solution? Don't expect to always get strings. Query for token details in both formats, at once or in sequence. If the call expecting a string result fails, revert to the bytes32 version (and manually convert to strings afterwards).
Tweet media one
0
0
1
@razgraf
Razvan Gabriel | razgraf.eth
2 days
@rauchg You need a new pen, that looks like an outdated β–² logo right there πŸ‘€
0
0
1
@razgraf
Razvan Gabriel | razgraf.eth
2 days
RT @razgraf: Picture this: you're building the next big thing on @ethereum Your app allows users to __ ERC20 tokens. Cats, dogs, penguins,…
0
4
0
@razgraf
Razvan Gabriel | razgraf.eth
2 days
H/t to @MirceaGavriliu, @sy100x for ideas and feedback + @PaulRBerg for recommending I write this thread. -- What other ERC20 unexpected mechanics have you uncovered?
0
0
6
@razgraf
Razvan Gabriel | razgraf.eth
2 days
β†’Token details, string vs bytes32 Most ERC20s return name/symbol as strings. To optimize gas, devs may choose to represent these in bytes32. The switch can cause failing queries, or worst, failing infra when indexers like @graphprotocol or @envio_indexer stop parsing events βœ‹
1
0
4
@razgraf
Razvan Gabriel | razgraf.eth
2 days
Fancy a long-form option you can bookmark and enjoy later? Head over to the @Sablier blog to get the full piece. Or keep reading for some not-so-easy to spot pitfalls with ERC20 tokens.
1
0
4
@razgraf
Razvan Gabriel | razgraf.eth
2 days
Picture this: you're building the next big thing on @ethereum Your app allows users to __ ERC20 tokens. Cats, dogs, penguins, the US dollar, you name it, anything that's a token, users can __. They click the button. Something breaks. Let's explore the dark side of ERC20sπŸ‘‡πŸ§΅
Tweet media one
2
4
15