“the future is ours… if you can count!” — Cyrus, 1979
The story of the Gas Stations Network
In early 2018 we encountered a problem. We wanted to onboard users who had no ETH to pay for gas. Little did we know back then, that this problem haunted many other projects. That got us started on a journey that got us to where we are today — launching GSN on mainnet.
We started developing our own solution, based on the idea of Meta-Transactions, like many other projects did. Place a relay between the user and the blockchain, let the relay pay for the user’s gas and deliver the transaction.
It solved the usability problem, but at a cost we weren’t willing to incur — having a single point of failure. A dapp is as decentralized as it’s most centralized component, so now it’s as fragile as a single host instead of being as robust as the entire blockchain.
Decentralizing, the selfish way.
Our next step was to design a private decentralized network of relays, increasing our dapp’s robustness by adding more relays with no centralized components. We would host relay nodes in different locations, different hosting providers (e.g. Amazon AWS, Google Cloud, Microsoft Azure). Our relays network would be as robust as the amount of money we’re willing to spend on maintaining more relays, although never as robust as the Ethereum blockchain itself.
Something still bothered us. There was still a single point of failure — us! Even if taking the relays network through a denial-of-service attack was no longer feasible, a powerful attacker could still take it down by attacking us, rather than our relays. A legal attack or a financial attack, for example, could force us to take all of the relays down and bring the network down, denying our users access to the dapp. Or someone could apply violence and force us to do this, at gunpoint.
We want something better for our users. Something… like the blockchain.
Robust as the blockchain itself!
What makes the blockchain robust? Why can it withstand censorship attacks better than anything else we know?
The answer is safety in numbers, and decentralization. No single person or entity operates the blockchain. There are way too many nodes to perform a DoS attack. There’s no single entity to threaten legally or hold at gunpoint. Taking a single dapp down requires taking all of them down.
Any new dapp attracts more traffic, driving an increase in the number of nodes. Therefore, the more dapps exist, the more robust each of them becomes.
In fact, the blockchain is better than robust. It is antifragile! An attempt to take it down for the purpose of killing a single dapp would actually incentivize people to run more nodes and the blockchain would grow stronger as a result of the attack.
Then it dawned on us…
United we stand, divided we fall!
Projects that run a single relay are fragile. Projects that run a private network of relays are somewhat robust. But if all projects combined forces together, the network becomes antifragile. No one will take us all down!
Inspired by Cyrus, we went to work. But as Cyrus teaches us, uniting everyone is tricky. Different and competing interests collide, and thus Cyrus has failed. Can we avoid that fate?
YES WE CAN!
We just need to find a way to build a trustless decentralized network of relays, incentivizing each participant to cooperate. Classic game theory style.
We designed and built a relay network whose robustness increases as more dapps join. Relays are incentivised to watch each other and slash non-cooperating relays, but cannot abuse this power. Participants don’t need to trust each other in order to work together. An attempt to flood the network will just increase the fees, making it more profitable to run more relays, increasing the robustness of the network. Antifragile.
As a community, we’re stronger together, as long as we can keep things trustless. By pooling our resources, we make gasless transactions as robust as the blockchain itself. Taking one project down requires bringing the entire network down.
No owner, no single point of failure.
The RelayHub contract, the heart of GSN, is an autonomous and owner-less contract, and all participants are equal. No one, including us, could bring the network down.
Our next step was to make the GSN project itself robust, built to outlast us if needed. We formed the GSN alliance. An increasing number of projects and companies, committed to using GSN, running relays to increase the capacity (while guaranteeing service for themselves of course), and participating in the maintenance of the code base.
…and we’re on!
Today we are launching the Gas Stations Network on mainnet, as public infrastructure for the benefit of the Ethereum community. It will serve everyone, and not be controlled by any one entity.
Special thanks to GSN alliance members, OpenZeppelin who performed the GSN security audit and joined us in building and maintaining the code, to MetaCartel for bringing everyone together and spreading the word, and to Ethereum Foundation and ConsenSys who generously provided grants to help us get GSN to mainnet.
Now that GSN is available, we’re going to keep the momentum going:
- Keep improving the tools around GSN, with the help of our friends at OpenZeppelin and other contributors.
- Building great projects on top of GSN. We at TabooKey are building a great product using GSN. We’re also excited to see teams like Portis building dapps with great UX by utilizing GSN.
- Extending GSN to support more complex use-cases. We’re working with our friends at MakerDAO to make dapps even more accessible to everyone.
- Decentralized Infrastructure Network — GSN is just the start! DIN will extend the idea of GSN beyond meta-transactions, using game theory to provide trustless access to the blockchain without having to run an Ethereum node. More on that in a future post.