Uniswap / v3-staker

Canonical liquidity mining contract for Uniswap V3
https://uniswap.org
GNU General Public License v3.0
353 stars 197 forks source link

Enforce a fixed range for new Incentives #220

Open guil-lambert opened 2 years ago

guil-lambert commented 2 years ago

This is related to this post on the Uniswap governance forum about incentivizing liquidity on L2's: https://gov.uniswap.org/t/consensus-check-should-uniswap-incentivize-liquidity-on-optimism-and-arbitrum/15288

I've created a fork of the v3 staker contract that adds a new minWidth parameter to the IncentiveKey. That way, new LM incentives may require that LP tokens have a minimum width (in ticks) in order to be staked. The goal is to limit whales from deploying 1-tick liquidity and collect an outsized portion of all LM rewards.

Here's the link to my fork: https://github.com/guil-lambert/v3-staker-fixed-range.

I'm no solidity dev and I don't want to do a pull request because it fails with I do yarn test (although the issues are not related to the smart contract per se). Just throwing this out there in case someone wants to create a proper fork/pull request.

bigboydiamonds commented 2 years ago

Great post and approach @guil-lambert!

We're currently implementing your approach with adding a minWidth parameter to Incentive Key struct in our fork: https://github.com/overlay-market/v3-staker/tree/jonah

I've updated the existing test suites to pass without issues following your code additions. Also included few more tests checking for the new require statements added in.

Do you suggest any additional implementations along with the minWidth parameter?