Miguel Piedrafita

Miguel Piedrafita

Miguel Piedrafita

Articles & Threads

Articles & Threads

A collection of thoughts, tutorials & threads.

Web3 is not a space, but a tool
Miguel Piedrafita

Miguel Piedrafita

Brain dump on post-crypto perspective, and re-exploring who I want to be.


I learnt to code because I wanted to "build things". For years, I built app after app, not only as a way to learn more and more, but also to bring my ideas to life.

Continue Reading
How to "Discover" Good Tweets
Miguel Piedrafita

Miguel Piedrafita

quick alpha for good twitter takes:

talk to lots of people

identify the ideas/examples you keep bringing up in every conversation

tweet those ideas to keep track of them

over time, refine and rehash those ideas over more tweets


earliest example of this I can think of is my experience with my school trying to "update" itself.

I realised I was always bringing up the same example when talking about crypto-native apps, so I made it into a thread.

Continue Reading
How to Learn Anything
Miguel Piedrafita

Miguel Piedrafita

📝 How to learn anything

Get started with a project, with a stack you're familiar with (but a new piece you want to master).

Then, debug your way into knowledge.


This is the technique I've been using for 10 years to learn pretty much everything I know.

I wrote an short article on it a year ago, when I had just gotten started with crypto.

Continue Reading

🎙The last episode of 's new crypto podcast told the story of .

As an addendum, I talked about my experience there, and tried to explain why I'm so excited for the web3 space.

also, purple flowers 💐

Gas Optimizations for the Rest of Us
Miguel Piedrafita

Miguel Piedrafita

The basics of optimizing Solidity contracts, explained for regular coders.


Writing smart contracts is hard. Not only do you get a single chance to write bug-free code, but depending on exactly how you write, it’ll cost your users more or less to interact with it.

Continue Reading
An open-source transaction intelligence repository
Miguel Piedrafita

Miguel Piedrafita

✨ Wallet history is notoriously hard to "explain" to users. At best, you get a bunch of swaps, but every other tx is a "contract interaction".

I've spent the past week working on a solution (and recreating the iOS lockscreen on web to showcase it 🤪).


🔎 Today, your wallet's history is a big mess of numbers for anyone non-technical.

Even if websites build UIs for submitting transactions, all context is lost once they leave the page, and they'll have to face Etherscan if they ever want to remember what that was again. 🤷

Continue Reading
Optimizing RPC calls
Miguel Piedrafita

Miguel Piedrafita

🛠 Had to optimise some RPC calls today, and noticed that ethers.js calls eth_blockNumber every time you call getTransaction().

If you don't care about network confirmations and want to save on your Infura bill, you can use this helper instead 😁


And while we're at it, if you need to lookup a lot of names, use multicall to do it on O(2) transactions instead of O(n*2).

Here's a little ethers.js implementation I made, which already includes an ENS method, just call resolveNames(addr)!

gas is to today's blockchain what bandwidth was to 1990's interney

We spend too much time explaining the specifics of NFTs to anti-crypto people.

We should be explaining how the current systems work instead, in short & accesible formats.

Otherwise, they're just hating Capitalism through us, without understanding how we make things better.

NFTs enable patronship, not paywalls
Miguel Piedrafita

Miguel Piedrafita

Something the "right click save" people need to understand, is that NFTs don't represent ownership as in "only I can use/see this content".

We're not building paywalls.

We're building systems where you can click on an image, see its creator, and who financially supported them.


With the new Twitter update, I can now go into someone's profile, click their pfp and instantly know who the artist is.

Sure, "you don't neccesarily need the blockchain to do this", but you'd need all companies to agree on using a global database.

Ethereum is that database.

Continue Reading
Explaining crypto from scratch to a non-technical teenager
Miguel Piedrafita

Miguel Piedrafita

✨ A few months ago, I made a stream where I got a non-technical friend and explained everything crypto to them, from blockchains and PoS, to smart contracts, ENS & more.

I finally had time to edit the 5h of stream into a consumable video 😁

Enjoy! 👇👇


Keep in mind this stream happened a few months ago, when I knew much less about the space (especially DeFi), and lots of things have changed since then, but I thought it could be helpful for some people anyway 😁

