Jan 15, 2025

How Treasure uses Goldsky to power the decentralized game console

Treasure scales its gaming ecosystem with Darkmatter, their streaming data platform built on Goldsky.

How Treasure uses Goldsky to power the decentralized game console cover image

About

Treasure is the decentralized game console, building an end-to-end tech stack for independent game developers to create and distribute web3 games.

Industry

Gaming

Using

Goldsky Subgraphs, Goldsky Mirror

0

Downtime

1B+

API requests

<48hrs

Migration time

70%

Cost savings

Treasure is the decentralized game console, building an end-to-end tech stack for independent game developers to create and distribute web3 games. Since launching in 2021, Treasure has grown to an ecosystem of 15+ games and counting, unified by $MAGIC.

Empowering data flexibility

At the heart of Treasure's ecosystem lies a robust infrastructure powering key services like the official marketplace, built on efficient subgraph technology. Early in 2024, Treasure was faced with a significant challenge when its existing vendor announced a 2x price increase with less than four weeks to respond. Viewing this as an opportunity to explore new possibilities, Treasure discovered Goldsky, a partner that not only met but exceeded expectations with its flexible and high-performance data solutions. The transition was seamless, with Goldsky enabling Treasure to continue scaling its infrastructure confidently and cost-effectively.

The partnership between Treasure and Goldsky has been marked by transformative milestones. From levelling up infrastructure capabilities to enabling greater support for the ecosystem, these moments underscore the value and impact of this collaboration.

Goldsky Moment #1: Seamless migration

Initially seeking a more cost-effective solution and what started as a mere prototype, Treasure migrated to Goldsky in ~48 hours on its existing data stack, achieving a 40% price reduction from it's previous subgraph host (before their 1.5-2x price increase, for a total of a ~3-4x in relative price difference).

With Goldsky's migrate functionality and 1:1 compatibility with the open source subgraph specification, this was effectively a no-op for the Treasure engineering team. Query performance and indexing speed were comparable to Treasure's previous indexer, allowing for the switch to be completely invisible to end users.

Goldsky Moment #2: Leveling up

Very soon after migrating, the Goldsky team received an interesting support query from Treasure:

Treasure

Our previous subgraph provider allowed us to query the first 5,000 entities at once with first: 5000, is this something we can enable on Goldsky? (current limit is the default 1,000)

Goldsky

I'll raise it internally. However, if you're doing this it's likely you're doing some sort of all-entity scrape, and [Mirror might be a good fit]!

One of Treasure's primary use cases for subgraphs was to index all block data from the network, then scrape the subgraph to pipe this data into their own database.

This was a perfect use case for Goldsky Mirror, which Treasure adopted early (prior to our GA release) to drive a significant improvement to the team's developer experience: Mirror enabled significantly faster backfills (writing the entire chain history in minutes, limited only by the database sink) and automatically managing reorgs and RPC data quality issues on Treasure's behalf. What did this mean for the Treasure team? Saving several hours a week on managing and maintaining subgraph scrapers and using that time to instead focus on other downstream platform components. Over time, the use of Goldsky Mirror expanded to replace and augment well over 50% of Treasure's total indexing workload across testnet, and now mainnet.

Goldsky Moment #3: Ecosystem enablement

Eventually, Mirror proved to be such a massive level-up to Treasure's on-chain data ingestion system that Treasure positioned it as the core mechanism for delivering data to Darkmatter (codename for Treasure's streaming data platform) and building it's entire suite of downstream systems: token activity, security monitoring, game event tracking, and more. Mirror's push-based architecture allows for reduced latency and increased data-freshness, all at a fraction of the cost of the subgraph-based indexing system.

Building a community-owned gaming platform

Treasure's mission is to create a feature-complete tech stack that supplants traditional gaming companies with decentralized infrastructure. Streaming data ingestion platforms are the norm in the industry (battle-tested by studios like Activision and Tencent), and Goldsky's platform significantly streamlines the process of integrating blockchain data into a streaming architecture.

Yuri, CTO, Treasure

We discovered Mirror and immediately saw it as the missing link to our blockchain data story.

Since the initial integration, Goldsky has been serving billions of requests on Treasure's indexers and streaming billions of events to the team's self-hosted data stack. Treasure's adoption of Goldsky helped streamline its data backend and reduce costs while maintaining top-tier performance. This journey underscores Treasure's commitment to pushing the boundaries of decentralized gaming, providing developers and players alike with real-time experiences built on cutting-edge technology, ultimately helping power games that are legitimately fun to play.

© Endless Sky Inc. All rights reserved.

Loading system status...