← Back to home

Fair Trade

Launch ERC-20 tokens with Uniswap V4 and protect your token holders with Fair Trade.

Screenshots

Fair Trade screenshot 1
Fair Trade screenshot 2
Fair Trade screenshot 3
Fair Trade screenshot 4

Problem Statement

OverviewDeckFair Trade is a Uniswap V4 pool that launches tokens with safety guarantees for future token holders and traders. By leveraging Uniswap V4 hooks, projects can safely raise ETH, distribute tokens, pool liquidity, and put time-locks on tokens.BenefitsInstead of raising funds for a new token or project using Excel or a hot wallet, deploy Fair Trade and track liquidity raised for the project on the blockchain.Once the project creator is ready to launch the token (target ETH is raised), user callslaunchwhich will launch an ERC 20 token, distribute this token to initial liquidity providers, lock the token + ETH raised in a Uniswap V4 pool and then trading can begin.For the first year, trading can take place for anyone that is not flagged as a "funder" and the initial liquidity pool is locked.

Solution

MechanismHooks used:beforeInitialize,afterInitialize,beforeModifyPosition,beforeSwapERC20 base isSoladyDeployment is loosely outlined intest/FairTrade.t.solUsageTo use this hook:Deploy theFairTradecontract (set a name, symbol, and decimals for your token)Ask your liquidity / fund providers to calldepositEth. If your providers want to quit before your token launches, they can callquitOnce you raise your target amount, calllaunch. This function will kick off a token deployment, pool initialization, and token distribution with Uniswap V4 hooks (beforeInitializeandafterInitialize)Afterlaunch, LP and swap functions are available. Checks for who are trading the tokens are done in thebeforeSwapandbeforeModifyPositionUniswap V4 hooksBonusThis set of contracts also has a Next JS app ready. Features are listed below. This app is targeting users that are new to crypto so we've integrated with Privy and created a simple Next JS app.Login with Twitter via PrivySimple flow to take in token data before fundraising kicks offOnce fundraising is kicked off, user has a simple swap box available for other users to buy / sell the new token

Hackathon

ETHGlobal New York

2024

Prizes

  • 🏆

    💡 Uniswap Foundation — Most Innovative

Contributors