[{"data":1,"prerenderedAt":99},["ShallowReactive",2],{"\u002Fblog\u002F2023-09-28-smart-contracts-in-fintech-what-game-contracts-taught-me":3},{"id":4,"title":5,"archiveType":6,"body":7,"category":83,"contextDate":84,"cover":85,"coverAlt":86,"date":87,"description":88,"extension":89,"featured":90,"historicalDate":87,"historicalLabel":84,"meta":91,"navigation":92,"path":93,"publishedDate":84,"seo":94,"stem":95,"thumbnail":84,"workPeriod":96,"writtenDate":97,"__hash__":98},"blogs\u002Fblog\u002F2023-09-28-smart-contracts-in-fintech-what-game-contracts-taught-me.md","Smart contracts in fintech: what game contracts taught me about financial ones","retrospective",{"type":8,"value":9,"toc":74},"minimark",[10,14,17,22,25,28,32,35,38,41,45,48,51,54,58,61,64,68,71],[11,12,13],"p",{},"September took me to two stages. At Philippine Blockchain Week 2023 in Manila, which ran from 19 to 21 September, I presented Playermon on stage. On 26 September we announced Playermon 2: Planet Invasion, a new game in the series. Then came Bangkok and FinTech Festival Asia 2023, held on 27–28 September at Royal Paragon Hall, where on 28 September I spoke in the session \"Smart Contracts in Fintech\", alongside Damian Bunce, Julian Kwan and others.",[11,15,16],{},"What follows is not a record of that session. It is the set of lessons I bring to the subject, written down while they are fresh, from writing and running contracts as Trivechain's lead developer and at Playermon, where I completed the game's smart contract in 2021 before becoming CEO.",[18,19,21],"h2",{"id":20},"a-payment-is-final-most-game-bugs-are-not","A payment is final; most game bugs are not",[11,23,24],{},"Most of what goes wrong in a game can be fixed in the next patch. In April we rebalanced 23 skill cards in a single release. A reward sent to the wrong wallet is different. Once a transfer is confirmed, there is no patch for it.",[11,26,27],{},"That shapes what belongs on chain. In a game, the contracts should hold what players own and record who can move it, and almost everything else, from rules and levels to balance, should stay where it can be corrected. In finance the case is stronger. The contract that holds money should be the smallest and plainest part of the system, because it is the part you cannot take back.",[18,29,31],{"id":30},"you-do-not-edit-a-contract-you-replace-it","You do not edit a contract; you replace it",[11,33,34],{},"A deployed contract cannot be edited. When the design has to change, you deploy a new contract and move people to it. In June this year we announced that Playermon's Breeding Pod would move from ERC-721 to the ERC-1155 standard, which is a change of that kind: the old contract stays as it is, and the assets have to move.",[11,36,37],{},"I learnt what that involves in 2021, when, as Trivechain's lead developer, I planned the move of its holders from our own chain to a token on another chain, through a bridge with a published deadline. The new code was the easy part. The migration was the work: telling every holder, giving them a safe path across, and setting a clear end date.",[11,39,40],{},"So a financial contract needs its migration path designed on the first day, not on the day it is needed. Who can pause it? Who can upgrade it, and with how much notice? Upgradeability is not a technical detail. It means someone can change the rules after users have deposited, and that someone becomes part of what users are trusting.",[18,42,44],{"id":43},"an-audit-covers-one-artefact-at-one-time","An audit covers one artefact at one time",[11,46,47],{},"Playermon's contracts were audited by CertiK. We launched the token in late November 2021 while that audit was still in progress, and published the results in January 2022. I would commission an audit for any contract that holds value. I have also learnt what one does not cover.",[11,49,50],{},"July gave the industry a clear example. Several Curve pools written in Vyper were drained because some older versions of the Vyper compiler produced reentrancy locks that did not work. The source code looked correct. The compiled code was not.",[11,52,53],{},"For fintech, that means an audit report should name the exact code and compiler version that went live, and the review should not stop at the contract. Keys, admin roles, front ends and the people who operate them all sit outside the contract, and all of them can move money.",[18,55,57],{"id":56},"a-vote-is-a-signal-someone-still-has-to-act","A vote is a signal; someone still has to act",[11,59,60],{},"Playermon's holders vote on Snapshot, weighted by PYM. This month they voted to shorten the game's Happy Hour from 12 hours to six, with 75.91% of the voting weight behind six hours, and on 27 September we announced the result and the change. A Snapshot vote does not execute itself. It records what holders want, and the team carries it out.",[11,62,63],{},"For a game, that is a reasonable arrangement: the decision is about play, and the team that runs the game answers for it. A financial contract needs a clearer answer to the question of who is accountable when the chain does something nobody intended. \"The token holders voted\" is not an answer that will satisfy a customer who has lost money.",[18,65,67],{"id":66},"settle-in-the-asset-your-users-hold","Settle in the asset your users hold",[11,69,70],{},"When Playermon's marketplace opened in December 2021, we priced NFTs in MATIC rather than in our own token, so that a buyer did not have to swap into PYM before buying. The same principle applies to financial contracts: settle in the asset your users already hold and understand, not the one that suits the issuer.",[11,72,73],{},"None of this makes a contract safe. It narrows what can go wrong, and it makes clear who answers when something does.",{"title":75,"searchDepth":76,"depth":76,"links":77},"",2,[78,79,80,81,82],{"id":20,"depth":76,"text":21},{"id":30,"depth":76,"text":31},{"id":43,"depth":76,"text":44},{"id":56,"depth":76,"text":57},{"id":66,"depth":76,"text":67},"Blockchain",null,"\u002Fimg\u002Fblog-covers\u002F2023-09-28-smart-contracts-in-fintech-what-game-contracts-taught-me.webp","A game controller and a payment card resting together on a glass block.","2023-09-28","After presenting Playermon in Manila, I spoke in the Smart Contracts in Fintech session at FinTech Festival Asia in Bangkok. My notes on what game contracts teach about contracts that hold money.","md",false,{},true,"\u002Fblog\u002F2023-09-28-smart-contracts-in-fintech-what-game-contracts-taught-me",{"title":5,"description":88},"blog\u002F2023-09-28-smart-contracts-in-fintech-what-game-contracts-taught-me","2023","2026-11-07","h6x-h34OoN6VDctxtgOWoYQqfuIFA6jTABy1edu3fBY",1794838285712]