Product engineering for Haplo

Product engineering
for Haplo

A wellbeing rewards app with tokenized points

Get in touch now

Haplo turned four everyday habits into a single score people could improve, track and come back to. Aetsoft shaped the product from concept to release: the iOS app, the Apple Health integration, the scoring model, the points balance, and the conversion that turned a score into cryptocurrency.

Haplo wanted people to move more, sleep better, sit still for ten minutes and keep their weight in a healthy range. It wanted to pay them for it. An iPhone and an Apple Watch already record all four parameters. Aetsoft had to turn those readings into a number people could relate to their own progress and improve. The balance underneath it then had to pay out two different ways without ever paying the same point twice.

001

Client

Haplo Inc., an early-stage wellness company. Haplo was its first product: an iOS app rewarding healthy habits with points, built for a younger audience that did not hold cryptocurrency.

002

Challenge

Turn four unrelated health measures into one score that would keep people coming back, and let customers convert it into cryptocurrency without becoming crypto users.

003

Solution

An iOS app on Apple Health, and a scoring and gamification model built around progress and streaks. A points balance customers could watch, send to each other or convert, and a conversion that minted tokens into a wallet they already controlled.

004

Aetsoft's role

Product consulting, business analysis, requirements and architecture, gamification and scoring, UX and UI, iOS and backend development, the token contract, QA and DevOps.

Q2 2021 to Q2 2022
Apple Health
Ethereum
SRS, architecture and UX/UI
Released on the App Store
Q2 2021 to Q2 2022
Apple Health
Ethereum
SRS, architecture and UX/UI
Released on the App Store
Pavel Sivayeu, CTO at Aetsoft

Engagement lead

Pavel Sivayeu

Led delivery and technical direction.

Commercial lead, Aetsoft Inc

Engagement lead

Artem Kirylin

Led consulting, the client relationship and gamification.

The problem

A tokenized reward is only as good as the scoring model underneath it

Earning had to be passive, because the behaviour Haplo rewarded happens whether or not anyone opens an app. An Apple Watch mattered for the same reason: sleep and standing are only recorded properly by something worn.

Scoring then had to do the motivating. Activity, sleep, mindfulness and body mass index measure four different things on four different scales, and none converts naturally into the others. Whatever came out had to pay more for a fortnight of effort than one heavy Saturday.

That balance had two jobs. It was the progress bar where a customer opened the app to look at, and the store of value, which meant points had to be worth something off that screen. Whether to let them leave the product altogether was the open question the next section answers.

All of it had to work for people who did not own cryptocurrency. A wallet, a network fee and a signed transaction could not sit between a customer and a first reward.

A tokenized reward is only as good as the scoring model underneath it

That balance had two jobs. It was the progress bar where a customer opened the app to look at, and the store of value, which meant points had to be worth something off that screen. Whether to let them leave the product altogether was the open question the next section answers.

All of it had to work for people who did not own cryptocurrency. A wallet, a network fee and a signed transaction could not sit between a customer and a first reward.

Haplo could have shipped points alone. That number would have been worth whatever Haplo said it was worth, and it would have stopped at the edge of the app.

The business case. Tokenized rewards gave Haplo one currency three different buyers could use

Making the score convertible cost a token contract, a wallet integration and a support path. Aetsoft designed the economy layer around it: how the currency issued, what a year of good habits was worth, and where the score ended and the token began.

Only the consumer earning and conversion path reached the first release. The other three were defined in the concept phase and stayed there.

All of it depended on the layer underneath: data Haplo could rely on, a score customers could see themselves improving, and a balance that never paid twice.

  • Consumers minted currency from their own score into a wallet Haplo did not control, so what the reward was worth stopped being a number Haplo defended alone.
  • Employers could buy the currency in bulk and pay staff for running a 10k, keeping up an annual medical or holding their BMI in range. A wellbeing benefit that pays in something staff keep.
  • Other wellness companies could convert their own loyalty points into the same currency, making it common across the sector instead of particular to one app.
  • A fourth route ran the other way. Customers would spend the currency with wellbeing suppliers, taking a discount on something that supported the habit they were being paid for. Value enters from employers and wellness companies, and leaves when a customer buys with it.
Aetsoft designed the economy layer: issuance, the earning rate, and the boundary between the score and the token. The consumer path reached the first release. The employer, cross-company and marketplace routes were defined in the concept phase and were not built.

The solution

Four parts turned an Apple Health reading into a tokenized reward

1/2 Health data and everyday rewards stayed inside the application. A public network was involved only when a customer chose to convert.

Apple Health supplied closed activity rings, time in bed, screen time and body mass index.

A scoring model turned those into one number. A balance held it, showed progress and let customers hand points to each other.

One route out converted the score into cryptocurrency.

