How does success look like for your vision?How does success look like for your vision?

Backend rebuilt in three weeks when the platform under it changed.

  • 3 weeks to rebuild the backend and database when Moralis went SDK-only
  • 4 months from brief to a live token and marketplace
  • 0 gas paid by holders, except to burn a Metaportals NFT on Ethereum

What did Bushido build for Catblox?

Bushido designed and shipped an ERC-20 utility token, CatNip, and a marketplace where Catblox Genesis holders spend it on digital offers. Rewards are distributed according to how long a holder has held, giving the token a real use rather than a speculative one. Four months, two developers and a delivery manager. Stack: Solidity on Polygon and Ethereum, Next.js, Tailwind, Moralis Streams, Hasura, and AWS Lambda, API Gateway, CloudFront, S3 and Lambda@Edge.

If it's crypto,
we did it.

Product Development
Web 3.0 Development
Smart Contract Development
Backend Development
Infrastructure
Product Launch and Support
Industry
Web3, Marketplace, NFTs
Period
4 months, 2021
Team size
2 developers, 1 delivery manager
Deliverables
Smart contracts with backend system and marketplace storefront web application
Tech Stack
Polygon & Ethereum, Solidity, Next.js, Moralis Streams, Tailwind, AWS (Lambdas, API Gateway, CloudFront, S3, Lambda Edge), Hasura

The starting point

Catblox wanted to reward holders of its Genesis collection for how long they held, with a token that could not be traded freely on Uniswap or secondary markets. CatNip would be an in-game currency spent only in the project's own marketplace, on digital offers: a spot in the next mint, tickets to live events, raffle entries, physical item claims. Once bought, an offer becomes an NFT that can be sold on OpenSea or Rarible.

And the whole experience had to be free for the user, which means the platform pays the transaction fees.

What we built

  1. Rewards counted in blocks, not daily snapshots.

    A snapshot every 24 hours would have given a whole day's reward to whoever held the token when the job ran. Counting holding time in blocks, and paying the seller out the moment a transfer happens, rewards buyer and seller fairly.

  2. CatNip held off-chain until it is needed.

    Minting and distributing tokens on-chain every day would have cost the platform a lot in fees. Balances stay off-chain and move to Polygon on demand, usually just before a holder buys an offer.

  3. Free for holders, through meta-transactions.

    Moving tokens on-chain, buying offers and transferring them all run as meta-transactions, so the platform pays the gas. The one exception is burning a Metaportals NFT on Ethereum, an external contract we cannot control.

  4. A bridge between Ethereum and Polygon.

    The Genesis collection and the snapshot live on Ethereum, the token on Polygon. The bridge makes them interoperable, and burning an NFT from another collection in the same universe earns a fixed CatNip reward on Polygon.

  5. Offers the team configures without a developer.

    Admins set each offer in a UI: tradeable or not, supply, end date, amount per address, lottery or not. A purchase mints an ERC-1155 token, and lottery winners are picked automatically and published to a public Google spreadsheet when the offer closes.

  6. The backend rebuilt in three weeks.

    When Moralis moved from a platform to an SDK only, the backend and database had to be reimplemented. It took three weeks.

  7. Built to change, and to be stopped.

    Every smart contract is upgradeable, and admins can allow or block any address from sending or receiving CatNip at any time.

Before and after

First design What shipped
Reward fairness A daily snapshot: whoever held at the job run took the day's reward Holding time counted in blocks, the seller paid out on transfer
Distributing rewards Minted on-chain every 24 hours, paying fees each time Held off-chain, moved on-chain on demand
Gas for holders Every transfer and purchase needs gas Meta-transactions: the platform pays, except the Metaportals burn
Moralis goes SDK-only Backend and database built on Moralis as a platform Reimplemented in three weeks

The net effect: holders are rewarded fairly for how long they hold, pay no gas to use CatNip, and the platform's transaction costs came down significantly.

What made you happiestworking with us?

"The consistent level that Bushido delivers every product and their continuously positive attitudes."

Jacob S.

Co-founder & CTO of Catblox

More from the people we build for →

Let’s turn your vision into a reality!

An image of Maneki Neko that is believed to bring good luck and fortune in Japanese culture. It is symbolically there to help with the project’s luck combined with our technical expertise.An image of Maneki Neko that is believed to bring good luck and fortune in Japanese culture. It is symbolically there to help with the project’s luck combined with our technical expertise.

Get in touch

Questions people ask about Catblox.

How were transaction costs kept down?

CatNip tokens are held off-chain initially and users move them on-chain on demand. That removes a per-action gas cost from the everyday experience and cut platform transaction costs significantly.

What happened when Moralis changed its product?

Moralis moved from a hosted platform to an SDK, which forced a rewrite of the backend and database. Bushido reimplemented both in three weeks without stopping delivery.

How are rewards calculated?

By holding duration. The longer a holder keeps their Catblox Genesis token, the larger their share of distributed CatNip, which rewards commitment rather than trading activity.

Yours is next.

Same team, sharper tools. Tell us where you are and we will tell you what it takes — scope, shape and a timeline we would actually hold ourselves to — on a 30-minute call with an engineer.