Network fees for blockchain transactions are notoriously difficult to explain to mainstream users. The Gas Station Network allows DApps to foot the gas bill. Problem solved, right? Not quite.

portis
portis
Aug 9 · 6 min read
Photo by Wojtek Witkowski on Unsplash

Ain’t Nobody Paying Your AWS Fees

Whenever we discuss the hard parts of blockchain UX, the two issues that always stand out are private key management and network fees. This post is about the latter.

Users don’t like network fees

Network fees are confusing and feel out of place. Even if users do understand why they’re needed, they might get upset about the whole idea. After all, in the familiar world of web2, they aren’t paying anyone to use web apps, so this requirement can create antagonism towards your DApp.

The friction is real

Paying gas fees requires users to get their hands on some ETH, which means going through KYC and buying a lot more than they need just for gas. All of this, even if they only want to interact with your DApp, not necessarily buy something.

“There has to be a better way!”

“Free Rides!”

In the early days of Portis, we were determined to let users experience the true potential of DApps. We wanted to get around the issue of network fees, so we simply gave each new user $1 of ETH for free.

Scalable? Hell no. Abusable? You bet.

But it did the trick. DApp owners loved it since it gave their users an opportunity to actually use their DApp with minimal friction.

At some point, despite our phone verification process, the abuse became too costly to manage (in some countries, it’s well worth your time to go to great lengths of trouble for $1 of free ETH), so we had to shut it down.

Nevertheless, our little experiment was a success

We saw that once you remove the friction of network fees, churn is reduced significantly.

After all, the difference between 1 cent and free is more than just 1 cent.

Introducing MetaTx

In September 2018, while we were still giving out $1 of free ETH to new Portis users, a group of people in ETHBerlin were discussing the same issue of network fees and how it might be solved using something called Meta Transactions (or MetaTx for short). This group would go on to become the MetaCartel.

From conference to hackathon to meetup, discussions continued, and this group grew in size, as more and more developers were eager to solve this challenge in an elegant fashion.

MetaCartel dinner during DevCon 4. The two guys sitting to the right of the guy standing up in the colorful sweater? Portis co-founders Tom and Itay :)

“Do You Accept the Charges?”

Since the DApps themselves sponsor the users’ gas fees, we like to compare MetaTxs to collect calls. The user is trying to make a call to the DApp’s smart contract, and the DApp is the one picking up the tab for the call by agreeing to accept the charges (in theory, it can be anyone accepting the charges, but we believe it will be mostly DApps, and perhaps also wallet providers).

Instead of asking users to deposit gas money in their wallets so they can submit transactions to the network, they only need to sign messages that convey what a regular transaction would have done. A “gasless transaction” if you will.

Those signed messages are sent to a relayer using a regular HTTP API endpoint. The relayer then wraps the message inside a MetaTx, paying the gas fees for both the user’s original message/transaction and the newly wrapped transaction.

The DApp smart contract knows how to handle this MetaTx, unwrapping it and executing the content of the message as if it was a regular transaction.

At first, this seems like a terrific solution, but further investigation reveals plenty of difficult challenges, mainly revolving around centralization and synchronization.

The Gas Station Network (developed by the amazing team at TabooKey), which we talked about in a previous post, solves these challenges and provides a robust and decentralized way of sponsoring users’ network fees.

Less Is More

We got the GSN hooked up to Portis (Ropsten only, mainnet coming very soon. Update: mainnet is live!), and the experience in our demo DApp CryptoPuppers was amazing: a brand new user could write to the blockchain for free in seconds! Couple that with the smooth Portis onboarding experience and we have removed literally all friction. A few clicks are all it takes to interact with a smart contract. Outstanding!

Once we finished geeking out, our first dilemma was “so… what do we write under network fees?”

One approach was to simply show nothing. After all, when you upload an image to Instagram or book an apartment on Airbnb, the app doesn’t tell you that they’ve just paid $0.000001 for AWS on your behalf.

On the other hand, gas fees wouldn’t necessarily always be free. Some DApps won’t sponsor them. Others might only sponsor gas fees for specific actions and/or certain users. We like our UI to be consistent.

“Look Ma, No Gas!”

A decision was made — under “network fees” we will write down “Free”. We believed DApps might also wish to convey to the user that they have sponsored their gas fees, as this is still not the norm everywhere.

A Match Made In Heaven

In our quest to offer users the best blockchain UX possible, we released a feature last year called “Trust this App”, which we explained here.

As a user, trusting a specific app means you won’t need to manually confirm each action through Portis, as long as you’re only paying small amounts for network fees. Portis will keep track of users’ network fee expenses, and if they exceed $1 per hour, they will revert to using manual confirmations.

The Gas Station Network makes sure that last part will never occur (as DApps are footing the gas bill for each transaction), meaning that by combining these two features (gas sponsoring + trust this app) we can finally offer end-users a web3 experience that feels like web2.

Simple. Secure. Seamless.

There are many scenarios that need to be considered, such as what happens when the DApp turns off the relay (or it runs out of funds), which users are worthy of being sponsored, and many more.

Luckily we have a wonderful community of DApp developers to brainstorm with and figure out solutions to these challenges, so we can provide users with solutions that are both secure and simple to understand.

We’re looking forward to exploring these uncharted territories with our partners, paving together the path of least resistance to the blockchain.

Make sure you also check the GSN website built by the terrific team at Zeppelin.

Happy coding!

The Portis Team

Have any questions? Join the conversation on our Telegram and Twitter. Ready to #BUIDL? Head on to our docs.
Got any suggestions? We 💙 feedback!

Portis

Redefining Blockchain UX

Thanks to Martin

portis

Written by

portis

https://portis.io

Portis

Portis

Redefining Blockchain UX

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade