Algebra eternal (v2-like) farming
Returns information about a farmd liquidity NFT
Developer note: farms[tokenId][incentiveHash] => Farm
AlgebraFarming
constructor(contract IAlgebraPoolDeployer,contract INonfungiblePositionManager)
public
Name | Type | Description |
---|---|---|
onlyIncentiveMaker
createEternalFarming(struct IIncentiveKey.IncentiveKey,uint256,uint256,uint128,uint128,address,struct IAlgebraFarming.Tiers)
external
Creates a new liquidity mining incentive program
Returns:
onlyIncentiveMaker
detachIncentive(struct IIncentiveKey.IncentiveKey)
external
Detach incentive from the pool
onlyIncentiveMaker
attachIncentive(struct IIncentiveKey.IncentiveKey)
external
Attach incentive to the pool
addRewards(struct IIncentiveKey.IncentiveKey,uint256,uint256)
external
onlyIncentiveMaker
setRates(struct IIncentiveKey.IncentiveKey,uint128,uint128)
external
onlyFarmingCenter
enterFarming(struct IIncentiveKey.IncentiveKey,uint256,uint256)
external
enter farming for Algebra LP token
onlyFarmingCenter
exitFarming(struct IIncentiveKey.IncentiveKey,uint256,address)
external
exitFarmings for Algebra LP token
getRewardInfo(struct IIncentiveKey.IncentiveKey,uint256)
view external
reward amounts can be outdated, actual amounts could be obtained via static call of `collectRewards` in FarmingCenter
Returns:
onlyFarmingCenter
collectRewards(struct IIncentiveKey.IncentiveKey,uint256,address)
external
reward amounts should be updated before calling this method
Returns:
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
_deployer
contract IAlgebraPoolDeployer
pool deployer contract address
_nonfungiblePositionManager
contract INonfungiblePositionManager
the NFT position manager contract address
key
struct IIncentiveKey.IncentiveKey
Details of the incentive to create
reward
uint256
The amount of reward tokens to be distributed
bonusReward
uint256
The amount of bonus reward tokens to be distributed
rewardRate
uint128
The rate of reward distribution per second
bonusRewardRate
uint128
The rate of bonus reward distribution per second
multiplierToken
address
The address of token which can be locked to get liquidity multiplier
tiers
struct IAlgebraFarming.Tiers
The amounts of locked token for liquidity multipliers
virtualPool
address
key
struct IIncentiveKey.IncentiveKey
The key of the incentive
key
struct IIncentiveKey.IncentiveKey
The key of the incentive
key
struct IIncentiveKey.IncentiveKey
rewardAmount
uint256
bonusRewardAmount
uint256
key
struct IIncentiveKey.IncentiveKey
rewardRate
uint128
bonusRewardRate
uint128
key
struct IIncentiveKey.IncentiveKey
The key of the incentive for which to enterFarming the NFT
tokenId
uint256
The ID of the token to exitFarming
tokensLocked
uint256
The amount of tokens locked for boost
key
struct IIncentiveKey.IncentiveKey
The key of the incentive for which to exitFarming the NFT
tokenId
uint256
The ID of the token to exitFarming
_owner
address
Owner of the token
key
struct IIncentiveKey.IncentiveKey
The key of the incentive
tokenId
uint256
The ID of the token
reward
uint256
bonusReward
uint256
key
struct IIncentiveKey.IncentiveKey
tokenId
uint256
_owner
address
reward
uint256
bonusReward
uint256