Together with the client's team, we decided that NFTs should have two states: Playable and Tradeable. In the Playable state, NFTs are available for use in the game, while in the Tradeable state, tokens can be resold on marketplaces.
This approach protects the game from a common vulnerability known as Race Condition, where multiple processes attempt to simultaneously process the same data. Hackers can exploit this vulnerability to gain access to the application's currency.
Additionally, we implemented the ability to collect royalties from NFT resales, providing an additional monetization method for the application.
For the API, we developed a backend that served as a bridge between smart contracts and the game backend. This is a classic scheme used when transitioning games from web2 to web3.