AlgebraLimitFarming

Algebra incentive (time-limited) farming

Variables

uint256 maxIncentiveStartLeadTime immutable

The max amount of seconds into the future the incentive startTime can be set

uint256 maxIncentiveDuration immutable

The max duration of an incentive in seconds

mapping(uint256 => mapping(bytes32 => struct AlgebraLimitFarming.Farm)) farms

Returns information about a farmd liquidity NFT

Developer note: farms[tokenId][incentiveHash] => Farm

Functions

constructor

AlgebraFarming

constructor(contract IAlgebraPoolDeployer,contract INonfungiblePositionManager,uint256,uint256) public

createLimitFarming

onlyIncentiveMaker

createLimitFarming(struct IIncentiveKey.IncentiveKey,struct IAlgebraFarming.Tiers,struct IAlgebraLimitFarming.IncentiveParams) external

Returns:

addRewards

onlyIncentiveMaker

addRewards(struct IIncentiveKey.IncentiveKey,uint256,uint256) external

decreaseRewardsAmount

onlyIncentiveMaker

decreaseRewardsAmount(struct IIncentiveKey.IncentiveKey,uint256,uint256) external

detachIncentive

onlyIncentiveMaker

detachIncentive(struct IIncentiveKey.IncentiveKey) external

Detach incentive from the pool

attachIncentive

onlyIncentiveMaker

attachIncentive(struct IIncentiveKey.IncentiveKey) external

Attach incentive to the pool

enterFarming

onlyFarmingCenter

enterFarming(struct IIncentiveKey.IncentiveKey,uint256,uint256) external

enter farming for Algebra LP token

exitFarming

onlyFarmingCenter

exitFarming(struct IIncentiveKey.IncentiveKey,uint256,address) external

exitFarmings for Algebra LP token

getRewardInfo

getRewardInfo(struct IIncentiveKey.IncentiveKey,uint256) view external

Calculates the reward amount that will be received for the given farm

Returns: