This article is a general description of the permissionless and trustless racing game on the Tangle, codenamed Tangle Games.
The idea takes origin from the Traveling IOTA project.
Endless iota transfers with sender programs
IOTA Tangle is a DAG-based distributed ledger. One key aspect of IOTA is feeless transfers of iota tokens between accounts (addresses). If you send 1 iota, the recipient receives 1 iota and no fees are involved. If you send the same 1 iota 1 million times again and again, 1 iota will still remain in the last recipient’s account.
Sender program-agent in Traveling IOTA sends iotas from one account to another endlessly in a loop along limitless address sequence. Each transfer’s final balance must be confirmed by the network to make the next. There’s no 100% guarantee the network will do it for you. You ensure it with promotions and reattachments until the bundle gets confirmed. Promotions and reattachments actually are new transactions. Each transaction involves some Proof Of Work (PoW) to be done.
How long does it usually take to confirm a transfer? It depends on current tangle’s mood (mostly) and how exactly the sender is performing the task (the algorithm). Of course it depends on overall effort, number of promotions, reattachments, speed of PoW, and other things.
Time to confirm a transfer is a random variable and depends on the ever-changing situation in the IOTA network. Knowing the probabilistic nature of the tangle, it is hardly surprising. The variance of duration to run a sequence of transfers will be proportional to the length of the sequence. Let’s (realistically) assume transfer confirmation time conforms to Poisson distribution with the mean of 3 min. For a sequence of 100 transfers, the variance of duration will be 5 hours! That means in practice it can be 5 hours, but it can be 8 hours, too.
Let’s imagine we have 2 sequences of transfers and we want to find out which one will be faster in 100 steps. The winner of the race is very hard to predict even if we know who are the racers (algorithms).
Compare it with the Dakar Rally, for example. Why not organize a race on the tangle between senders of this type? For the sake of fun, spamming, and prize fund.
This kind of racing game can also be seen as PoC for different aspects of IOTA tech. Including Qubic (more below).
Tangle world vs real world
The Dakar racers aren’t equal: the car itself, experience of the crew, support, and the budget matter a lot. Do not forget The One Who Plays Dice: random factors are always present.
Real world environment has physical characteristics, such as distance, mass, energy. It makes miracles impossible. Speed is limited and it depends on a lot of factors. The real world also has a lot of randomness (like weather conditions). It makes the result of car races rather unpredictable, even if we have all relevant information at the start. Laws of nature act as basic rules that nobody can change but God.
Let’s apply this analogy to the tangle as a medium in the context of senders as racers.
Tangle is probabilistic by design. But there’s more than that; spamming waves and attacks, bugs in own software and downtime due to own mistakes. Don’t forget force majeure in the longer term - snapshots, changes of tip selection algorithm, and other bad days for the network. All of it makes the sender’s job quite an adventure.
The tangle world has characteristics which are responsible for inertia and resistance to the effort, like in the real world. Proof of work (PoW) and probabilistic transaction confirmation mechanism doesn’t allow miracles and puts a cap on speed. It links energy (PoW) with the change of the state of the tangle (confirming a transaction). I believe there must be some fundamental equation, unknown yet.
Tangle positively reacts to the effort: faster PoW and more promotions makes confirmation time shorter and the speed higher. It still doesn’t make it very predictable.
The tangle world also has certain objectivity: equal, unchangeable and well known rules (laws) for all. It is permissionless just like the real world is. Rules can only be changed by The One Who Controls Coo and Github repository or The Community As a Whole but let’s not think about it. The rest of the tangle laws are in global Nash equilibrium and is at the mercy of The One Who Plays Dice. Similar to the real world.
The fundamental laws of the tangle world shouldn’t be created, it has been in existence already since The Origin. The tangle could be the perfect medium for some virtual reality world or game. I’d be surprised if someone didn’t take that opportunity sooner or later.
Now let’s go back to the race.
The vision is a permissionless and trustless survival race with rules set by the fundamental properties the tangle. The game is codenamed The Tangle Games.
Description of the racing game
There is the organizer and there are participants or racers.
Each participant starts with 1 iota in the balance of address A(0). A(0) is the entry point to the sequence of addresses A(0), … A(N-1), A(N).
The task for each participant is to produce a chain of N confirmed iota transfers of that 1 iota starting from address A(0): A(0)->A(1), …. A(N-1) -> A(N). The valid chain is called Proof Of Distance (PoD).
All start at the same time. The winner is whoever does it (finishes) first.
The decision is made by a jury (of judges). Input for the decision of the jury is all PoD-s presented by participants.
Value of N may be 500, 1000 or similar so that the race would take several days (assuming the speed of the tangle is similar to today’s). Remember, speed of confirmations is capped by fundamental properties of the tangle and there are no shortcuts.
Sequences of addresses of each participant would be public, so the crowd can watch the race and bet on the favorites.
More than that.
The crowd can help their favorites by promoting, reattaching, doing PoW of their bundles!
The crowd can also do the opposite: they can try to stop or slow down rivals, for example by confusing their senders with unexpected spam transactions (in theory, I don’t know if that’s possible in reality).
Apart from the basic tangle laws, the only coordination of the race is enforced by the organizer and the jury through the protocol of the game!
It is a race for techies, of course. While to write a sender program is no miracle, to write one to win is not that straightforward. Sky is the limit for imagination. While participants can only be the skilled, the crowd can be anyone.
Why would a participant sign up for the race? Prize fund, of course. Plus fun and fame 😏
Each participant must deposit some iotas to be allowed to participate. It can be rather small in the beginning, it can become much bigger later on. Let’s assume anyone who transferred 10 Mi and more to the designated address can participate in the race.
It is not obligatory to participate though. In this case all transferred iotas will be considered sponsorship. Sponsor’s motivation would be publicity.
The prize fund is made of all transferred sums minus 5% of organizer's take. (the organizer loves money, too, and it has costs. For example someone has to pay to the oracles when the race will be running on Qubic)
Participants are rated by place at finish. Place is assigned to the participant by confirmation time of the last transaction in PoD: an earlier time means a higher place.
The prize fund is distributed to the first 3 places proportionally to the coefficient:
- 1st place (initial contribution of the participant) * (2/3)
- 2nd place (initial contribution of the participant) * 2/9
- 3rd place (initial contribution of the participant) * 1/9
With equal contributions coefficients will be 2/3, 2/9 and 1/9 accordingly. It’s all ternary.