API reference v1.0
Introduction
periphery
tokenomics
IAlgebraEternalFarming

IAlgebraEternalFarming

IAlgebraEternalFarming

Algebra Eternal Farming Interface Allows farming nonfungible liquidity tokens in exchange for reward tokens without locking NFT for incentive time

Events

RewardsRatesChanged

RewardsRatesChanged(uint128,uint128,bytes32)

Event emitted when reward rates were changed

NameTypeDescription
rewardRateuint128The new rate of main token distribution per sec
bonusRewardRateuint128The new rate of bonus token distribution per sec
incentiveIdbytes32The ID of the incentive for which rates were changed

RewardsCollected

RewardsCollected(uint256,bytes32,uint256,uint256)

Event emitted when rewards were added

NameTypeDescription
tokenIduint256The ID of the token for which rewards were collected
incentiveIdbytes32The ID of the incentive for which rewards were collected
rewardAmountuint256Collected amount of reward
bonusRewardAmountuint256Collected amount of bonus reward

EternalFarmingCreated

EternalFarmingCreated(contract IERC20Minimal,contract IERC20Minimal,contract IAlgebraPool,address,uint256,uint256,uint256,uint256,struct IAlgebraFarming.Tiers,address)

Event emitted when a liquidity mining incentive has been created

NameTypeDescription
rewardTokencontract IERC20MinimalThe token being distributed as a reward
bonusRewardTokencontract IERC20MinimalThe token being distributed as a bonus reward
poolcontract IAlgebraPoolThe Algebra pool
virtualPooladdressThe virtual pool address
startTimeuint256The time when the incentive program begins
endTimeuint256The time when rewards stop accruing
rewarduint256The amount of reward tokens to be distributed
bonusRewarduint256The amount of bonus reward tokens to be distributed
tiersstruct IAlgebraFarming.TiersThe amounts of locked token for liquidity multipliers
multiplierTokenaddressThe address of token which can be locked to get liquidity multiplier

Functions

farms

farms(uint256,bytes32) view external

Returns information about a farmd liquidity NFT

NameTypeDescription
tokenIduint256The ID of the farmd token
incentiveIdbytes32The ID of the incentive for which the token is farmd

Returns:

NameTypeDescription
liquidityuint128
tickLowerint24
tickUpperint24
innerRewardGrowth0uint256
innerRewardGrowth1uint256

createEternalFarming

createEternalFarming(struct IIncentiveKey.IncentiveKey,uint256,uint256,uint128,uint128,address,struct IAlgebraFarming.Tiers) external

Creates a new liquidity mining incentive program

NameTypeDescription
keystruct IIncentiveKey.IncentiveKeyDetails of the incentive to create
rewarduint256The amount of reward tokens to be distributed
bonusRewarduint256The amount of bonus reward tokens to be distributed
rewardRateuint128The rate of reward distribution per second
bonusRewardRateuint128The rate of bonus reward distribution per second
multiplierTokenaddressThe address of token which can be locked to get liquidity multiplier
tiersstruct IAlgebraFarming.TiersThe amounts of locked token for liquidity multipliers

Returns:

NameTypeDescription
virtualPooladdress

addRewards

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

NameTypeDescription
keystruct IIncentiveKey.IncentiveKey
rewardAmountuint256
bonusRewardAmountuint256

setRates

setRates(struct IIncentiveKey.IncentiveKey,uint128,uint128) external

NameTypeDescription
keystruct IIncentiveKey.IncentiveKey
rewardRateuint128
bonusRewardRateuint128

collectRewards

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

NameTypeDescription
keystruct IIncentiveKey.IncentiveKey
tokenIduint256
_owneraddress

Returns:

NameTypeDescription
rewarduint256
bonusRewarduint256