Continue Reading

📝 Some notes on how I’d recreate ’s token race mechanism fully on-chain.

🔐 Uses ’s EIP-3668 (offchain data retrieval) to verify Twitter profiles from Solidity

🗳 Both voting power and rewards can be tokens or NFTs, and are distributed trustlessly!

Why Gaming NFTs look like scams
Miguel Piedrafita

Miguel Piedrafita

I feel like the reason why gamers are so against NFTs in games (aside from hating lootboxes, which is fair) is that games are inherently centralised.

The only true benefit of gaming NFTs is decentralisation, and games are precisely defined by their limitations, their rules.


But what about "X thing NFTs enable" (interoperability, reselling, etc.)?

As many have pointed out, you can already have all those things without NFTs. You can build marketplaces, APIs, and SDK's to share content between games.

You can do all those things, in a centralised way.

Continue Reading
Short Thoughts on Music NFTs & Manufacturing a Product
Miguel Piedrafita

Miguel Piedrafita

Music NFTs will not happen until all the thought leaders and VCs stop talking about them and trying to make it work

I rlly think someone needs to come in without having heard of the concept before for it to work, and that kind of person is being scared away rn by all the hype


It's the same as 's $DOG & a bunch of other "VC flagship ideas".

They need to happen organically, and any attempt to "manufacture" them will fail.

And they'll not happen organically if everyone keeps overhyping the idea and raising insane rounds for prototypes

Short Thoughts on DAO Takeovers
Miguel Piedrafita

Miguel Piedrafita

Something I realised while working & watching other "open DAOs":

The builders will usually be hands down building and with no time to be active in Discord/community.

The most active & visible people in the community can often be the ones adding the least value.


This is really dangerous, especially at the start, since it makes it really easy for "grifters" to take credit over everyone's work, or even hijack the DAOs leadership.

It's the prisoner's dilemma all over again, if everyone collaborates but someone deflects, they can take over.

Continue Reading
We're Buying the US Constitution
Miguel Piedrafita

Miguel Piedrafita

📜 My friends and I are buying one of the 11 surviving copies of the US Constitution, and you can help!

Introducing , a project to "rescue" the Constitution from the hands of private collectors, and put it back into the hands of The People.

WTF is going on? 👇


In September, announced they were going to auction the only copy of the Constitution still in the hands of private collectors.

This Reuters article surfaced in our feeds yesterday, and we started joking around with "aping into the constitution"

Continue Reading
A proposal for web2.5
Miguel Piedrafita

Miguel Piedrafita

✨ The blockchain is one of the biggest innovations of this century.

Like computers or the internet in their early stages, it's currently very limited.

We can't build most kinds of apps on-chain today, but we can future-proof them for when it evolves.

Welcome to web2.5 🚀


Smart contracts on the Ethereum blockchain are insanely powerful ideas but, in practice, they contain some pretty big limitations.

Contract code must >24KB. Each assembly call is priced by a certain amount of gas (storing a word is ~20k), and the maximum gas for any tx is ~30M

Continue Reading
Paradigm Shifts: don't rebuild, reimagine
Miguel Piedrafita

Miguel Piedrafita

✨ I have a story that always comes to mind when analyzing new paradigm shifts.

It applies as well to web3, as it does to the Internet or any other big shifts in the way we do things.

I've told it to many people in the last few months, so I thought I'd share it with everyone 👇


I lived through the middle of a "paradigm shift" in high school.

We had been using books for years (as everyone does), but suddenly the school decided they wanted to modernize, and issued a Chromebook to every student.

Teachers were given a year to upgrade their teaching plans.

Continue Reading
More thoughts on Worldcoin
Miguel Piedrafita

Miguel Piedrafita

🌎 Some more thoughts on

Here are some things people seem to be confused about it, and some answers to the most common questions I've seen.


First, what is Worldcoin?

If you haven't read it already, I wrote a thread yesterday summarizing what it is and why I'm excited about it.

Make sure to check that out first 👇

Continue Reading
Why I scanned my iris for crypto and you should too
Miguel Piedrafita

