1 min read

Put it on my tab 🍻

One of the more annoying aspects of using a dApp is that you have to sign every transaction. That means every time you want to send crypto, update your social profile, make a post, take a turn in a game, etc. The actual process of signing for the transaction isn't difficult, but it opens up your wallet then has you enter your password and click a button.

For a lot of dApps (especially DeFi) this is appropriate. It feels secure because it is. But for immersive experiences like games, it interrupts the flow and breaks your concentration.

The answer is user sessions. If you've ever been to a pub, you're familiar with the social contract of opening a tab. You order as much food and drink as you want while you're there then before you leave, you close out the tab by paying for everything in one transaction. This is a session within the bar where the customer transacts on the way in (opening the tab) and the way out (closing the tab).

In the real world, there's lots of room to cheat this system, but you'll have to wash dishes to pay for your beer or you won't be welcome back. With blockchain's freely available, anonymous identities, users can put on as many disguises as they want to sneak back in. This means you can't just trust them to pay for their drinks because there are no digital dirty dishes.

At the pub, you're not allowed to leave. Blockchain can't hold you hostage, but it can withhold your drinks until you're on your way out. The session approach lets dApps handle state within the session and only issue rewards (or whatever the final result is) when the tab is closed.

-Luke

P.S. In certain cases, it may be appropriate to collect payment upfront. Then when the session is closed, settle up by returning unused funds. You can handle unfinished sessions using whatever rules make sense for your dApp--probably penalizing the user by keeping their funds after a long enough period of time.