The Fee Distributor is responsible for distributing the protocol fees collected by the Fee Collector to the various stakeholders of the protocol.
InstantiateMsg
{
"bonding_contract_addr": "migaloo1...",
"distribution_asset": {
"native_token": {
"denom": "uwhale"
}
},
"epoch_config": {
"duration": "86400000000000",
"genesis_epoch": "1698851118000000000"
},
"fee_collector_addr": "migaloo1...",
"grace_period": "21"
}
Key | Type | Description |
---|
| | Whale Lair contract address |
| | The asset to be distributed |
| | The configuration for the epoch |
| | Fee collector contract address |
| | The duration of the grace period in epochs, i.e. how many expired epochs can be claimed back in time after new epochs have been created |
ExecuteMsg
NewEpoch
Creates a new epoch, forwarding available tokens from epochs that are past the grace period. Can only be executed by the fee collector.
Claim
Claims tokens from the current epoch and all epochs that are in the grace period. Sends all tokens to the sender.
UpdateConfig
Updates the [Config] of the contract.
{
"update_config": {
"owner": "migaloo1...",
"bonding_contract_addr": "migaloo1...",
"fee_collector_addr": "migaloo1...",
"grace_period": "21",
"distribution_asset": {
"native_token": {
"denom": "uwhale"
}
},
"epoch_config": {
"duration": "86400000000000",
"genesis_epoch": "1698851118000000000"
}
}
}
Key | Type | Description |
---|
| | |
| | |
| | New Fee Collector address |
| | |
| | New AssetInfo to distribute rewards in |
| | New configuration for the epoch |
QueryMsg
Config
Returns the current epoch, which is the last on the EPOCHS map.
{
"config": {
"owner": "migaloo1...",
"bonding_contract_addr": "migaloo1...",
"fee_collector_addr": "migaloo1...",
"grace_period": "21",
"distribution_asset": {
"native_token": {
"denom": "uwhale"
}
},
"epoch_config": {
"duration": "86400000000000",
"genesis_epoch": "1698851118000000000"
}
}
}
Key | Type | Description |
---|
| | |
| | |
| | New Fee Collector address |
| | |
| | New AssetInfo to distribute rewards in |
| | New configuration for the epoch |
CurrentEpoch
Returns the current epoch, which is the last on the EPOCHS map.
{
"current_epoch": {}
}
{
"epoch": {
"id": "1",
"start_time": "1698851118",
"total": [
{
"amount": "1000",
"info": {
"native_token": {
"denom": "uwhale"
}
}
}
],
"available": [
{
"amount": "300",
"info": {
"native_token": {
"denom": "uwhale"
}
}
}
],
"claimed": [
{
"amount": "700",
"info": {
"native_token": {
"denom": "uwhale"
}
}
}
],
"global_index": {
"bonded_amount": "3000",
"bonded_assets": [
{
"info": {
"native_token": {
"denom": "ampWHALE"
}
},
"amount": "1500"
},
{
"info": {
"native_token": {
"denom": "bWHALE"
}
},
"amount": "1500"
}
],
"timestamp": "1698851118",
"weight": "1500000"
}
}
}
Epoch
Returns the epoch with the given id.
{
"epoch": {
"id": "1"
}
}
{
"epoch": {
"id": "1",
"start_time": "1698851118",
"total": [
{
"amount": "1000",
"info": {
"native_token": {
"denom": "uwhale"
}
}
}
],
"available": [
{
"amount": "300",
"info": {
"native_token": {
"denom": "uwhale"
}
}
}
],
"claimed": [
{
"amount": "700",
"info": {
"native_token": {
"denom": "uwhale"
}
}
}
],
"global_index": {
"bonded_amount": "3000",
"bonded_assets": [
{
"info": {
"native_token": {
"denom": "ampWHALE"
}
},
"amount": "1500"
},
{
"info": {
"native_token": {
"denom": "bWHALE"
}
},
"amount": "1500"
}
],
"timestamp": "1698851118",
"weight": "1500000"
}
}
}
ClaimableEpochs
Returns the [Epoch]s that can be claimed.
{
"claimable_epochs": {}
}
{
"epochs": [
{
"id": "2",
"start_time": "1698937518",
"total": [
{
"amount": "1000",
"info": {
"native_token": {
"denom": "uwhale"
}
}
}
],
"available": [
{
"amount": "300",
"info": {
"native_token": {
"denom": "uwhale"
}
}
}
],
"claimed": [
{
"amount": "700",
"info": {
"native_token": {
"denom": "uwhale"
}
}
}
],
"global_index": {
"bonded_amount": "3000",
"bonded_assets": [
{
"info": {
"native_token": {
"denom": "ampWHALE"
}
},
"amount": "1500"
},
{
"info": {
"native_token": {
"denom": "bWHALE"
}
},
"amount": "1500"
}
],
"timestamp": "1698851118",
"weight": "1500000"
}
},
{
"id": "1",
"start_time": "1698851118",
"total": [
{
"amount": "1000",
"info": {
"native_token": {
"denom": "uwhale"
}
}
}
],
"available": [
{
"amount": "300",
"info": {
"native_token": {
"denom": "uwhale"
}
}
}
],
"claimed": [
{
"amount": "700",
"info": {
"native_token": {
"denom": "uwhale"
}
}
}
],
"global_index": {
"bonded_amount": "3000",
"bonded_assets": [
{
"info": {
"native_token": {
"denom": "ampWHALE"
}
},
"amount": "1500"
},
{
"info": {
"native_token": {
"denom": "bWHALE"
}
},
"amount": "1500"
}
],
"timestamp": "1698851118",
"weight": "1500000"
}
}
]
}
Claimable
Returns the Epochs that can be claimed by an address.
{
"claimable": {
"address": "migaloo1..."
}
}
{
"epochs": [
{
"id": "2",
"start_time": "1698937518",
"total": [
{
"amount": "1000",
"info": {
"native_token": {
"denom": "uwhale"
}
}
}
],
"available": [
{
"amount": "300",
"info": {
"native_token": {
"denom": "uwhale"
}
}
}
],
"claimed": [
{
"amount": "700",
"info": {
"native_token": {
"denom": "uwhale"
}
}
}
],
"global_index": {
"bonded_amount": "3000",
"bonded_assets": [
{
"info": {
"native_token": {
"denom": "ampWHALE"
}
},
"amount": "1500"
},
{
"info": {
"native_token": {
"denom": "bWHALE"
}
},
"amount": "1500"
}
],
"timestamp": "1698851118",
"weight": "1500000"
}
},
{
"id": "1",
"start_time": "1698851118",
"total": [
{
"amount": "1000",
"info": {
"native_token": {
"denom": "uwhale"
}
}
}
],
"available": [
{
"amount": "300",
"info": {
"native_token": {
"denom": "uwhale"
}
}
}
],
"claimed": [
{
"amount": "700",
"info": {
"native_token": {
"denom": "uwhale"
}
}
}
],
"global_index": {
"bonded_amount": "3000",
"bonded_assets": [
{
"info": {
"native_token": {
"denom": "ampWHALE"
}
},
"amount": "1500"
},
{
"info": {
"native_token": {
"denom": "bWHALE"
}
},
"amount": "1500"
}
],
"timestamp": "1698851118",
"weight": "1500000"
}
}
]
}
Last updated