JBGenericBuybackDelegate
Mainnet: 0x6B700b54BBf7A93f453fFBF58Df0fE1ab2AADA08
Goerli: 0x31682096474BFD6704992b7C5f993639E372900e
Inherits: ERC165
, JBOperatable
, IJBGenericBuybackDelegate
Datasource and delegate allowing pay beneficiary to get the highest amount of project tokens between minting using the project weigh and swapping in a given Uniswap V3 pool.
This supports any terminal and token, as well as any number of projects using it.
State Variables
SLIPPAGE_DENOMINATOR
The unit of the max slippage (expressed in 1/10000th)
uint256 public constant SLIPPAGE_DENOMINATOR = 10000;
MIN_TWAP_DELTA
The minimum twap deviation allowed (0.1%, in 1/10000th)
This is to avoid bypassing the swap when a quote is not provided (ie in fees/automated pay)
uint256 public constant MIN_TWAP_DELTA = 100;
MAX_TWAP_DELTA
The minimmaximum twap deviation allowed (9%, in 1/10000th)
This is to avoid bypassing the swap when a quote is not provided (ie in fees/automated pay)
uint256 public constant MAX_TWAP_DELTA = 9000;
MIN_SECONDS_AGO
The smallest TWAP period allowed, in seconds.
This is to avoid having a too short twap, prone to pool manipulation
uint256 public constant MIN_SECONDS_AGO = 2 minutes;
MAX_SECONDS_AGO
The biggest TWAP period allowed, in seconds.
This is to avoid having a too long twap, bypassing the swap
uint256 public constant MAX_SECONDS_AGO = 2 days;
UNISWAP_V3_FACTORY
The uniswap v3 factory
address public immutable UNISWAP_V3_FACTORY;
DIRECTORY
The JB Directory
IJBDirectory public immutable DIRECTORY;
CONTROLLER
The project controller
IJBController3_1 public immutable CONTROLLER;
PROJECTS
The project registry
IJBProjects public immutable PROJECTS;
WETH
The WETH contract
IWETH9 public immutable WETH;
delegateId
The 4bytes ID of this delegate, used for metadata parsing
bytes4 public immutable delegateId;