Miguel Piedrafita

🔥 I scanned my iris to participate in an experiment for global currency, UBI, biometric sybil-resistance and crypto.

Here’s what is, how it works, how it might not work, and why I’m very excited about it anyway.


✨ Worldcoin is an attempt at creating a collectively-owned global currency that gets distributed fairly and anyone has access to.

To get there, they want to allow everyone to claim a free share of it. 💸

Continue Reading
It's Showtime!
Miguel Piedrafita

Miguel Piedrafita

👋 Hey! I couldn't be more excited to announce I'm joining Showtime to help build the best crypto social network.

A short recap of my life until now

I’ve been coding for a while now, almost 10 years. I started with open-source and slowly shifted gears to become an indie maker. I managed to build an audience around my indie journey and my projects, meet amazing people and have lots of fun.

Continue Reading
How to Learn (Crypto)
Miguel Piedrafita

Miguel Piedrafita

Outlining my approach to quickly learning new subjects, and how you too can become a crypto expert in less than you think.


In the past few months, I went from knowing almost nothing about crypto to minting NFTs, launching my own token, and getting a job at a crypto startup (TBA).

Continue Reading
Server Authentication for web3
Miguel Piedrafita

Miguel Piedrafita

One of the big appeals of dApps is that the user owns their data. However, for this to be true, we need to authenticate the user with their web3 identity (their wallet). This is easy to do client-side (since they can submit all their tx's themselves using Metamask) but gets harder when we need to verify their identity from a server.

In this article, I’ll be outlining the technical implementation of a “Login with wallet” button, similar to the ones provided by Showtime or Foundation.

Continue Reading
Building apps with Mirror
Miguel Piedrafita

Miguel Piedrafita

Over the past few weeks, I built a few apps that integrated with Mirror, to try and understand how their protocol worked. I started using their internal APIs and, from there, worked my way to more decentralized sources. Here’s how I did it (and how you can too).

The Actual Write Race

The idea for The Actual Write Race was to build a list of all existing Mirror publications, and rank them based on the number of articles they had written (simulating Mirror’s $WRITE race) to add a fun touch.

Continue Reading
Hello, Mirror!
Miguel Piedrafita

Miguel Piedrafita

Hey! I’m Miguel, and last week I dropped out of university to work on crypto. I’ll be using Mirror to share my crypto journey and talk about projects I work on and things I learn.

Up next, I’ll be publishing about how I built a Mirror client with Next.js (and how you can build apps on top of Mirror), some thoughts on the future of web3 apps and why I think Mirror is one of the most exciting projects on the space, and a look at how “Login with your wallet” flows are implemented.

If this sounds exciting, you can follow me on Twitter to keep up with me and get notified when those posts go live.

See you around!

Introducing dm.link
Miguel Piedrafita

Miguel Piedrafita

✨ I've been working on something new this past few weeks, and I'm super excited to finally share it with everyone

🚀 Introducing

, a new way of distributing your Twitter content

Learn more about what it is and why I'm excited about it below 👇


To put it simply,

enables "DM newsletters".

You can create DM lists people can follow, and send tweets to those lists without even leaving the Twitter app.

In fact, the whole subscription process happens without leaving Twitter as well 😯

Continue Reading
Twitter's DM Third-Party Client Issues
Miguel Piedrafita

Miguel Piedrafita

Everyone wants a standalone Twitter DM app, so why is nobody building one?

A breakdown of the problem, all possible workarounds, and what I consider to be the optimal solution 👇


Twitter has an API and endpoints for retrieving & sending direct messages.

However, the API only provides access to the last 30 days of DM history.

No app (except Twitter's apps) can access messages (or entire chats) sent more than 30 days ago.

Continue Reading
2020 in Review
Miguel Piedrafita

Miguel Piedrafita

🎊 2020 in Review

This will hopefully get fleshed out as an article at some point, but I thought I'd get it out before the year ends.


January:

  • Continued working on
  • RE'd 's API
  • Got in a relationship (still going!)
Continue Reading

I also wrote plenty of articles before crypto, on the projects that I was working on, and the things I learned there.

You can find those in the archive →