A RApp (Reward Application) for Every Agent

Loyyal
8 min readDec 29, 2015

--

Shannon Code, Chief Architect , Ribbit.me (ShannonCode)

Welcome to the technical explanation of the RApps layer of our LoyaltyNetwork™. (Have a look at our previous blog entry on Reinventing Loyalty, which broke down the LoyaltyNetwork stack for some background.)

In order to standardize and create a frictionless environment, we must view every actor in the network as an agent. Agents can be program operators, shopping cart plugins, Automata (bots), shoppers, merchants, IoT hardware or anything else that can act within a network. The resulting network of interaction we call the LoyaltyNetwork.

LoyaltyNetwork is our solution for introducing a universal platform to the loyalty and rewards industry. In it, we introduced the Abstracted Value Consensus Protocol (AVCP), which abstracts value and the value distribution protocol away from the consensus protocol in the distributed ledger to each independently run Rewards Application, or RApp.

Overview — What is a RApp?

A RApp is an agent’s entrance into the LoyaltyNetwork.

Think of RApps as Applications that hold a set of rules or parameters that can be developed and then used by the owner, or installed by other agents on the network, in order to reward their consumers (agents).

The first incarnations of RApps will look like a rewards card wallet similar to Apple Pay’s “Wallet” application on iOS and Samsung Pay in Android. The RApp also communicates with the LoyaltyNetwork’s AVCP to facilitate the issuance and redemption of rewards.

SmartRewards

SmartRewards are tokens issued from within a RApp, they behave in special and dynamic ways. Imagine a SmartReward like an item in your pocket that changes shape and color based on where you are, what time of day it is, who held it last and so on. With each new shape and color comes new features.

Token Tree

SmartRewards form a tree structure. New tokens are derived from previously created tokens. New tokens retain the “powers” defined further down the tree.

An easy way to visualize the tree is like this:

At the root there exists a Reward token, it will have a few rules applied to it by Ribbit.me. A Branded program (Company A) will issue new Reward tokens that are wrapped with their brand. These branded tokens now contain the features, rules and restrictions placed within them by the Company A operator.

The Company A has the ability to allow agents to create branded programs using their newly created tokens. Company A signs up a few merchants to create their own branded programs. (Company B,C,D)

Company B, C and D can now issue their own branded tokens with their own custom rules, but with the restrictions placed by each token along the way.

The tree structure allows anyone to become the manager of their own ecosystem or agents & RApps. Through this process one could become their own white labeled loyalty program provider. Someone else could issue tokens to their students and offer them the ability to create some social rewarding network that follows certain criteria. Corporations might want to create RApps and tokens with a few base rules that are then used within branches across the world, each branch might have their own special uses for their tokens. It could further be applied to the infrastructure of existing networks such as a redemption network, payment network, wholesale or retail marketplace/mall, franchise organization or supply chain, etc. This tree structure allows this to take place easily.

How do I use a RApp?

RApps are installed within a wallet.

A wallet within the LoyaltyNetwork isn’t your typical currency wallet; it’s much more powerful than that. First and foremost a wallet hosts your identity. This identity information is essentially a public / private key pair. Private keys are used within the wallet to sign messages between an installed RApp (client) and a hosted version of the RApp (server).

A RApp, at a minimum, will contain a client view and an administrative view.

The client view is what a RApp user will see when they open and interact with a loyalty program from their desktop or mobile wallet.

The administrative view is a dashboard used by the loyalty program operator to view what’s happening within their RApp.

A RApp might contain other views, for example: An operator might create a RApp with a mobile view that will allow shoppers to view their balance of rewards and another view for merchants to allow the redemption of rewards in-store.

Another example of a wallet + RApp installation is the plugin, for example: A program operator might do all of their sales via an online shopping cart. Their RApp would have a user interface within their wallet similar to what I described previously. We provide a wallet that can be installed on a server. Installation of the RApp, described here and authorized as a plugin, allows a shopping cart to communicate with the hosted RApp. Now whenever a user checks out and pays with the shopping cart, the plugin RApp confirms the purchase with the hosted instance of the RApp acting as a delegate.

Technical Breakdown — How do I build a RApp?