2/2 Aetsoft designed the scoring model and its multipliers. The tables were published inside the app so a customer could check the arithmetic.

One score from four habits, on a curve that rewards the right amount.

Aetsoft built one habit score from four sub-scores, each with its own table, published inside the app:

  • Fitness scored the three Apple Activity rings. Close none and score nothing, close all three and score three.
  • Sleep scored average time in bed. Seven and eight hours scored highest, nine scored less, ten or more less again, and four or fewer scored nothing.
  • Mindfulness scored screen time and how often the phone was picked up.
  • Outcomes scored a week with body mass index inside a healthy range.
  • Streaks multiplied the result: a seven-day run paid 1.25 times, a thirty-day run paid double.

The sleep table is the part worth pausing on. A scale that paid more for more would have rewarded staying in bed. Each measure had to encode what good actually looks like, which is a health design question before it is an engineering one.

Above the score sat the earning rate: an annual target, currency earned pro rata against it, an accelerated rate past the target, and a cap. These are the mechanics a tiered loyalty programme uses, applied to behaviour instead of spend.

1/3 Gamification was the retention mechanic, and most of it was designed for later.

Gamification was the retention mechanic, and most of it was designed for later.

Aetsoft designed the layer that brings people back to the score.

  • Streaks, which shipped, paid 1.25 times for a seven-day run and double for thirty, so missing a day cost more the longer someone kept going.
  • A collaborative room, where two to five friends took a shared challenge over seven to fourteen days, with a group chat and a leaderboard.
  • A competitive room, public, where players staked points on finishing and forfeited them if they failed.

Both rooms were specified in full and held back from the first release. They are where the reward stops being a private number and becomes something people compare.

2/3 The balance was where progress became visible.

The balance was where progress became visible.

A customer opened the app to see the balance screen, with its history and its chart of the score over time. For most people most days that screen is the product, because it is where a week of effort turns into a number that moved. Customers could also hand points to each other by QR code or phone number.

That history is also an asset for the business. It records what customers actually did to earn, which is the input an AI assistant for loyalty management works on once the earning model runs.

3/3 Converting points into a token in two phases: freeze, mint, confirm, redeem

Conversion let a customer take the number out, into a wallet they already controlled.

Conversion ran in two phases that could fail on their own, so the balance tracked two states. Active points were spendable. Frozen points were reserved while a conversion was in flight, because a blockchain transaction takes minutes and can fail. Without that split a customer could start a conversion and hand the same points to a friend while the network was still working.

A customer chose an amount and those points were frozen. The backend prepared an unsigned transaction with a thirty minute life. The customer signed it in MetaMask and minted the tokens. The backend redeemed the frozen points only after the network confirmed.

Someone who changed their mind, ran out of funds, or closed the app got the points back when the freeze expired, unspent.

Tokens were minted from the customer's own address, and the contract, built as part of Aetsoft's smart contract development work, accepted that call only when it carried a signature from Haplo's server. Haplo proved a customer had earned the tokens without ever holding them. Everything else stayed off-chain.

Romb

Every decision behind
the conversion cost
Haplo something

  • Decision

    Points stayed off-chain

  • Why

    Scoring stayed a product question, tunable without touching a contract

  • What it cost

    Points stayed Haplo's liability until someone converted

Icon 02/05
  • Decision

    The customer minted

  • Why

    Haplo never held customer keys or balances, and never became a custodian

  • What it cost

    The customer needed a wallet before they could convert

Icon 03/05
  • Decision

    MetaMask was integrated

  • Why

    No key storage, no recovery flow, and no support burden when someone lost access

  • What it cost

    Haplo could not control that experience or fix it when the wallet changed

Icon 04/05
  • Decision

    The customer paid the network fee

  • Why

    Haplo's costs did not scale with conversion volume or gas prices

  • What it cost

    In 2021 the fee could take a large share of a small conversion

Icon 05/05
  • Decision

    Freeze first, redeem after confirmation

  • Why

    A failed or abandoned conversion cost the customer nothing

  • What it cost

    The balance carried two states and more logic than a simple counter

View more

The same conversion fits hospitality, e-commerce and employee rewards

Health data is only what sat upstream. Underneath it are three parts: a points balance the business runs and prices, a boundary it controls, and a conversion that hands the customer an asset the business no longer holds. Swap the input and those three hold, though the earning model has to be rebuilt each time. A hotel group scores nights and tier, an e-commerce brand scores basket and return rate, an employer scores scheme participation. That is the shape of a loyalty tokenization solution in each of them.

In another engagement, Aetsoft designed a loyalty layer for Avawear's digital fashion marketplace, where a retailer's loyalty points already existed.

The same conversion fits hospitality, e-commerce and employee rewards

