project screenshot 1
project screenshot 2
project screenshot 3

Loyalty Hooks

A Token Loyalty System using Uniswap v4 hooks to incentivize holding & providing liquidity

Loyalty Hooks

Created At

ETHGlobal Brussels

Project Description

LoyaltyHooks is a loyalty system designed to incentivize positive behaviors in the Uniswap ecosystem. By leveraging Uniswap v4 hooks, LoyaltyHooks allows ERC20 token projects to reward users for providing liquidity and holding tokens while disincentivizing selling and removing liquidity. This system aims to promote long-term engagement and stability within the token's ecosystem.

How it's Made

By leveraging Uniswap Hooks, actions like holding a token & providing liquidity are incentivized by awarding loyalty points, while removing liquidity or selling the token are disincentivized.

loyaltyPoints translate to dynamic fees set for a given swap.

  • minimum loyalty points = 0 , maximum = 100.
  • swaps that buy token, add loyalty points. amount of points added is a function of swap amount divided by liquidity in the pool.
  • swaps that sell token, subtract loyalty points. amount of points subtracted is a function of swap amount divided by liquidity in the pool.
  • record latest buy & sell swaps executed by any address. When that address swaps the token, hook checks how much time has passed since last swap of same direction. For buys, it adds a multiplier on loyalty points gained if this address has bought more recently than when they last sold, and the last time they bought is within INTERVAL parameter (set to 1 day by default). For sells, adds a multiplier on loyalty points subtracted if this address has sold more recently than when they last bought, and the last time they sold is within INTERVAL.
  • adjusts fees on any trade based on loyalty points: 100 points = minimum fee of 0.1% , 0 points = maximum fee of 3%, with any other number of points in between linearly translating to a fee between 0.1% and 3%
background image mobile

Join the mailing list

Get the latest news and updates