How Fantasy.Top relies on SQD to provide a seamless social gaming experience
Quick description of Fantasy.Top: Fantasy.Top is a social betting game in which players buy packs of influencers and bet on their performance on Crypto Twitter. During weekly tournaments, the social performance of influencers translates into game outcomes.
Chains indexed: Blast
Make or Break feature: Flexibility to integrate with own DB
Using SQD for: indexing all onchain activity, and combining it with external data
Only possible with SQD: quick, independently running, reliable indexing of all NFT
How Fantasy Top is using SQD in its game tech stack
Fantasy Top isn’t the first game the team has built; with years of experience building other web3 projects, they have a fair share of experience in indexing and creating consumer-facing apps.
One of the challenges with this game was that, as with any game, it’s crucial to provide players a fun, smooth experience.
Unlike a DeFi protocol where maximum decentralization is crucial, Fantasy Top’s team took a pragmatic approach to developing the card game: managing many of the game parts in a centralized manner and integrating crypto as much as possible, for example, for payments, as well as by making all the cards NFTs.
Since most of the game is running on Web2 rails, they were looking for a data indexing solution that would allow them to easily integrate Web2 and Web3 data.
During previous projects, they had heavily relied on The Graph for indexing. It provided an out-of-the-box, easy-to-deploy solution for the NFT aggregator they were working on back then. The indexer was the key piece of the project, and consequently, they spent a lot of time getting it right. Yet, eventually, they also hit the limits.
Therefore, for their next project, they decided to use something that would provide them more flexibility in accessing and handling on- and off-chain data, which is how they landed at SQD.
“In the end, we wanted to write our own DB, and this was only possible with SQD.”
Inside Fantasy’s game, SQD is used for all of the onchain indexing.
“We have quite a complex setup because whenever cards are minted, we need to ensure there is a fair distribution of influencers while at the same time guaranteeing random picks.”
To ensure fair game mechanics, the Fantasy Top team needs to be aware of the current supply of each influencer in the game at any point. So when some cards are “underpacked” they can adjust accordingly.
Whenever someone draws a new card, SQD is used to fetch external data, draw a random influencer’s card, and write it to the database. All of this happens in seconds, allowing users to open their pack and instantly see the cards they’ve received. Similarly payments are indexed using SQD.
“It would have been very hard to accomplish this with any other solution. We’re also using SQD Cloud for running indexers and it’s been running very smoothly.”
On working with the SQD team
Fantasy Top’s devs note that working together has been great so far.
“The team has always been super responsive and helpful in the group chats with answering any of our questions.”