Go Back to Blog Posts

Sonder - first loyalty program on the Solana blockchain

Sonder - first loyalty program on the Solana blockchainSonder - first loyalty program on the Solana blockchain

Looking to work with a no-headache development agency?

Basics

What is Sonder?

Sonder is a CRM tool that enables crypto projects to easily and quickly launch their own loyalty programs. It was built with the goal of providing users with a hassle-free experience when trying to attract, activate, engage, and reward their customers. Sonder's marketing SaaS removes the need for manual labor associated with setting up loyalty programs

What are custom loyalty programs?

Custom loyalty programs are customized rewards and incentive schemes designed to meet the needs of a specific business or customer base. These rewards can vary from discounts on products or services, exclusive access to events, early-bird offers, or bonus points for customers who purchase frequently or refer their friends. Custom loyalty programs allow businesses to tailor the reward scheme in such a way that it incentivizes their customers to stay loyal and engaged.

What is a loyalty program on the Blockchain?

Loyalty programs on the blockchain are digital solutions that allow businesses to reward customers for their purchases and engagement with tokens or cryptocurrency. These rewards use smart contracts to automate the process of rewarding customers, making sure that each user receives the correct reward without any manual intervention. The use of blockchain technology also provides businesses with an immutable record of customers' loyalty and engagement, allowing them to better understand how to improve their customer experience. With Sonder's help, businesses can now launch a customized loyalty programme on the blockchain in minutes.

How does Sonder work?

Example of the campaign from the end-user perspective. Example of the campaign from the end-user perspective.

Our goal was to create a tool that would make it easy for marketers to create their own campaigns in just a few minutes. The process looks like this:

  1. Connect your crypto wallet and create your brand's profile
  2. Get creative and come up with exciting journeys for your users:
  3. Bounties - set a task and reward everyone who completes it
  4. Raffles - give your users a chance to win a lucky draw with better rewards for fewer recipients
  5. Competitions - find out who your most loyal and engaged users are by creating a competition with one winner
  6. Custom - create your own campaign with custom rules and manually reward users for their submissions
  7. Set the rewards and duration for your campaigns and deploy with just a few clicks.

The underlying technology is a claimable smart contract that automatically distributes rewards according to the rules of the campaign once conditions are met. It is trustless, permissionless and decentralized. Think of it as a white-label loyalty program on the blockchain, helping your brand navigate community rewards and customer loyalty in the web3 ecosystem.

Project features

The goal of the project was to develop a loyalty program solution that can be implemented in an easy way by web3 projects based on the Solana blockchain. Application is divided into two sides of the business process: the end-user side to complete a set of actions to get a reward and a marketer panel to set up campaigns and actions.

Discovery page with multiple brandsDiscovery page with multiple brands

End-user features:

  • Discovery page with multiple communities
  • Connect your wallet (e.g. Phantom Wallet) as an authentication of the user
  • Connect your Twitter account to verify your social media actions (e.g. Twitter Follow)
  • Verify on-chain actions like a “Hold USDC token in your wallet”
  • Claim a reward on the Solana blockchain (e.g. NFT)
Preview of the campaign actions in admin panelPreview of the campaign actions in admin panel

Marketer features:

  • Create a new brand with all details
  • Create a new campaign with multiple actions (e.g. Follow our Twitter page)
  • Create an off-chain action to be verified (e.g. Twitter Like)
  • Create an on-chain action to be verified (e.g. Hold a USDC token in your wallet)
  • Edit your campaigns and actions
  • Deposit a reward to a smart contract on the Solana blockchain
  • Results page with participants data so marketers can analyze their users

The Tech Stack

Business goal

Our primary objective for this project was to minimize the time-to-market and streamline the development process as much as possible. That's why we opted for our tried and true, highly efficient serverless stack:

  • Next.js for the frontend, hosted on Netlify for the backend.
  • Supabase as our database, primarily for storing session status. As an open-source alternative to Firebase, Supabase offers real-time databases and authentication capabilities.
  • Solana as the underlying blockchain technology to distribute on-chain rewards, as it provides speed and scalability that is unmatched by other platforms.

Serverless Architecture

A serverless stack, as the name suggests, eliminates the need for provisioning and maintaining servers. Instead, it allows you to run code and execute functions in response to events such as HTTP requests or file uploads. This approach is more cost-efficient and scalable as resources are only used when needed and charges are based on usage rather than pre-allocated capacity. Additionally, serverless enables faster development and deployment cycles as the focus shifts away from managing infrastructure and towards writing and deploying code.

Next.js and Netlify

Next.js is a widely used framework for building server-rendered React applications, it enables developers to create high-performance and scalable web apps, the efficient routing and rendering capabilities were one of the main reasons we chose to use Next.js for our project.

To streamline the development process, we decided to host our app on Netlify to reduce dev-ops costs and allow our team to focus more on the actual development.

Instead of using Next as a full-stack framework, we chose to use Netlify functions for the backend since it was something we were already familiar with. This allowed us to have all our APIs as serverless endpoints served by Netlify. Additionally, we set up recurrent cronjobs (read more about Netlify Scheduled Functions here), which allowed us to run specific scripts regularly, such as:

  • Authentication of the users
  • Generating information about available campaigns and actions to perform
  • Validating user off-chain actions like Twitter Like, Retweet or Follow to rewards the end-user with some tokens
  • Distributing rewards using integration to the Solana Blockchain

This added a significant level of automation to our project and allowed us to separate the frontend and backend, using Next.js for the frontend and Netlify for the backend.

Overall, using Next.js and Netlify allowed us to create a high-performance, scalable, easy-to-maintain web application. It's an excellent choice for developers looking to build server-rendered React applications, and the integration with Netlify provides added capabilities that can help improve the overall development experience.

Supabase

Supabase is an incredibly useful tool that simplifies the process of setting up and managing a database and authentication, which can often be complex and time-consuming.

Supabase structure with multiple tablesSupabase structure with multiple tables

We used Supabase as our database, primarily to store information related to verified actions, campaigns, user activity, and reward distribution. We organized the data using multiple tables, which helped to keep it consistent and organized.

Solana blockchain

Solana is a decentralized blockchain platform designed to provide fast, secure, and scalable transaction processing. It has been created by a team of experienced engineers from both the cryptocurrency and traditional finance worlds who have come together to create a platform that can handle large-scale transactions efficiently.

We used the Solana blockchain to develop a solution to:

  • Securely distribute the rewards for end-user as Solana cryptocurrency, SPL token, and NFTs
  • Verify on-chain activity of end-users e.g. interacting with a specific Solana protocol to get a reward
Solana transactions per second in January 2023Solana transactions per second in January 2023.

We closely monitored the performance of the Sonder project and its on-chain activity after its launch in November. We were pleased to find that using blockchain technology was almost as fast as using centralized storage. We are providing Solana's transactions per second during the last few weeks as an example.

Cost-Efficiency

Developing a product as advanced as Sonder, with both end-user and marketer functionality, would typically take months of development using other technology stacks. However, our team's experience and use of Next.js, Netlify, and Solana allowed us to complete development in three times less time. Additionally, thanks to our choice of technology, we were able to create a reliable and efficient product for our customer.

Brands using SonderBrands using Sonder include Raydium, Marinade, Helio, and Tulip.

Results

During Solana's annual conference, Breakpoint, the company Sonder debuted and quickly gained a substantial number of users. Additionally, several prominent web3 projects, such as Raydium, Marinade, Helio, and Tulip, have adopted Sonder for their own use.

You can test Sonder here.

Looking to work with a no-headache development agency?

© 2023 Freyja