Algebra Farming Interface
Allows farming nonfungible liquidity tokens in exchange for reward tokens
event IncentiveDetached(contract IERC20Minimal rewardToken, contract IERC20Minimal bonusRewardToken, contract IAlgebraPool pool, address virtualPool, uint256 startTime, uint256 endTime)
Event emitted when a liquidity mining incentive has been stopped from the outside
Name | Type | Description |
---|---|---|
event IncentiveAttached(contract IERC20Minimal rewardToken, contract IERC20Minimal bonusRewardToken, contract IAlgebraPool pool, address virtualPool, uint256 startTime, uint256 endTime)
Event emitted when a liquidity mining incentive has been runned again from the outside
Name | Type | Description |
---|---|---|
event FarmEntered(uint256 tokenId, bytes32 incentiveId, uint128 liquidity, uint256 tokensLocked)
Event emitted when a Algebra LP token has been farmd
event FarmEnded(uint256 tokenId, bytes32 incentiveId, address rewardAddress, address bonusRewardToken, address owner, uint256 reward, uint256 bonusReward)
Event emitted when a Algebra LP token has been exitFarmingd
event IncentiveMaker(address incentiveMaker)
Emitted when the incentive maker is changed
event FarmingCenter(address farmingCenter)
Emitted when the farming center is changed
event RewardsAdded(uint256 rewardAmount, uint256 bonusRewardAmount, bytes32 incentiveId)
Event emitted when rewards were added
event RewardClaimed(address to, uint256 reward, address rewardAddress, address owner)
Event emitted when a reward token has been claimed
function nonfungiblePositionManager() external view returns (contract INonfungiblePositionManager)
view external
The nonfungible position manager with which this farming contract is compatible
Returns:
function farmingCenter() external view returns (contract IFarmingCenter)
view external
The farming Center
Returns:
function deployer() external returns (contract IAlgebraPoolDeployer)
external
The pool deployer
Returns:
function setIncentiveMaker(address _incentiveMaker) external
external
Updates the incentive maker
function incentives(bytes32 incentiveId) external view returns (uint256 totalReward, uint256 bonusReward, address virtualPoolAddress, uint24 minimalPositionWidth, uint224 totalLiquidity, address multiplierToken, struct IAlgebraFarming.Tiers tiers)
view external
Represents a farming incentive
Returns:
function detachIncentive(struct IIncentiveKey.IncentiveKey key) external
external
Detach incentive from the pool
function attachIncentive(struct IIncentiveKey.IncentiveKey key) external
external
Attach incentive to the pool
function rewards(address owner, contract IERC20Minimal rewardToken) external view returns (uint256 rewardsOwed)
view external
Returns amounts of reward tokens owed to a given address according to the last time all farms were updated
Returns:
function setFarmingCenterAddress(address _farmingCenter) external
external
Updates farming center address
function enterFarming(struct IIncentiveKey.IncentiveKey key, uint256 tokenId, uint256 tokensLocked) external
external
enter farming for Algebra LP token
function exitFarming(struct IIncentiveKey.IncentiveKey key, uint256 tokenId, address _owner) external
external
exitFarmings for Algebra LP token
function claimReward(contract IERC20Minimal rewardToken, address to, uint256 amountRequested) external returns (uint256 reward)
external
Transfers `amountRequested` of accrued `rewardToken` rewards from the contract to the recipient `to`
Returns:
function claimRewardFrom(contract IERC20Minimal rewardToken, address from, address to, uint256 amountRequested) external returns (uint256 reward)
external
Transfers `amountRequested` of accrued `rewardToken` rewards from the contract to the recipient `to` only for FarmingCenter
Returns:
function getRewardInfo(struct IIncentiveKey.IncentiveKey key, uint256 tokenId) external returns (uint256 reward, uint256 bonusReward)
external
Calculates the reward amount that will be received for the given farm
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 |
---|---|---|
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 |
---|---|---|
Name | Type | Description |
---|---|---|