Anyone who’s ever sat online waiting for tickets to be released knows that there can be very high, short-term peaks for ticket sales when systems are suddenly hit by a huge amount of traffic. The current load limits of Ethereum clearly present challenges for ticketing. While it is true to say that both Ethereum and Aventus have scaling challenges, it is important to note that the solutions don’t need to be the same.

At present, we’re exploring solving this challenge from two different perspectives:

Smoothing out the flow of ticket purchases by buffering transactions using an off-chain queueing solution (the topic of this blog post). Developing a solution that preserves the principles of decentralisation by checking in with the MainNet (currently top secret, we’ll explain more another time).

Challenge

We’ve developed an off-chain solution which handles this challenge by holding all ticket transactions within an asynchronous queueing system and then pushing them onto the Protocol incrementally. There are a couple of requirements here:

We want to ensure that all tickets will eventually be processed and delivered to the blockchain within a reasonable amount of time. We want to monitor gas prices on Ethereum throughout the delivery process, and automatically utilise this information to optimise the flow of transactions based on cost. This gives us the choice of keeping either the gas price or the pace of transactions constant.

Solution

The solution we have developed is a general, multi-purpose queueing system for Ethereum: any data transaction (with the exception of the creation of smart contracts) can be drip-fed onto the blockchain via this solution. For us, of course, these transactions are ticketing transactions; however we anticipate the adoption of this (or a similar solution) for many other types of data transaction.

We utilise a write-to API in order to push tickets to the blockchain, which can either be integrated directly into a ticketing agent’s technology platform, or carried out semi-manually via the Aventus team (i.e. the ticketing agent can send us all signed ticket-related transactions and we can push them incrementally onto the blockchain).

The solution is built on Amazon SQS, which is a highly scalable queuing system, in order to ensure that all tickets can be pushed to the blockchain in a efficient and reliable way.

In order to ensure that transaction cost is optimised, we utilise data from EthGasStation in order to retrieve the current standard and low-safe gas prices from the Ethereum MainNet in real-time.

Gas Decision Making

In order to optimise transaction flow, we needed to set some parameters around the gas prices we are willing to pay (we will go into our current calculations around this later in this article). For example, if we want transactions to be confirmed faster, we need to pay a higher gas price; if we are happy to wait and accept a lower transaction speed, our set maximum price can be lower.

If the standard gas price (ie. ~1.5 min / block) falls above our selected threshold, we use our maximum price. If EthGasStation’s lowest price (ie ~15 min / block) is above our maximum price, then we will stop pushing transactions until it goes down.

Technology Stack