Retail Alliance

Retail Alliance

The Retail Alliance Foundation is a non-profit coalition committed to revolutionising the global gift card and loyalty economy through blockchain technology — uniting retailers, brands, developers, and technologists to create a secure, transparent, and equitable ecosystem. At the heart of their vision is the concept of "SmartCards" — next-generation digital gift cards with programmable rules, real-time transfers, and on-chain balance verification, replacing the static, siloed instruments that dominate the industry today. As project lead, we drove the technical delivery end-to-end — from initial requirements gathering through architecture design, implementation, testing, and ongoing network operations — working in collaboration with BFG Labs via R0GUE to build and manage the blockchain infrastructure from the ground up using the Polkadot SDK (Substrate).

The Challenge

The multi-trillion dollar gift card industry remains fragmented across proprietary platforms with limited interoperability — plagued by fraud vulnerabilities, ineffective tracking and attribution, and outdated technology driving up operational costs. Retailers face high intermediary fees, consumers deal with opaque terms and expiry conditions, and there's no standardised way to manage cards across brands or regions. Realising the SmartCard vision meant building a production-grade blockchain capable of handling complex, real-world retail operations — batch card issuance, multi-party authorisation, cross-chain asset settlement, and programmable loyalty mechanics — all while maintaining the throughput and UX expectations of traditional payment systems.

Our Approach

A significant portion of the engagement involved requirements engineering — scoping the problem domain and translating business needs into detailed technical specifications before development commenced. This upfront investment shaped every architectural decision that followed.

The architecture is layered: pallets encoding the core protocol logic, and a smart contract layer to provide permissionless programmability via precompiles — allowing third parties to build on top of the core primitives. Dedicated pallets handle brand and operator management, the full gift card lifecycle (issuance, activation, redemption, reload), and governance enabling progressive transitions from single-key authority through multisig to full council-based voting.

One of the more interesting technical challenges was the authorisation model. Card operations require different permission levels depending on context — brands, program operators, card holders, delegates with time-bounded allowances, and even permissionless actors for certain flows. The solution layered these permissions into a flexible authorisation model that could express complex logic while remaining readable and auditable. A transaction extension pipeline enables sponsored card operations so consumers never pay gas fees, with pre-dispatch validation ensuring invalid transactions are rejected before consuming block space. This sponsorship pattern cleanly separates fee payment from authorisation — a sponsored transaction still passes through the same permission checks as an unsponsored one, with only the payer changing.

We also delivered a prototype UI for demonstrating card issuance, activation, and redemption flows — giving stakeholders a tangible way to evaluate the on-chain functionality before committing to a full frontend build.

Beyond development, we managed the full parachain lifecycle — runtime upgrades, collator operations, and network coordination. Every runtime upgrade was tested against forked live chain state before being submitted for approval via governance, with relay chain and Asset Hub forks running in parallel to verify cross-chain behaviour post-upgrade. Deterministic runtime builds ensured verifiability, while automated benchmarking on dedicated infrastructure kept weight calculations accurate. Keeping current with the Polkadot SDK, a non-trivial effort given the pace of SDK development, required carefully reviewing each release and applying upstream changes to the codebase to incorporate security improvements and new capabilities as they became available.

All work went through peer code review and partner sign-off, with mainnet changes subject to additional scrutiny from the wider engineering team. We maintained a 100% record of faultless runtime upgrades throughout the engagement. We also served as a technical advisory resource for the project's own blockchain infrastructure — drawing on deep familiarity with the Polkadot SDK to diagnose and resolve operational issues quickly, whether that meant tracing collator behaviour, debugging RPC connectivity, or navigating the nuances of parachain onboarding and testnet migrations.

Technical Highlights

  • Attribute-based card constraints: Configurable card properties set at collection creation and enforced immutably from activation — giving issuers precise control over card behaviour while providing consumers with transparent, predictable terms
  • Bounded batch operations: Activations, burns, merges, and other card operations support bounded batching with linear weight scaling — enabling efficient bulk management for operators without compromising block production
  • Cross-chain asset support: A unified asset interface handles both the native network token and foreign assets under a single abstraction, with the native token available on Asset Hub as a foreign asset via teleportation — enabling stablecoin-denominated gift cards and cross-chain settlement without retailers needing to manage multiple asset pipelines
  • Delegated allowances with expiry: Time-bounded spending allowances enabling card sharing, where a delegate can spend up to an approved amount within a defined period — supporting real-world delegation patterns without compromising card security
  • Custom transaction extension pipeline: A layered extension stack handles multi-party fee sponsorship, payment proof verification, and pre-dispatch validation — enabling gasless UX for consumers while preserving full authorisation checks
  • Ethereum compatibility: The runtime was designed with Ethereum alignment in mind — from token denomination to a smart contract layer enabling Ethereum-compatible development, lowering the barrier for developers already familiar with the EVM ecosystem
  • Three-tier runtime strategy: Separate devnet, testnet, and mainnet runtimes with progressively decentralised governance — each tier serving as a proving ground before changes reach production
  • Comprehensive benchmarking: Every dispatchable across all pallets is benchmarked with parametrised scaling tests for batch operations, running on dedicated infrastructure. Results feed directly into weight calculations, ensuring accurate fee calculation and protecting against overweight block attacks
  • Multi-layered test suite: Unit tests validating pallet logic across dedicated test modules — covering authorisation, parameter validation, state transitions, arithmetic safety, and event emissions. Integration tests exercising cross-chain scenarios using XCM emulation across relay chain, Asset Hub, and multiple parachain networks. Runtime integrity tests validating every configuration parameter across all three runtimes — from deposit calculations and weight benchmarks to origin restrictions and XCM security policies — forming a comprehensive regression detection system that prevents configuration drift as the runtime evolves

Outcome

We delivered the full scope on time and on budget — a production-ready parachain purpose-built for the SmartCard vision: programmable gift cards with on-chain issuance, real-time transfers, cross-chain settlement, and the multi-party authorisation model needed to support complex retail operations at scale. The delivery spanned the full lifecycle — from requirements engineering and technical specification through to implementation, CI/CD pipelines, operational runbooks, and ongoing technical advisory.

This project represents some of our most thorough blockchain engineering work to date.

If you're exploring blockchain for digital payments, loyalty, or asset tokenisation — let's talk.

Shaping the Future of a Transparent, Decentralized, and Equitable Gift Card and Loyalty Economy.

retailalliance.foundation

Industry

E-commerce / Digital Payments

Let's start something

Interested in what's possible? We'd like to hear about it.

Get in touch

By browsing this website, you accept our Privacy Policy.