The World Cup is here and at Mighty Block we love football. As most of our team is Argentinian (me included) and we cannot help our fandom for our national team. We’ve been waiting and preparing for this event for months and we created a betting smart contract football game for it, exclusively for Mighty Block’s team facilitated by blockchain technology on the Polygon blockchain with a smart contract. How did this project came to be? Follow me on this adventure as I tell you the tale of this game and how company culture helps to build amazing things while having fun and being responsible.
During the World Cup it’s very traditional that every group of friends would have a ‘dealer’ that would organize what we call ‘Prode’. This is basically a betting game that consists in everybody submitting their guesses on match results and some type of point system is set up, for example:
- 10 points if you guess winner and scores
- 7 points if you guess winner and one of the scores
- 5 points if you guess winner but not score
- 2 points if you guess one score but not winner
- 0 points otherwise
This same person gathers money (the same amount) from everybody. After all matches have been played, the group gathers, the ‘dealer’ shows the results and rewards the winners (usually first, second and third places) with all the money gathered.
This system is heavily dependent on the ‘dealer’ keeping everything orderly and transparent, usually this ends up with discussions about rules, points, how much money was gathered, if the dealer changed any result, etc. This leads naturally to:
- Ban this type of betting in a professional setting (since it can create issues between the team) or change the dynamic of the game, where the company funds the reward and there’s not betting per sé.
- Ban the ‘dealer’ from participating in the betting.
- Even when all the above happen, there is still a sense of distrust in the dealer after the game ended.
As the World Cup was getting closer and closer and everybody at the office started gossiping about the players, the news (and even one of our coworkers went to Qatar himself!) a light bulb went on. What if we make this heavily centralized and ugly betting game into a trustless system facilitated by Blockchain and Smart Contracts? (A smart contract football game!)c.µ.
Just like that, our minds started running, we were thinking of ways to make this happen. How would it look? Where do we take the results from? Do we use an oracle? How do we split the reward? What would happen if there is a tie?. As programmers we could not help our anxiety in any other way than coding the damn thing.
We spent 4 hours making this solidity Smart Contract in the dirtiest way possible, following no guidelines of clean, scalable and sustainable code. After all it was an MVP of a joke, we were not planning to really do this, right?
Ok, let’s back up. How did we end up here? Why on earth are we working on an MVP of a joke instead of working on our clients needs on company time?
Mighty blocks culture policies
At Mighty Block we take culture very seriously. A very important exercise was done approximately 6 months ago, were HR gathered ‘the most important thing that you value from a teammate’ and distilled a list of core values that we as an organization value.
At first sight, it doesn’t sound at all special. Just another set of empty words that nobody follows. Well, this is where Mighty Block makes the difference.
You can read more about that process here, but TL;DR, the HR team listed the things that we REALLY value, not just a poster on a wall, these are the things that we want to keep and grow:
Quarterly face-to-face workshops
Mighty Block is a fully remote company, we have teammates all around the world yet once a quarter we try to meet face-to-face. Our HR team makes a great effort to make this week as productive, fun and fulfilling as possible. These meetings really help to spark inspiration and to show our new team members how we put into practice the core values. It’s not forced indoctrination, rather it’s simply making how we work transparent to the whole team and since our core values express that, the newcomers can sense and learn that.
What does all of this have to do with the ‘Prode’ project? Well, everything. Our ‘real’ project (the one our client was paying for) was under control and the client was happy with our productivity at the time. We were not crunching nor under a lot of pressure. On the other hand, we were sure that if the Prode project failed, nobody would tell us off, it would go against most core values and if we succeeded building the Prode and found ways to circumvent all the issues, Mighty Block would support us and facilitate all the resources needed to make it happen.
It was a can’t lose type of situation
Only in that state of mind can you make progress in a relaxed, healthy, fun and productive manner. It was not only important, it was the key for being able to make this project a reality, otherwise it would have been a comment, a joke, a thought, but never a real thing.
The smart contract was just the beginning
Writing the smart contract was just the beginning of our adventure. After this rush of adrenaline and inspiration we had a rough, untested and dirty smart contract that did the thing. We had a Prode v0.1. After making sure that no big barrier would prevent us from making the World Cup Prode a reality, we pitched our smart contract football game idea with HR, they loved the project and we started thinking on what else we should add. Ideas started flowing, adrenaline went down and we planned our next steps.
How to make this work in a professional setting? The smart contract plays the ‘dealer’ role here, so that helps a lot but also Mighty Block funded the prize. So no betting, just a company game.
But interacting with a smart contract is a very annoying thing, we needed a frontend and that’s where the rest of the team comes to play. Most of the development of this project happened in the span of 5 days, during one of our quarterly workshops. While Ignacio and I were writing (and now testing and refactoring) the Smart Contract, the rest of the team heard our conversation and started asking questions, everybody was excited to try it!
Julian, our frontender, was one the excited coworkers, he offered to build a frontend for us. He had no experience making a dApp, so it was a learning experience for everybody involved. I helped to connect the frontend with the Smart contract while Ignacio was finishing tests and HR was deciding the proper prize.
During Julian’s process he had questions about UX, Constanza, our UXer, helped with that.
Overall it was a team project, a great experience not only for building the technology and then playing with the game we created on real time during the world cup, but also a bonding experience. Next time I have a question I’m more confident asking Constanza, Julian or Ignacio. The whole team sees this vibe of having fun and building stuff together, and wants to join in, the best example of this is our participation rate of 95%, almost the whole team played the game. This is a positive feedback loop that we need to nourish and nurture, that’s our philosophy, that’s why we have core values and that’s why we do what we do.