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

constructor(contract IAlgebraPoolDeployer _deployer, contract INonfungiblePositionManager _nonfungiblePositionManager, uint256 _maxIncentiveStartLeadTime, uint256 _maxIncentiveDuration) public public

createLimitFarming

function createLimitFarming(struct IIncentiveKey.IncentiveKey key, struct IAlgebraFarming.Tiers tiers, struct IAlgebraLimitFarming.IncentiveParams params) external returns (address virtualPool) external

Returns:

addRewards

function addRewards(struct IIncentiveKey.IncentiveKey key, uint256 reward, uint256 bonusReward) external external

decreaseRewardsAmount

function decreaseRewardsAmount(struct IIncentiveKey.IncentiveKey key, uint256 rewardAmount, uint256 bonusRewardAmount) external external

deactivateIncentive

function deactivateIncentive(struct IIncentiveKey.IncentiveKey key) external external

Detach incentive from the pool and deactivate it

enterFarming

function enterFarming(struct IIncentiveKey.IncentiveKey key, uint256 tokenId, uint256 tokensLocked) external external

enter farming for Algebra LP token

exitFarming

function exitFarming(struct IIncentiveKey.IncentiveKey key, uint256 tokenId, address _owner) external external

exitFarmings for Algebra LP token

getRewardInfo

function getRewardInfo(struct IIncentiveKey.IncentiveKey key, uint256 tokenId) external view returns (uint256 reward, uint256 bonusReward) view external

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

Returns: