Loyalty Hooks

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

ETHGlobal BrusselsShipped July 12, 2024#defi
Repo
Loyalty Hooks banner

About

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%

From the public ETHGlobal showcase page. Votes, swipes and the judge score are hackfeed's own.

AI judge

Not judged yet. A free model reads this page, compares it with similar projects and this event's winners, then scores it and says what would make it win.

Still being built?

Not checked yet.

Swipe stats

0upvotes
0skips
0saves

Discussion 0

No comments yet. Ask the team something, or say what you'd use it for.

Posting as a guest. Plain text, 1,000 characters max.

Already built nearby

Closest projects by meaning and shared words. Similar isn't the same as copied: read them.

Custom Curves

CustomHooks is a customizable hook-based solution for Uniswap v4, enabling trading on custom invariant curves while leveraging Uniswap's efficient pool and routing infrastructure