0%
HomeCase Studies
Scaling Remx with Alchemy

Scaling Remx with Alchemy

placeholder image

$0.01

average transaction cost

4,000+

sponsored transactions

$XX,XXX

covered in gas fees

At Remx, we are passionate about building scalable, reliable and performant solutions that that empower Creators to connect with and grow their audience.

Our new offering, Collect2Earn, provides a way for web3 brands to collaborate with Creators and their audience by sponsoring tangible, onchain rewards for producing and collecting NFTs in exchange for brand exposure and engagement.

Since we launched the program, we have scaled from minting 100 tokens in 24 hours to 200 tokens in less than 20 minutes and beyond. To power this massive growth in scale while maintaining performance and reliability, we turned to our partner, Alchemy.

A key feature of our platform is providing a gas-less experience for our users. From launching new NFT collections to minting tokens to claiming and withdrawing rewards, we cover the gas fees for our users. We originally built our platform using Relayer accounts and meta-transactions through a forwarding contract using OpenZeppelin’s Defender product. Defender worked well for us, but it didn’t scale well, resulting in rate limiting and failed transactions during peak periods.

Alchemy’s LightAccount, an ERC-4337 smart contract account, combined with the Gas Manager API, an ERC-4337 Paymaster, allowed us to re-architect our gas-less experience to use ERC-4337 User Operations, resulting in cheaper, faster and easier to manage transactions for our users.

One of the key aspects of our Collect2Earn program is tracking user’s participation onchain. To avoid high gas costs of storing data onchain, we elected to to use Event Logs as a light-weight, transparent mechanism for tracking these activities.

To access this data in a useful and meaningful way, we turned to Alchemy Subgraphs. A subgraph automatically processes blockchain transactions flowing through selected contracts and provides a convenient method for modelling transaction and event log data as business objects. The subgraph can be conveniently queried in near realtime using GraphQL.

All web3 projects need to track on-chain activities of their users, and for and ease-of-use and reliability, we replaced Ethers with Alchemy’s NFT API. To achieve performance and reliability at scale, we cache some of this information locally. This helps us avoid temporary outages and delays in querying realtime data from contracts and our users, but keeping this information up-to-date is a challenge. Alchemy’s Webhooks are ideal for receiving near real-time notifications for on-chain transfers and other events that impact cached data.

No system is without issues, especially when it relies on third party services and systems outside your control. Alchemy offers an amazing suite of web3 developer tools and dashboards that allow us to monitor for and quickly diagnose issues as they happen.

Desktop section background image

Build blockchain magic

Alchemy combines the most powerful web3 developer products and tools with resources, community and legendary support.

Get your API key