GOO Racing: A dynamic on-chain racing game with real simulations 🏎️

GOO Racing is an on-chain game where players create racing teams and compete against each other. Build on top of Gradual Ownership Optimization (GOO), GOO Racing allows players to win prizes adjusted to a quadratic Goo token inflation.

Inspired on F1 Manager 2022 and 0xMonaco, races are dynamic environments where teams can win depending on their car setup, driver’s skill, and other external factors such as weather or crashes.

Contrary to 0xMonaco, GOO Racing relies purely on non-coding knowledge, such as game theory, risk management, and interactions among other teams (rational agents).

Team decisions shape driver's skills: say between Hamilton or (god forbid) Latifi.
Team decisions shape driver's skills: say between Hamilton or (god forbid) Latifi.


GOO Racing runs on top of an NFT project with a GOO-based structure as the primary token for prizes and decisions. To test this idea, this article implements GOO Racing onto Paradigm’s new NFT project called Art Gobblers, whose token Goo (GOO-based) is generated by Gobblers.

With 24 circuits, teams racing in GOO Racing can participate in 24 races before the circuit changes. The cycle of circuits follows the Formula 1 2023 calendar order.

Creating a team

Anyone can create a team by calling the contract which creates a custom team owned by the sender, known as the principal from now on. The contract can be configured to charge a one-time fee to create a team, yet this feature is not active by default.

Each team has 10 attributes which can be configured from 1 to 10 (1 being the worst and 10 being the best for each one). Each different attribute plays a significant role on how your team’s race plays out. The current 10 attributes are:

  1. Reliability: How reliable the car’s technology and engine are.

  2. Inertia: How low is the polar moment of inertia, affecting drive and speed.

  3. Engine Torque: How fast the car accelerates.

  4. Drive train: Quality of the semi-automatic sequential gearboxes, affecting speed and maneuverability.

  5. Pit stops: How fast and successful the team’s pit stops are.

  6. Drivers: How skillful the team drivers are to prevent crashes, win positions, and more.

  7. Car balance: How strong is the car’s balance given the track condition, corners, and more.

  8. Luck: 🍀

  9. Staff: How well-prepared the team staff is when calling and executing pit stops.

  10. Aerodynamics: How easily a car can overtake opponents on corners and straights.

To create a new team, the principal can choose between 4 team presets:

  1. Normal

    1. Reliability: 5

    2. Inertia: 5

    3. Engine Torque: 5

    4. Drive train: 5

    5. Pit stops: 5

    6. Drivers: 5

    7. Car balance: 5

    8. Luck: 5

    9. Staff: 5

    10. Aerodynamics: 5

  2. Speedy

    1. Reliability: 2

    2. Inertia: 9

    3. Engine Torque: 9

    4. Drive train: 8

    5. Pit stops: 1

    6. Drivers: 4

    7. Car balance: 5

    8. Luck: 2

    9. Staff: 2

    10. Aerodynamics: 8

  3. Reliable

    1. Reliability: 10

    2. Inertia: 6

    3. Engine Torque: 6

    4. Drive train: 5

    5. Pit stops: 7

    6. Drivers: 4

    7. Car balance: 3

    8. Luck: 3

    9. Staff: 2

    10. Aerodynamics: 4

  4. Agile

    1. Reliability: 2

    2. Inertia: 2

    3. Engine Torque: 5

    4. Drive train: 8

    5. Pit stops: 2

    6. Drivers: 6

    7. Car balance: 10

    8. Luck: 4

    9. Staff: 3

    10. Aerodynamics: 8

or create a custom preset with the total sum of the attributes is 50. Each different team preset has different attribute values, which will impact later team decisions.

Trying to be the best principal

The principal role can change any of the attributes by increasing or decreasing them according to the upcoming race or circuit. For instance, an Agile setup will be very beneficial for races with a lot of corners like the Jeddah Corniche Circuit (27 corners). On the other hand, a Speedy setup will be best for the Baku Street Circuit. The principal also has the role of paying the entry free of the race.

Competing in races

Each circuit is raced 24 times, and each team can compete in as many races as they want for each circuit during the circuit’s lifespan. To compete in a race, the team has to pay a participation fee (which the sum of all the fees is the total prize of the race).

Each race consist of 5 teams with one active race at a given time. The matchmaking for each race can be activated to depend on an ELO system inspired from t11’s implementations for 0xMonaco—read more here. Teams with low ELOs would be grouped with teams with low ELOs as well, and vice versa. Hence, all teams competing in a race would have similar ELOs.

However, I opted to group all teams without considering ELO because if a team placed first, the team’s ELO would increase depending on the ELOs of the opposing teams. Weaker teams gain more ELO for beating stronger teams, and lose less if they lose (vice versa for a stronger team).

A race starts when it gets full with 5 teams. Each circuit has three external factors that can drastically change the race environment. These are:

  1. Weather: Precipitation level as the percentage of rainy days in a year.

    1. No rain (0, 33)

    2. Rain (34, 66)

    3. Heavy rain (67, 100)

  2. Crashes: Safest level based on previous incidents.

    1. Low probability

    2. Medium probability

    3. High probability

  3. Full throttle: Percentage of circuit where the car runs with full throttle.

  4. Down force: Level of down force.

    1. Low

    2. Medium

    3. High

  5. Top Speed: Top speed in km/h

For instance, races at the Marina Bay Street Circuit in Singapore are weighted in favor of rain, low crashes, 75% full throttle, medium down force, and a top speed of 350 km/h.

After starting the race, the contracts call the lap simulator to calculate 10 laps for each team given it’s attributes and the circuit.

Lap time simulator

The lap time simulator is processed externally using a modified version of OpenLAP Lap Time Simulator on MATLAB.

Car is modeled and driven by the computer.
Car is modeled and driven by the computer.

The computer always drives a given car to its grip limit. However, this grip limit (and other factors) depend on the given team’s attributes. For instance, the car balance affects the grip limit: a better car balance = high grip limit = more speed in corners = faster laps.

More info on how the simulator and its algorithm works soon. Thanks Michael Chalkiopoulos for his development on the used simulator.

Winning prizes and improving

The race leader board is generated according to the average lap time for each team. The leader board is sorted by lowest to highest average lap times. The prize is distributed in the Goo token following the real F1 point distribution:

  1. 1st place: 40% of prize

  2. 2nd place: 35% of prize

  3. 3rd place: 15% of prize

  4. 4th place: 7.5% of prize

  5. 5th place: 2.5% of prize

Afterwards, the ELO of each team is adjusted and the contract is ready to host the next race.

Takeaways and wen play

The smart contracts can be found here (still need some tweaks—built them quickly). If the game gains interest and traction, I’d be happy to deploy it on top of Art Gobblers. Good strategy would allow the top teams to out compete other Goo holders by amassing larger amounts of Goo in their Gobbler’s tank—out competing other teams allows to buy more Gobblers and blank papers, hence producing more Goo.

On-chain games like this allow holders to use the utility token and optimize their winnings while also maintaining the project incentives of holding Gobblers and Goo aligned.

Interested in playing or contributing to GOO Racing? send me a dm on twitter or telegram: @cairoeth

Subscribe to Cairo
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.