Álvaro Carvajal Castro

RavenQuest

01. RavenQuest

RavenQuest is a Play2Earn blockchain game, where users can buy land and build their own game. RavenQuest Whitepaper.

Backend made using Go. Website made using server-side rendering. Since RavenQuest is a Play2Earn blockchain game, the backend needs to integrate some blockchain elements in it:

02. Land_Sale

The land sale is just a land ownsership sale, where users can buy an "ownership" spot on the game. A smart-contract was used for the sale, where users would pay with any ERC20 token and the contract will end emitting certain event, where the backend will then gather the event and insert specific information into the database.

Reading events is basically done with eth_getLogs and some specific filters (like block range for example). The thread runs on a ticker and periodically checks for new events that have not been processed before.

Since the sale was done on Polygon, blocks are not final, we can expect a fork, to ensure some security the thread only works with blocks that are at least 22 blocks deep on the chain. Since Polygon PoS average block time is around 2 seconds this is not a big deal.

The contracts managed around 300.000 USD 💵. Handle chain interactions with around 1500 users daily users.

03. NFTs

Users can interact with a multitude of NFTs inside the game. Minting is done a specialized queue with a double signature system. One signature is handled by the backend and the other one is handled by the queue microservice, both using KMS. The signature follows the EIP-721 and is verified at the contract level using ecrecover.

The $QUEST Ecosystem token follows the ERC-20 standard, the project uses 6 decimals allowing us to store as a simple integer on any backend system. All operations are handled with the ItemVault and TokenVault contracts. There is also a couple more intermediary contracts that handle other user actions (like multi nft deposit into the vault) 🧑‍💻️.