๐Ÿค‘Fee Distributor

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"
}
KeyTypeDescription

bonding_contract_addr

String

Whale Lair contract address

distribution_asset

AssetInfo

The asset to be distributed

epoch_config

EpochConfig

The configuration for the epoch

fee_collector_addr

String

Fee collector contract address

grace_period

Uint64

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.

{
  "new_epoch": {}
}

Claim

Claims tokens from the current epoch and all epochs that are in the grace period. Sends all tokens to the sender.

{
  "claim": {}
}

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"
    }
  }
}
KeyTypeDescription

owner

Option<String>

New owner address

bonding_contract_addr

Option<String>

New Whale Lair address

fee_collector_addr

Option<String>

New Fee Collector address

grace_period

Option<Uint64>

New grace period

distribution_asset

Option<AssetInfo>

New AssetInfo to distribute rewards in

epoch_config

Option<EpochConfig>

New configuration for the epoch

QueryMsg

Config

Returns the current epoch, which is the last on the EPOCHS map.

{
  "config": {}
}

CurrentEpoch

Returns the current epoch, which is the last on the EPOCHS map.

{
  "current_epoch": {}
}

Epoch

Returns the epoch with the given id.

{
  "epoch": {
    "id": "1"
  }
}

ClaimableEpochs

Returns the [Epoch]s that can be claimed.

{
  "claimable_epochs": {}
}

Claimable

Returns the Epochs that can be claimed by an address.

{
  "claimable": {
    "address": "migaloo1..."
  }
}

Last updated