Skip to main content

ILiquidityGauge

Functions

deposit

function deposit(
uint256 value
) external

Parameters

NameTypeDescription
valueuint256

withdraw

function withdraw(
uint256 value,
bool claim_rewards
) external

Parameters

NameTypeDescription
valueuint256
claim_rewardsbool

claim_rewards

function claim_rewards() external

balanceOf

function balanceOf(
address
) external returns (uint256)

Parameters

NameTypeDescription
``address

staking_token

function staking_token() external returns (address)

reward_tokens

function reward_tokens(
uint256 i
) external returns (address token)

Parameters

NameTypeDescription
iuint256

reward_count

function reward_count() external returns (uint256 nTokens)

ILiquidityGaugeController

Functions

vote_for_gauge_weights

function vote_for_gauge_weights(
address gauge_addr,
uint256 user_weight
) external

Parameters

NameTypeDescription
gauge_addraddress
user_weightuint256

last_user_vote

function last_user_vote(
address user,
address gauge
) external returns (uint256)

Parameters

NameTypeDescription
useraddress
gaugeaddress

vote_user_power

function vote_user_power(
address user
) external returns (uint256)

Parameters

NameTypeDescription
useraddress

gauge_types

function gauge_types(
address gauge
) external returns (int128)

Parameters

NameTypeDescription
gaugeaddress

LiquidityGaugeManager

Functions

constructor

function constructor(
address _gaugeController
) internal

Parameters

NameTypeDescription
_gaugeControlleraddress

setGaugeController

function setGaugeController(
address _gaugeController
) public

Set the gauge controller used for gauge weight voting

Parameters

NameTypeDescription
_gaugeControlleraddressthe gauge controller address

setTokenToGauge

function setTokenToGauge(
address token,
address gaugeAddress
) public

Set gauge for a given token.

Parameters

NameTypeDescription
tokenaddressthe token address to stake in gauge
gaugeAddressaddressthe address of the gauge where to stake token

voteForGaugeWeight

function voteForGaugeWeight(
address token,
uint256 gaugeWeight
) public

Vote for a gauge's weight

Parameters

NameTypeDescription
tokenaddressthe address of the token to vote for
gaugeWeightuint256the weight of gaugeAddress in basis points [0, 10_000]

stakeInGauge

function stakeInGauge(
address token,
uint256 amount
) public

Stake tokens in a gauge

Parameters

NameTypeDescription
tokenaddressthe address of the token to stake in the gauge
amountuint256the amount of tokens to stake in the gauge

stakeAllInGauge

function stakeAllInGauge(
address token
) public

Stake all tokens held in a gauge

Parameters

NameTypeDescription
tokenaddressthe address of the token to stake in the gauge

unstakeFromGauge

function unstakeFromGauge(
address token,
uint256 amount
) public

Unstake tokens from a gauge

Parameters

NameTypeDescription
tokenaddressthe address of the token to unstake from the gauge
amountuint256the amount of tokens to unstake from the gauge

claimGaugeRewards

function claimGaugeRewards(
address gaugeAddress
) public

Claim rewards associated to a gauge where this contract stakes tokens.

Parameters

NameTypeDescription
gaugeAddressaddress

Events

GaugeControllerChanged

event GaugeControllerChanged(
address oldController,
address newController
)

Parameters

NameTypeDescription
oldControlleraddress
newControlleraddress

GaugeSetForToken

event GaugeSetForToken(
address token,
address gauge
)

Parameters

NameTypeDescription
tokenaddress
gaugeaddress

GaugeVote

event GaugeVote(
address gauge,
uint256 amount
)

Parameters

NameTypeDescription
gaugeaddress
amountuint256

GaugeStake

event GaugeStake(
address gauge,
uint256 amount
)

Parameters

NameTypeDescription
gaugeaddress
amountuint256

GaugeUnstake

event GaugeUnstake(
address gauge,
uint256 amount
)

Parameters

NameTypeDescription
gaugeaddress
amountuint256

GaugeRewardsClaimed

event GaugeRewardsClaimed(
address gauge,
address token,
uint256 amount
)

Parameters

NameTypeDescription
gaugeaddress
tokenaddress
amountuint256