All field notes

Blockchain · Retrospective

From writing a game's token contract to running the company

A desk lamp lighting a blue coin on a blank sheet, an office chair pushed back beside it.
Concept illustration · AI-generated

By September I was working on Playermon, a blockchain game on Polygon whose Playermons are NFTs and whose token is PYM. I was one of its co-founders, and the piece I was responsible for was the smart contract, completed ahead of the token sale.

The month in public

Playermon's public channels became busy early in the month, with the Telegram channel opening on 5 September. Registrations for the public-sale whitelist followed within days. On 15 and 16 September the channel posted tutorials for adding the Polygon network to MetaMask, and a daily bounty quiz began on 16 September. A game teaser came out that weekend, a referral programme on 22 September, and on 30 September registration opened for the IDO whitelist.

Alongside the contract, I led the promotion campaign for the sale. That put me on both sides of the same transaction: writing the code a buyer would depend on, and explaining to buyers what they were being offered.

What a token contract has to answer before a sale

Before anyone buys a token, its contract should already answer a short list of questions, in code that anyone can read:

  • What is the supply, and is there a maximum?
  • Who can create more, and within what limit?
  • Who can stop transfers, or stop one address from transferring?
  • Who owns the contract, and can ownership move?
  • Does the deployed bytecode match verified source on the block explorer?

None of these is exotic. Each is a place where a buyer is either reading a rule or trusting a person.

Earlier this year I published two contracts that answer the supply question in opposite ways. The TRVC token on BSC gives its owner a mint function capped at a maximum supply of 80 million, and a burn function that lowers the cap. The DEVK teaching token mints all 10,000 of its tokens in the constructor and has no mint function at all. Neither is the right answer for every token. Both make their answer visible, and that is the part that matters to someone deciding whether to buy.

Why a game token is harder

A game wants to keep rewarding players long after the sale, and that pulls in two directions.

A fixed supply, minted once, is simple to trust, but it means every future reward has to come from a pool set aside in advance. If the game grows faster or slower than planned, the pool is the wrong size, and changing it means a new decision rather than a new transaction.

A mint role lets rewards follow the game as it grows. It also creates a key that someone has to hold, and every buyer is trusting how that key will be used. A cap helps. It turns "trust us" into "trust us up to this number", which is a smaller and more checkable promise.

The sale adds its own questions. Allocations for the sale, the team and player rewards should be readable rather than described. Anything that unlocks over time is better enforced by a contract with its own schedule than by a sentence in a document. Every permission a sale contract needs should be specific and limited, and should end when the sale ends.

From the contract to the company

The next month, in October 2021, I became Playermon's CEO.

The questions widen. A contract has a fixed list of functions, and once it is deployed, its behaviour is settled. A company has a schedule, a community asking the same questions in many places, a campaign, a team, and a game still being built.

What carries over is the habit the contract taught me: ask what the other side will read, and what they will have to trust. A function either does what it says or it does not, and anyone can check. Our announcements and whitepaper deserve the same treatment. If a statement can be checked, it should be written so that it can be. If it cannot be checked yet, it should read as a plan, not a promise.

I still run TriveAcademy, which I founded in 2018, and I am still Vice President of the Malaysia Blockchain Association. But the work in front of me now is a game, its players and the people building it with me.

Writing the contract first was good preparation for the role. Whenever I had to explain the token, I already knew exactly what it could do and what it could not.