Aetsoft joined while the reward model was still open. Settling that before anyone writes code is blockchain consulting work. It is the whole engagement in the NDAX loyalty case , where the economics and requirements were agreed and handed to the client's own engineers.

How the engagement run. One team settled scoring, the balance and the conversion together.

1. A token workshop and product consulting, to settle what the token was for and where the boundary between the product and the network should sit.
2. Software requirements and system architecture, specifying the scoring model, the balance design and the conversion flow together.
3. UX and UI, including the scoring tables customers could check.
4. Scope for the first release, then development, QA and release to the App Store.

That release covered earning, scoring, streaks, the balance, transfers and conversion. The group rooms, chat, friends and groups were specified and held back, because there was nothing to test until the reward itself worked.

One team covered business analysis, gamification, iOS, backend, the token contract, QA and DevOps. Scoring, the balance and the conversion were settled in the same meetings. A change to how points were earned could be priced against its effect on the conversion before anyone committed.

Four phases from token workshop to App Store release, Q2 2021 to Q2 2022
Romb

What the work delivered,
from gamification concept
to the App Store

  • An iOS app and a companion Apple Watch app, released on the App Store.
  • Apple Health integration across four data categories.
  • A software requirements specification, a system architecture and complete UX and UI design.
  • The gamification and scoring model, with published tables and streak multipliers.
  • A points balance with transfers by QR code and phone number.
  • The token contract and the conversion flow.
  • AWS infrastructure, QA and deployment.

Two boundaries belong here. The group rooms and the supplier marketplace were specified for later phases and sat outside the first release.

Frequently asked questions about tokenized loyalty rewards

  • What is loyalty points tokenization?

    Letting a customer convert points they earned into a token they hold in their own wallet. The word covers two very different projects. Replacing your points with a token rebuilds the programme around it. Adding one route out of the balance leaves the points alone.

  • Who pays the network fee when a customer converts points?

    Somebody has to, and the decision is commercial. Haplo put it on the customer, which kept its costs flat and made small conversions unattractive. Subsidising it gets the opposite: a smoother conversion, and a cost that rises with volume.

  • Do we need to build our own wallet to offer tokenized rewards?

    Usually not. An in-app wallet makes you responsible for customer keys and for recovering them when people lose access, which is a security operation in its own right. Integrating a wallet the customer already controls avoids that. Cryptocurrency wallet development earns its place when custody is the product itself.

Planning tokenized rewards for a loyalty programme?

Tell us what your points already do and what you want a token to add. We will tell you where the boundary should sit and what has to be settled before anyone writes code.

Contact sales
Pic

Product engineering for Haplo

Logo
Pic

Ethereum Towers digital ownership layer

Logo
Pic

MOD4. Loyalty
gamification

Logo
Pic

Street-art gallery's operations inside an NFT platform

Logo
Pic

XLA Metasites
to the buyers

Logo
Pic

NDAX loyalty
programme

Logo
Pic

Shared history for crop sensor data

Logo
Pic

Government blockchain adoption framework

Logo
Pic

Crypto broker infrastructure

Logo
Pic

Cryptography and Layer 1 protocol development

Logo
Pic

Reusable verification on a healthcare credentialing blockchain

Logo
Pic

Product engineering for StreamWolf

Logo
Pic

Kaltura live Cloud TV platform

Logo
Pic

EVM in a private BitShares fork

Logo
Pic

Multi-tier blockchain protocol

Logo
Pic

Securities
tokenization platform

Logo
Pic

Velocity Career
Labs

Logo
Pic

Engineering inside BitShares Core

Logo
Pic

Blockchain core development for an EVM layer 1

Logo
Pic

AI assistant for loyalty management

Logo
Pic

VPLedger: a layer 1 blockchain

Logo
Pic

Balancer AMM for a better token access

Logo
Pic

DEX aggregator

Logo
Pic

CEX-DEX hybrid crypto exchange

Logo
Pic

DEX for PSP

Logo
Pic

Performance monitoring solution for green energy

Logo
Pic

Blockchain Loyalty Platform

Logo
Pic

STO platform

Logo
Pic

Digital currency solution

Logo
Pic

Blockchain voting solution

Logo
Pic

Car eService book

Logo
Pic

DAO space

Logo
Pic

NFT marketplace for creators

Logo
Pic

Metaverse rooms sports

Logo
Pic

Metaverse rooms

Logo
Pic

FreeStyle NFT

Logo
Pic

Data provenance solution

Logo
Pic

DLT solution for smart logistics

Logo
Pic

Pipe trading platform

Logo
Pic

Tea exchange platform

Logo
Pic

genEOS

Logo
Pic

BitShareScan

Logo
Pic

Decentralized trading platform

Logo
Pic

DEX mobile wallet

Logo