Fork of the canonical staking contract designed for Uniswap V3.
Adds tick bounds specified by the incentive creator. Enforces a min tick range for liquidity eligible to receive rewards.
- Add minWidth
(int24 minWidth)
toIUniswapV3Staker.IncentiveKey
struct for incentive creator to enforce a min tick range to incentivize - Add require statements below line 329 in
_stakeToken()
to check tick bounds are satisfied by token depositor looking to stake - Add convenience function
createIncentiveWithMaxRange()
that uses max tick range for incentives
Note that the v1.0.0 release is susceptible to a high-difficulty, never-exploited vulnerability. For this reason, please use the v1.0.2 release, deployed and verified on Etherscan on all networks at the address: 0xe34139463bA50bD61336E0c446Bd8C0867c6fE65
:
0x1f98407aaB862CdDeF78Ed252D6f557aA5b0f00d
$ yarn
$ yarn test
# if gas snapshots need to be updated
$ UPDATE_SNAPSHOT=1 yarn test
$ yarn size-contracts