Staking
Last updated
Last updated
The Staking Contract contains the logic for LP Token staking and reward distribution. ANC tokens allocated for as liquidity incentives are distributed pro-rata to stakers of the ANC-UST Terraswap pair LP token.
Receive
Can be called during a CW20 token transfer when the Staking contract is the recipient. Allows the token transfer to execute a Receive Hook as a subsequent action within the same transaction.
Unbond
Unbonds specified amount of ANC-UST Terraswap LP tokens and transfers them to the message sender.
Withdraw
Withdraws user's accrued LP token staking rewards.
MigrateStaking
Migrates ANC LP incentives to a new LP token staking contract.
Bond
WARNING
Sending LP tokens to the Staking contract without issuing this hook will lead to PERMANENT LOSS OF FUNDS.
Bonds LP tokens of the ANC-UST Terraswap pair.
Config
Gets the Staking contract configuration.
ConfigResponse
State
Gets state information for the specified block number.
* = optional
StateResponse
StakerInfo
Gets reward information for the specified LP token staker.
* = optional
StakerInfoResponse
Name
Type
Description
anchor_token
CanonicalAddr
Contract address of Anchor Token (ANC)
staking_token
CanonicalAddr
Contract address of ANC-UST Terraswap pair LP token
distribution_schedule
Vec<(u64, u64, Uint128)>
ANC distribution schedule for LP token stakers (start block [block], end block [block], distribution amount)
Name
Type
Description
anchor_token
String
Contract address of Anchor Token (ANC)
staking_token
String
Contract address of ANC-UST Terraswap pair LP token
distribution_schedule
Vec<(u64, u64, Uint128)>
ANC distribution schedule for LP token stakers (start block [block], end block [block], distribution amount)
Name
Type
Description
sender
String
Sender of the token transfer
amount
Uint128
Amount of tokens received
msg
Binary
Base64-encoded string of JSON of Receive Hook
Name
Type
Description
amount
Uint128
Amount of LP tokens to unbond
Name
Type
Description
Key
Type
Description
new_staking_contract
String
Contract address of new LP staking contract
Name
Type
Description
Name
Type
Description
Name
Type
Description
anchor_token
String
Contract address of Anchor Token (ANC)
staking_token
String
Contract address of ANC-UST Terraswap pair LP token
distribution_schedule
Vec<(u64, u64, Uint128)>
ANC distribution schedule for LP token stakers (start block [block], end block [block], amount)
Name
Type
Description
block_height
*
u64
Current block number [block]
Name
Type
Description
last_distributed
u64
Block number when rewards where last distributed [block]
total_bond_amount
Uint128
Total amount of bonded LP tokens by all stakers
global_reward_index
Decimal
Global reward index for LP staking rewards
Name
Type
Description
staker
String
Address of LP token staker
block_height
*
u64
Current block number [block]
Name
Type
Description
staker
String
Address of LP token staker
reward_index
Decimal
Reward index of staker
bond_amount
Uint128
Amount of LP tokens bonded by staker
pending_rewards
Uint128
Amount of pending rewards of staker