project screenshot 1
project screenshot 2
project screenshot 3

SuckerPunch

A dynamic fee hook, which adjusts fees based on how long you've been a holder. With added punishment for Sandwich Makers

SuckerPunch

Created At

ETHGlobal London

Project Description

This is a smart contract written in solidity. It tracks buy & sell timestamps within the hook contract its self to adjust fees fairly, providing extra incentive for holders with reduced fees, as well as the fees collected from more paper handed traders giving LP providers and holders more stable liquidity. On top of this there's a check to see if a buy & sell are made in the same block (sandwich attack) in which case the fee is as high as possible because this is a malicious attack.

How it's Made

The project makes use of the UniswapV4 libraries. V4 is still very new so i figured the best place to start was at the source. I'm using foundry to manage dependencies & tests, as I wanted to keep everything written in one language, and there was already a great starter template provided by Uniswap. Other than this it's written in pure solidity. I've mostly been following the uniswap v4 by example resource and reading through the other hooks I can find online.

background image mobile

Join the mailing list

Get the latest news and updates