We want to encourage everyone to build their own RApps! Whether you are a program operator (large or small), a network, an individual, or even a company looking for an internal incentification solution, you can build a RApp to suit your needs. Your imagination is the only limitation!

Ribbit.me will be providing documentation and a series of SDK’s (Software Development Kits) to grant third party wallets the ability to install RApps. We will also have a lower level SDK with a separate pricing model that will allow direct access to our AVCP API.

Developers (RApp[ers]) can develop a RApp by using an in-wallet (desktop only) RApp builder called RibbitFlow™ or by using our Rewards Programming Language (RPL).

RibbitFlow is a visual design tool that allows simple or complex logic to be “wired” together in an “If This Then That” style workflow using various Flow Modules.

RibbitFlow uses the software development model known as Flow-Based Programming (FBP). FBP allows for the rapid implementation of logic and the ability to enhance or rewire logic quickly without the need to modify code. This is similar to Business Process Automation tools that ship with enterprise business software suites. Early versions of RibbitFlow are based off of node-red by IBM

RibbitFlow will provide a handful of simple reward program templates to help you get started quickly. A simple use-case: Pick program type template, upload your company logo, pick a theme, enter company information and deploy the RApp. This will produce a basic RApp that’s able to be installed into a user’s wallet, a simple plugin that can be included in a website if necessary, a simple backend and a simple Point of Sale App that can be used to redeem rewards.

RAppers will have the ability to modify their RApp UI and Logic from within the provided builder, but are not required to do so. A Flow Module is provided that allows external services to be triggered from within a RApp workflow. REST, tcp, udp and websockets are a few examples of hooks into and out of the system.

How about interfacing with my legacy system?

Flow Modules are easy to create and allow for developers to provide third party data to their RApp that might not be already provided. For example, out of the box Ribbit.me will provide modules for basic http communications, location services, beacons, twitter and mode. If you need to provide the ability for a RApp to track packages, you can build a module that provides tracking capability to the RApp builder. Plugins, RibbitFlow and RApps you write are stored on systems you control. Any data you provide your RApp is only available to the RApp hosted instance (unless explicitly allowed to push the data to clients).

What about security?

RApps installed in a user’s wallet are jailed from each other. They’re allowed to request permission to interact with other RApps at the time of install, much like when you log in to a third party website using Facebook OAuth or Google OAuth. This allows RApps to share data without the fear that some rogue RApp will spend all the rewards in another RApp.

RApp users’ key storage remains on their mobile device and is used to cryptographically sign communications between client side RApps and hosted RApps. This means that no passwords are ever sent over any connection (unless a RApp developer builds in the capability).

Since RApps are deployed wherever the program operator chooses, any proprietary data provided to or generated by a RApp stays on systems the program operator controls. The AVCP stack stores identity information as public keys and addresses. Almost zero metadata about value transactions is stored within the AVCP. This is for privacy and scalability. Having a clear separation of concerns dictates that each layer, method, or class only does as much as it has to in order to operate. The AVCP handles identity, permissions and value transfer and that’s what will be stored on the distributed ledger. User details, order information, health data, etc., stays where they currently live.

Anything else?

One thing that might not be immediately apparent is the power of the RApp. By abstracting the value distribution rules from the Distributed Ledger and placing it in the application development level, we allow operators to determine exactly how their reward points, coupons, tickets, or cards operate. This includes the ability to programmatically specify breakage rules, (points that are never redeemed), circulation rules, redemption rules, p2p exchange rules, and more.

Multiple rewards program operators can operate independent of each other, protecting their data privacy, control of their existing brands and program rules. At the same time they share with each other one distributed ledger protocol for interacting together in redemption networks, creating the frictionless universal platform currently lacking in the industry. This also opens up the ability to offer shared liability and instant value clearance between partners. Security and privacy first brings with it compliance and traceability, e.g., KYE, KYC, PCI, and OSHA.

How do I get started?

If you are interested setting up a RApp please contact us! We are just a few months away from the launch of our MVP and are actively looking for RApp[ers] to join us.

Contact Ribbit.me today to get early access.

@ShannonNullCode

Shannon Code

Chief Architect, Ribbit.me

--

--

Loyyal

Blockchain & Smart Contract Solutions for the Loyalty Industry