Mellow and Brevis Exploring Trustless Loyalty

[read_meter]

Loyalty Programs – The Signature Ingredient in a Success Recipe

We’ve all seen it – from airlines to ride-sharing apps – Web2 has shown us just how essential loyalty programs are. These programs are the backbone of customer retention, turning one-time users into long-term supporters. They incentivize specific behaviors, like frequent purchases or early adoption, and over time, they help foster a thriving community. By rewarding consistent engagement, these programs can transform a casual customer into a loyal fan, securing a stable user base essential for long-term viability. 

Uber Rewards encourages retention through different tiers and perks

With as much success as we’ve seen in Web2’s loyalty programs, it’s no surprise that the DeFi space in Web3 is trying to catch up—more and more protocols are adopting loyalty programs that reward users for actively taking part in the ecosystem by participating in activities like staking, trading, or providing liquidity. These programs are designed to align user behavior with the protocol’s goals, creating a healthier ecosystem: for example, by structuring rewards to grow over time, protocols can encourage long-term commitment, ensuring consistent activity and system stability; on the other hand, distributing governance tokens as rewards allows users to shape the protocol’s future, truly aligning their interests with the project. But while these programs offer incredible benefits, they come with a catch: most if not all of these loyalty features are currently built on centralized systems, which runs counter to the principles of decentralization that DeFi is all about.

Risks of Centralized Loyalty Programs for On-Chain Protocols

To understand why Web3 loyalty programs are now faced with common centralization risks, we need to start with the three key components in their implementations:

  1. Input Data – Historical blockchain data such as token holdings, deposit and withdrawal events, and total LP token supply.
  2. Computation – The rules and logic used to calculate each user’s reward amount.
  3. Reward Claiming – Seamless result updates to the protocol via smart contracts so users are able to claim their loyalty rewards.

While protocols already easily manage the reward claiming portion, implementing the first two components in a decentralized way has been a challenge due to the smart contracts limitations in historical blockchain data retrieval and the high gas cost associated with complex computations. As a workaround, many protocols handle loyalty features by using centralized systems like locally hosted servers. While centralization helps mitigate the blockchain’s inherent limitations, these opaque systems create “black boxes” without any on-chain verifiability in the input data or computation. 

Users in these loyalty programs are forced to trust a single entity, which poses risks of a single point of failure that is vulnerable to outages, hacks, and mismanagement. Moreover, centralized control allows arbitrary censorship – operators can exclude users, manipulate rewards, or alter rules at will as there is no way for users to detect or verify unannounced changes. These inherent risks can harm a protocol’s reputation, diminish community engagement, and deter participation.

Mellow Explores Designing a Brevis-Supported, ZK-Verifiable Loyalty Program

Mellow Protocol is an innovative liquid restaking primitive allowing permissionless creation of modular LRTs. Mellow offers a series of vault smart contracts tailored to different risk profiles, managed by LRT curators. To stick to the decentralization ethos, Mellow is working with Brevis to explore the design of how a trustless loyalty program would look utilizing the Brevis ZK Data Coprocessor. 

With Brevis, a loyalty program would work like this:

  1. Verifiable Input Data: Brevis would extract historical on-chain data and generate a zero-knowledge proof (ZK proof) to verify its integrity.
  2. Verifiable Computation: Brevis would then feed this data into the reward calculation logic implemented in circuits using its SDK. It would then output the reward results with a ZK proof, ensuring accuracy.
  3. On-Chain Reward Claiming: The computation results, verified via ZK proofs on-chain, would be sent to Mellow’s reward contract through a callback function. If the proof is invalid, the transaction is rejected, ensuring only accurate, trustworthy results are used.

Looking Toward The Future 

Mellow and Brevis will be exploring a reward distribution system based on time-weighted LP token holding supported by Brevis proofs and computations. An example of this design would be to calculate Loyalty Points based on the time-weighted value of the LP token rstETH for the P2P vault. Brevis would compute reward results according to Mellow-defined criteria, and output the start block, end block, and the reward amount for each LP. The results along with the proof would be verified on-chain batching multiple LPs in order to amortize the cost.

Using this proof-of-concept as a starting point, Mellow plans to continue to explore where Brevis’s technology could be applied. With Brevis’s ability to allow protocols to leverage verifiable and trustless on-chain historical data, it opens a multitude of opportunities for Mellow to consider. Brevis could support systems like a Loyalty Point program mentioned above, as well as more unique customized user experience journey-based features derived from on-chain behavior or connections. These efforts underline a shared commitment of expanding the boundaries of what’s possible in Web3 while adhering to the core principles of security, transparency, and decentralization. With Brevis and Mellow working together, we’re helping to set a new standard for what data-driven features in Web3 should look like!

Are you interested in creating your own loyalty program or other decentralized data-driven feature using Brevis? Reach out to us to explore ideas!