~/goonerlabs
← All case studies
NodeAlgorandARC-3/19Swagger

Redeemify — NFT-linked physical redemption with on-chain metadata lifecycle

Role: Backend developer (sole author, 52 commits) · Client: Apostrophe Corp Stack: Node.js · Express · MongoDB · Algorand JS SDK · Nodemailer · Swagger UI Live: was redeemify.app — RETIRED (DB decommissioned) · Surface: 6 models · 26 endpoints · Timeline: Jul–Sep 2023

The problem

Redeemify ties a physical item to an NFT: when the holder redeems the physical good, the NFT's metadata must change on-chain to reflect that it's been redeemed — and redemption is paid for, in any of several assets. Two properties had to hold: an item can't be redeemed twice, and the on-chain NFT must end up in a provably-redeemed state. Getting either wrong undermines the whole premise.

Architecture

The API verifies a multi-asset payment (ALGO, USDCa, or other tokens), performs an ARC-3/19 metadata update on the NFT to mark redemption, records the state transition in MongoDB, and sends an automated email confirmation. The whole REST surface is Swagger-documented.

The hardest decision: idempotent ARC-3/19 redemption

ARC-19 makes NFT metadata mutable by deriving the asset's reserve address from an IPFS CID, so "redeeming" means publishing new metadata and updating the asset's reserve. The risk is the obvious one for anything that moves state and money: a retry, a double-submit, or a race redeems the same item twice. I made redemption idempotent — the database records the redemption transition and payment, and the on-chain update is gated on that transition, so replaying the request can't produce a second redemption or a second charge. Crucially, the guard is global across every redemption collection: a unique-asaId index enforces that any given on-chain asset can be redeemed once, ever, anywhere in the system — not merely once per collection — closing the cross-collection replay hole. Supporting multiple payment assets (ALGO, USDC mainnet ASA 315667043, project tokens) added verification branches (each asset verified on-chain on its own terms) in exchange for letting holders pay how they liked.

Results

  • 52 commits, sole author, delivered end-to-end in a focused window.
  • ARC-3/19 metadata lifecycle, multi-asset on-chain payment verification (ALGO + USDC mainnet ASA 315667043 + tokens), a global cross-collection double-redeem guard, automated email, and a fully Swagger-documented API.

What this demonstrates

Clean, complete delivery of a payment-plus-state-change product: standards-correct NFT metadata handling (ARC-3/19), idempotency where money and state move together, multi-asset settlement, and the documentation discipline (Swagger) that makes a backend handoff-ready.