How to Make On-Chain Gaming Competitive: ‘Session Keys’ [Part 1]

MatchboxDAO is a collective of developers, artists, and designers building the infrastructure of on-chain games with StarkNet.

This is the first article in MatchboxDAO’s series on “How to Make On-Chain Gaming Competitive”. A new article will be released Tuesday every fortnight and will cover different topics around how developers are shaping on-chain games to become more intuitive and entertaining for gamers. This can include new features, games, onboarding tools and just about anything that improves the on-chain experience in a gaming context.

It’s part of our ongoing efforts to reduce stigma around blockchain gaming and to show the benefits behind keeping these features on-chain in a trustless, accessible manner. We hope this series can drive adoption from new developers and gamers because the future of on-chain gaming will be collaborative. Join us every two weeks to learn where this space is heading and how we’re preserving integrity and most importantly, fun in gaming.



In its current form, interacting with a blockchain isn’t intuitive to new users. From using a wallet, to swapping tokens on a decentralized exchange (DEX), to purchasing an NFT, none of this is user-friendly enough for a new user to simply pick up and run.

It doesn’t stop there, however. After learning how to interact with the blockchain, there is still the challenge of consistently dealing with confirming transactions. This could be a transaction on a DEX or attempting to play a blockchain game. With each action you take, your wallet will pop up and ask, “Would you like to confirm this transaction?” along with some text that is indecipherable by most. This can lead to mistakes, confusion, frustration, and even losing money.

This is a poor user experience that blockchain native users have simply gotten used to but don’t enjoy.

Developing better UX for wallets, making the transactions more easily readable, and allowing users to take actions without having to confirm each and every single one would greatly improve usability, reduce frustrations, and enable mass adoption.

So what’s the solution?… Enter Session Keys.

What most transaction confirmations look like. It’s not exactly user friendly… Session keys help solve this problem.
What most transaction confirmations look like. It’s not exactly user friendly… Session keys help solve this problem.

What is a Session Key?

Session Keys are a massive leap forward for user experience. They allow users to pre-approve an application's transactions according to a set of parameters: a given duration, a max amount of gas, a max transaction volume of a certain token, or a particular function on a particular contract.

An example of this would be when playing a game built on the blockchain, you could simply pre-approve your session with some basic terms, hit go, and play the game without constantly being bombarded by your wallet asking “confirm this transaction”.

But that's just the tip of the iceberg! Session keys can protect the assets that live in your wallet and limit what can and cannot be confirmed while using the session key. This means that you can play games like Influence without being encumbered by endless confirmations and, at the same time know that your most valuable assets within that wallet are safely locked away.

Session keys give users more options for setting permissions while making on-chain gaming a smoother experience.

A look at Cartridge’s in-development Session Key
A look at Cartridge’s in-development Session Key

What are the use cases for Session Keys?

There are MANY use cases for this massive UX improvement, and likely many that have yet to be defined.

Below are a few notable use cases:

  • User friendly and uninterrupted playing of games

  • The ability to setup multiple DeFi positions before confirming

  • Filling out forms with many inputs, without having to confirm each time you move on to the next section

  • Non-custodial and self directed IRA that allows you to move fund around within a single session

  • Rearranging assets within a wallet/inventory without having to confirm each time you make a change, just when you have completed their arrangement.

Can you think of others? Leave a comment!

How do they work in technical terms?

Sessions keys are actually a smart contract. A smart contract is an agreement between two parties in the form of computer code. These contracts run on the blockchain, and the data is all stored on a public database that cannot be changed. When transactions are made within a smart contract, they are processed by the blockchain, which allows for the transactions to be sent without a third party confirmation.

A session key is an account that allows for particular transactions to be pre-approved by having an authorized user sign a token which is then validated during transaction execution. The token’s permissions can be parameterized to last for a set amount of time, to limit how much value can be transferred, or to limit the contracts and functions it can be used to call.

Within Influence, they could be used to allow a player to take actions on their asteroid, such as building structures, pushing materials into different warehouses, adding materials to refineries, and anything else that would be considered basic play. All the while the valuable assets like asteroids and your crewmates would not be able to be moved/sold through the session key, which adds a layer of security that is needed. ** **

Who’s pioneering this technology?

The idea of session keys has likely been floating around the ether for quite some time; however, after some discussions between Chris Lexmond, founder of Influence and Loaf from Loot Realms, the idea really started to take shape. Later, Loaf along with members of the Briqs, Realms, and Topology teams decided to build one for the StarkNet hackathon, which they ended up winning. After the hackathon, Argent offered to pick up the torch and continue to refine a session key to be utilized within their platform.

Today the Argent, Ledger, and Cartridge teams are working to bring the technology to market. Argent pioneered the implementation of a plugin based account architecture and is planning to support the Session Key plugin as an experimental feature, the Ledger team has been working toward efficient onchain token permission validation using merkle trees, and the Cartridge team is working on making the provisioning and management of session tokens incredibly simple.

The future of on-chain gaming relies on breaking barriers to entry and making the experience seamless. Infrastructural pieces like the session key push us closer to an experience where the blockchain operates in the background. It is similar to the internet, in that most people have no clue how it actually works, but it allows them to frictionlessly explore the universe's wealth of content. Blockchains have a long way to go before it is completely frictionless, but session keys are a big leap forward, especially for gaming. Session keys are our “broadband moment” for usability, allowing us to go from clunky and slow to fast and nimble.

It’s hard to say how much blockchain will filter into everyone's everyday lives, but in order to find its place there, it needs to be abstracted to the point that adoption is happening without people needing to understand all of the intricacies of the technology.

Session keys have a myriad of uses, from playing games and improving the experience, to a self directed IRA allowing you to move funds around for a given period of time and for a particular limit. ** **

They are a foundational piece of the puzzle to help bring blockchain’s barriers of entry down and adoption in this space up. Bill Gates once said “The advance of technology is based on making it fit in so that you don't really even notice it, so it's part of everyday life”, session keys seek to do just that.

In conclusion, teams and DAOs like Influence, Loot Realms, Briqs, Topology, Cartridge, Argent, MatchboxDAO and Ledger are working to bring about the next generation of easy to use features and tools that will enable adoption of fully decentralized blockchain technology.**

Article written by:

Don’t miss upcoming articles:

Subscribe to Matchbox DAO
Receive the latest updates directly to your inbox.
Mint this entry as an NFT to add it to your collection.
This entry has been permanently stored onchain and signed by its creator.