Skip to main content

Claiming Rewards

Overview

There are two main types of rewards that liquidity providers can claim:

  • Swap fees. Each trade incurs a swap fee depending on the pool type. Fees are then distributed to liquidity providers on a pro rata basis.

  • If you stake your LP tokens into the Generator contract, you can also receive ASTRO emissions and 3rd party incentive rewards.

Collecting Pool Fees

Use for collecting swap fees from a pool.

collect

To collect swap fees, you need to execute a contract message pointing to the collect endpoint in the Maker contract.

collect takes in a vector of objects containing information about each asset in our pair.

The code in this section collects swap fees for the ASTRO-LUNA pool.


_20
{
_20
"collect": {
_20
"assets": [
_20
{
_20
"info": {
_20
"token": {
_20
"contract_addr": astroAddress
_20
}
_20
}
_20
},
_20
{
_20
"info": {
_20
"native_token": {
_20
"denom": "uluna"
_20
}
_20
}
_20
}
_20
]
_20
}
_20
}

collect

To collect swap fees, you need to execute a contract message pointing to the collect endpoint in the Maker contract.

collect takes in a vector of objects containing information about each asset in our pair.

The code in this section collects swap fees for the ASTRO-LUNA pool.


_20
{
_20
"collect": {
_20
"assets": [
_20
{
_20
"info": {
_20
"token": {
_20
"contract_addr": astroAddress
_20
}
_20
}
_20
},
_20
{
_20
"info": {
_20
"native_token": {
_20
"denom": "uluna"
_20
}
_20
}
_20
}
_20
]
_20
}
_20
}

Collecting LP Rewards

Use for collecting LP rewards from the Generator contract.

claim_rewards

If you have staked your LP tokens into the Generator contract, and your pool is eligible for ASTRO or 3rd party emissions, then you can collect rewards from the Generator contract in addition to swap fees.

To claim rewards, you have to execute a contract message to the claim_rewards endpoint in the Generator contract and specify the addresses of the lp_tokens you want to claim rewards for.


_7
{
_7
"claim_rewards": {
_7
"lp_tokens": [
_7
astrolunaLPAddress
_7
]
_7
}
_7
}

claim_rewards

If you have staked your LP tokens into the Generator contract, and your pool is eligible for ASTRO or 3rd party emissions, then you can collect rewards from the Generator contract in addition to swap fees.

To claim rewards, you have to execute a contract message to the claim_rewards endpoint in the Generator contract and specify the addresses of the lp_tokens you want to claim rewards for.


_7
{
_7
"claim_rewards": {
_7
"lp_tokens": [
_7
astrolunaLPAddress
_7
]
_7
}
_7
}