# About

Kryptonite is Sei's premier liquid staking platform. It enables users to enhance their staking strategies by providing them with access to liquidity normally locked within their staked assets.

**Mission**\
\
Kryptonite's mission is to become the main DeFi pillar of Sei Network. The main goal is to be fully integrated into the network so that we, as a whole, can attract more users and build a more robust community.\
\
We plan on doing this in a two-fold plan. First, securing Sei by decentralization through our network of validators. And secondly, helping users earn more yield. This is done through the premise of unlocking liquidity within the Sei ecosystem using a combination of LSDs and stablecoins.


# Protocol Overview

## Features

### No Minimums

There is no minimum participation requirement for users. Users can stake any amount of SEI in the staking pool. In comparison to staking directly with the validating nodes, users do not need to perform any operations to benefit from the compounded growth of their staked assets.

### Decentralized

After all SEI is deposited into the platform, it is directly staked to the validating nodes through smart contracts. The Kryptonite platform does not directly hold user assets. Users can initiate redemption at any time, however, according to Sei chain's Unbonding process, their Sei-based assets can be retrieved after approximately 21 days.

### Rich DeFi ecosystem

Kryptonite is not only a Sei Staking platform but is also a rich DeFi ecosystem. Users who stake on the platform receive LST (liquid staking token) assets, which can be used to mint stablecoins to increase their own liquidity. They can also participate in lending products to provide liquidity to borrowers and earn lending interest. By participating in the Kryptonite ecosystem, users can also continuously receive the platform's governance token, SEILOR.

## Framework Diagram

<figure><img src="/files/nunHIKX9ygbXojArVUDn" alt=""><figcaption></figcaption></figure>


# Platform Overview

<figure><img src="/files/P7mXo82Live9JzDThPm3" alt=""><figcaption></figcaption></figure>

1/ Platform's total TVL.

2/ Your value and positions within Kryptonite.

3/ Total amount of $SEILOR burned.

4/ Supported assets current price and your wallet balance.

<figure><img src="/files/YMiHBshAtx8VUUauk90a" alt=""><figcaption></figcaption></figure>

5/ Vaults where you can stake your assets such as SEI and SEILOR.

6/ After staking your $SEI, you can claim rewards here.

<figure><img src="/files/fPzXr42Gdvnw21yjCph0" alt=""><figcaption></figcaption></figure>

7/ Specify how much $SEI (or associated assets) you'd like to stake. Click "Stake" to stake and receive $stSEI.

Alternatively, Burn is the opposite mechanism. This unstakes your $stSEI back to $SEI. Here you'll also specify how much $stSEI you want to unstake and click "Burn stSEI".

<figure><img src="/files/GEd7n3GHnA1WewoZ3nkS" alt=""><figcaption></figcaption></figure>

8/ BOOST - this is where you can choose your boost rewards and your vesting periods. Longer vest periods = more rewards 👍

9/ LPs - this section shows you which LP's are active and which one you're able to participate in. These change often, so please check back frequently.

<figure><img src="/files/Qf7oCMseNBa6XfL72lIH" alt=""><figcaption></figcaption></figure>

10/ Vest - this allows users to manage their escrowed $SEILOR and enables you to go from veSEILOR back to SEILOR.<br>

<figure><img src="/files/DtWWo9QboxBcoO0BjAC3" alt=""><figcaption></figcaption></figure>

11/ You can use this bridge to move your SEILOR from chain to chain while maintaining ownership of your assets.

That's it. Hopefully this helps you easily navigate the Kryptonite application 💪


# Staking SEI

This page will walk you through how to stake your SEI and start earning yield.

\
\
1\. Navigate to the [kASSET](https://app.kryptonite.finance/kasset) tab. Click **Stake & Burn**.

<figure><img src="/files/wAPiGEisZ9WLjmbQGw2t" alt=""><figcaption><p>1</p></figcaption></figure>

2. Specify how much SEI you want to bond. Click **Mint** to mint stSEI. Currenty APR can also be found in the green text. For this screenshot it's showing as 4.46%.<br>

   <figure><img src="/files/YDtB5SADjSqO9vqsuUol" alt=""><figcaption><p>2</p></figcaption></figure>
3. Current APY can be found on the Mint & Burn mechanism in Yellow text.

Now your SEI is staked and earning auto-compounding rewards as stSEI.


# Burning stSEI\*

This page will walk you through how to burn your stSEI.\
\
1\. Navigate to the [kASSET](https://app.kryptonite.finance/kasset) tab. Click **Stake & Burn**.

<figure><img src="/files/wAPiGEisZ9WLjmbQGw2t" alt=""><figcaption><p>1</p></figcaption></figure>

2. Specify how much SEI you want to burn. Click **Burn stSEI** to burn stSEI.

<figure><img src="/files/6rFk9hutrLcDTKLGDow0" alt=""><figcaption></figcaption></figure>

**\*NOTE** - there is a 21 day unbonding period. At that time your balance will not be reflected until it is complete.


# Getting into an LP

You've staked SEI. But now you want more. Why not explore adding liquidity into an LP?\
\
Here's how you can do it. \
\
There's two ways to add your liquidity into an LP. Single-sided or Double-sided.\
\
Single - Adding either SEI or SEILOR into the pool.\
Double - Adding both SEI and SEILOR into the pool. You must hold both tokens to be able to do this.\
\
1\. Go to Astroport. Go to [Pools](https://app.astroport.fi/pools).<br>

<figure><img src="/files/zFW2MrbTwwGu5qp9KkO5" alt=""><figcaption><p>1</p></figcaption></figure>

2. Search for the correct pool. Be careful there's a lot of fake and scam pools that are out there. Be sure to choose the correct one. And click **Add Liquidity**.

<figure><img src="/files/A0D0tlJ0yEXHARlEvAyk" alt=""><figcaption></figcaption></figure>

3. Choose Double-Sided or One-Sided. Specify the amount of SEILOR-SEI you want to add to the pool and click **Add Liquidity**.<br>

   <figure><img src="/files/BQrSGEacOYS7PjSnr4J1" alt=""><figcaption><p>3</p></figcaption></figure>

Now that you've added liquidity to an LP. You can now earn additional rewards by staking it on Kryptonite.

4. Navigate to the [SEILOR](https://app.kryptonite.finance/seilor) tab. Here you'll see a few pools that are currently active. For this example, we'll still be looking at SEILOR-SEI.
5. Choose your Boost - **0%, 20%, 30%, 50%, or 100%**. Click **Stake**.

<figure><img src="/files/PmsjSQQ0kD5W6xxaom5H" alt=""><figcaption></figcaption></figure>

6. Specify how much of the LP token you'd like to stake and click **Stake**.

Now you're staked in a Liquidity Pool. Congrats!


# NFT Game Event Rules

*Kryptonite* is launching the first ever NFT x DeFi x GameFi event on SEI to grow and empower the community.

Prize Pool: **444,400 SEI (Community) + 15,000 SEI (Kryptonite)**

**NFT Sale:**

Total NFT quantity: **4444**

100 SEI per NFT mint

Minting is divided into 2 phases:

Phase 1: Whitelist\
Phase 2: Public\
\
Whitelist will last 2 hours (guaranteed mint).\
Max mint: 1 NFT

After 2 hours, its FCFS (first come, first serve).

All SEI spent on minting goes directly into the prize pool.

And NFTs can be freely traded with an 8% royalty fee charged on each transaction. Royalty fees will also go into the prize pool.

**Medal Acquisition:**

Participate in campaign dedicated tasks to earn medals. e.g. - RT a Twitter post to earn a medal

**Dragon Card Draw:**

**10 $SEILOR** gets you a blind box.\
That SEILOR immediately gets burned.\
\
Each blind box contains 1 of 6 parts of a dragon card. Collecting all 6 creates the full Dragon Card.\
\
Each card can be traded with an 8% royalty fee. This fee also goes into the prize pool.

The event will run for 1 month. And upon completion...

50% - distributed to users that...

Hold Seimen NFTs + Hold Kryptonite Medals + Hold Completed Dragon Cards

And 20% of the initial distribution to the platform treasury

50% - Gets rolled over to the next event iteration


# Staking

## Bond

Users deposit SEI into the smart contract through contract transactions. The smart contract delegates the received SEI to the validating nodes in the whitelist. Based on the current exchange rate between SEI and stSEI, the smart contract provides users with the corresponding amount of stSEI.

## Unbond

Users can transfer stSEI back to the smart contract. The contract will automatically burn the stSEI and exchange it for the corresponding amount of SEI based on the current exchange rate.\
\
Due to the characteristics of the Sei chain, it takes 21 days to withdraw the entire unbonded amount from the chain. A single staking entity can initiate no more than 7 unbond operations within a single validating node.\
\
Currently, the contract automatically caches user unbond operations and initiates the unbonding process with the validating nodes after a 3-day interval. Therefore, the actual redemption time for a single unbond operation ranges from 21 to 24 days. (In the future, the platform will provide a fast channel where burning SEILOR can expedite the withdrawal of SEI).

## Validating Nodes

Kryptonite has partnered with three premium node service providers.

#### ![](/files/yNezynRXigxYciIPdkwO) Enigma

Validator Address: [seivaloper1zv9z2wqt348dhxqn38xv8dvsu78cle4xs2cdf4](https://www.mintscan.io/sei/validators/seivaloper1zv9z2wqt348dhxqn38xv8dvsu78cle4xs2cdf4)

Account Address: [sei1zv9z2wqt348dhxqn38xv8dvsu78cle4xw9frg9](https://www.mintscan.io/sei/address/sei1zv9z2wqt348dhxqn38xv8dvsu78cle4xw9frg9)

Website: <https://enigma-validator.com/>

#### ![](/files/OR7J0UFMQDvPpeAg05XS) Rhino

Validator Address: [seivaloper146m089lq8mkqw6w0mmlhxz6247g2taha89at74](https://www.mintscan.io/sei/validators/seivaloper146m089lq8mkqw6w0mmlhxz6247g2taha89at74)

Account Address: [sei146m089lq8mkqw6w0mmlhxz6247g2tahae2v9l9](https://www.mintscan.io/sei/address/sei146m089lq8mkqw6w0mmlhxz6247g2tahae2v9l9)

Website: <https://rhinostake.com>

#### ![](/files/wiVaFwRCBA5GEj4WVJH4) Kingnodes

Validator Address: [seivaloper1wwfpmcvehq6yqdxfccs5rdr745q3kmy06l9d0d](https://www.mintscan.io/sei/validators/seivaloper1wwfpmcvehq6yqdxfccs5rdr745q3kmy06l9d0d)

Account Address: [sei1wwfpmcvehq6yqdxfccs5rdr745q3kmy0ys5rwa](https://www.mintscan.io/sei/address/sei1wwfpmcvehq6yqdxfccs5rdr745q3kmy0ys5rwa)

Website: <https://kingnodes.com>


# Farming

## Farming

The platform has reserved a total of 350,000,000 (35%) SEILOR tokens for mining users. \
\
Before the establishment of Governance, the initial team will decide in batches to set rewards for users participating in platform activities. Once the Governance mechanism matures, the transition will be made to community governance to determine the timing, weight, and distribution of rewards.

For Phase 1 of Farming, a total of 10,500,000 veSEILOR tokens will be allocated for a period of 30 days. Among them, 10,000,000 veSEILOR tokens will be rewarded to users providing liquidity in the SEI/SEILOR Pool, and 500,000 veSEILOR tokens will be rewarded to users providing liquidity in the STSEI/SEIYAN Pool.

The users in the stSEI/SEIYAN Pool will receive their rewards through an airdrop. After the SEIYAN mining rewards end, 500,000 veSEILOR tokens will be directly distributed to LP users through an airdrop.

## BOOST

#### Boost Effect

Boost is an additional reward provided to users who wish to grow with the platform in the long term. By default, the veSEILOR obtained in Farming is in an unlocked state, and its APY is the initial APY. When a user sets their Boost level to Restart, the APY yield will be effective after the transaction, and the subsequent reward APY will be the sum of (Boost + Base) APY. And at this time, veSEILOR cannot be claimed, including unclaimed rewards, and future rewards.\
\
Only when the corresponding lock-up period is reached, all rewarded veSEILOR can be claimed. Boost rewards come from the allocation of additional mining rewards and also from the allocated 35% total rewards.

#### Boost Restart

By default, the initial state is non-Boost, and the veSEILOR obtained from mining can be claimed at any time. Once a user chooses to activate Boost, the veSEILOR earned from mining will only be claimable after the corresponding lock-up period. After Boost is activated, users can Restart Boost to a higher level at any time. The lock-up period will still be based on the initial Boost activation time, with the end time being the user's latest selected lock-up period. After a lock-up period ends, users can claim their veSEILOR at any time, and they will automatically transition to a non-Boost state.

## Vest

The user receives the initial reward as veSEILOR, which is escrowed SEILOR and has a 1:1 exchange with SEILOR. veSEILOR holds voting governance rights and captures protocol value and other benefits. The veSEILOR vesting period is currently set to 30 days for SEILOR (this parameter can be modified through governance in the future).


# Convert

The Kryptonite Token, SEILOR, was initially issued on the BNB Smart Chain.\
\
BSC SEILOR can be traded on centralized and decentralized exchanges and transferred between users. However, it cannot participate in the core operations of Kryptonite. And as a result, Kryptonite introduced the Convert feature. Users can initiate a Burn contract transaction on the BNB Smart Chain, and the Dapp will automatically fill in the user's Sei wallet address and submit it to the BSC network. Once the Burn transaction is confirmed, the corresponding address on the Sei chain will receive an equivalent amount of SEILOR on the Sei chain.


# Governance

Coming soon


# Bridge

Coming soon


# veSEILOR vs SEILOR

### What is SEILOR?&#x20;

SEILOR is the governance token of the Kryptonite Protocol. The total supply of SEILOR is 1,000,000,000.

The benefits of holding SEILOR include, but are not limited to, the following:

* Governance participation: SEILOR holders can participate in platform governance, including voting rights and the ability to propose changes.
* Value capture: SEILOR holders can share in the value generated by the Kryptonite Protocol, such as fee distributions and other protocol revenues.
* Platform privileges: SEILOR holders are entitled to various privileges provided by the platform, such as access to exclusive events, airdrops, and other incentive programs.
* Voting rights: SEILOR holders can vote on governance proposals, influencing decisions on parameter adjustments, new feature additions, and protocol upgrades.
* Community engagement: SEILOR holders can engage with the community, participate in discussions, provide feedback, and contribute to the growth of the Kryptonite ecosystem.

### veSEILOR

veSEILOR is escrowed SEILOR, and SEILOR holders can convert their SEILOR to veSEILOR at any time. Holding 100,000 veSEILOR allows the address to initiate proposals, and each veSEILOR represents one voting right. veSEILOR is eligible for protocol value capture airdrops, and the vesting period for veSEILOR to convert back to SEILOR is 30 days.


# SEILOR Tokenomics

A total supply of 1,000,000,000 SEILOR tokens has been allocated as follows:<br>

<table><thead><tr><th width="213">Allocated</th><th width="92">Percent</th><th width="155">Total supply</th><th>Unlocking rules</th></tr></thead><tbody><tr><td>Community Offering</td><td>17.5%</td><td>175,000,000</td><td>TGE 20% unlocked, 3 month cliff, unlocked 4% every month</td></tr><tr><td>Liquidity, MM, Incentives</td><td>23%</td><td>230,000,000</td><td>TGE 30% unlocked, 2 month cliff, unlocked 5% every month</td></tr><tr><td>Mining Rewards</td><td>35%</td><td>350,000,000</td><td>Distributed in batches according to Staking activities</td></tr><tr><td>Team</td><td>20%</td><td>200,000,000</td><td>TGE 0% unlocked, 12 month cliff, unlocked 10% every month</td></tr><tr><td>Partners &#x26; Advisors</td><td>4.5%</td><td>45,000,000</td><td>TGE 0% unlocked, 12 month cliff, unlocked 10% every month</td></tr></tbody></table>

TGE TIME: 08/14/2023 10AM(UTC)


# Staking

<br>


# Hub

The Hub contract acts as the central hub for all minted stSei. Native Sei tokens received from users are delegated from here, and undelegations from stSei unbond requests are also handled from this contract. Rewards generated from delegations are withdrawn to the Reward contract, later restaking to validators, and update exchange rate.

## Config

<table><thead><tr><th width="274">Key</th><th width="169">Type</th><th>Description</th></tr></thead><tbody><tr><td>creator</td><td>CanonicalAddr</td><td>Address of contract creator</td></tr><tr><td>update_reward_index_addr</td><td>CanonicalAddr</td><td>The address allowed to call <a href="#updateglobalindex">UpdateGlobalIndex</a></td></tr><tr><td>reward_dispatcher_contract</td><td>Option&#x3C;CanonicalAddr></td><td>Contract address of <a href="/pages/bwqK9e6KOfutHx5u0qK4"> Rewards Dispatcher</a></td></tr><tr><td>validators_registry_contract</td><td>Option&#x3C;CanonicalAddr></td><td>Contract address of  <a href="/pages/H9GEC0vUwikX9a1gs9rj">Validators Registry</a></td></tr><tr><td>bsei_token_contract</td><td>Option&#x3C;CanonicalAddr></td><td>Contract address of bSei's Cw20 token contract</td></tr><tr><td>stsei_token_contract</td><td>Option&#x3C;CanonicalAddr></td><td>Contract address of stSei's Cw20 token contract</td></tr><tr><td>rewards_contract</td><td>Option&#x3C;CanonicalAddr></td><td>Contract address of <a href="/pages/SWIB97e1ElrG6yxSYuE9">Reward</a></td></tr></tbody></table>

##

## Parameters

<table><thead><tr><th width="257">Key</th><th width="145">Type</th><th>Description</th></tr></thead><tbody><tr><td>epoch_period</td><td>u64</td><td>Minimum time delay between undelegation batches <strong>[seconds]</strong></td></tr><tr><td>underlying_coin_denom</td><td>String</td><td>Underlying asset denomination of stAsset (Sei)</td></tr><tr><td>unbonding_period</td><td>u64</td><td>Time required for the Hub contract to consider an undelegation batch to be fully undelegated (past the unbonding period) <strong>[seconds]</strong></td></tr><tr><td>peg_recovery_fee</td><td>Decimal</td><td>Fee applied to stSei generation and redemption</td></tr><tr><td>er_threshold</td><td>Decimal</td><td>Minimum stSei exchange rate before peg recovery fee is applied</td></tr><tr><td>reward_denom</td><td>String</td><td>Native token denomination for distributed bSei rewards (kUSD)</td></tr><tr><td>paused</td><td>Option&#x3C;bool></td><td>The pause system operation switch to facilitate smooth contract upgrades and data migration</td></tr></tbody></table>

## InitMsg

Instantiates the stSei Hub contract. Adds a specified validator to whitelist and bonds the creator's initial Sei deposit. The creator's initial Sei deposit ensures the stSei supply always be a high enough value to prevent rounding errors in the stSei exchange rate calculation.

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct InstantiateMsg {
    pub epoch_period: u64,
    pub underlying_coin_denom: String,
    pub unbonding_period: u64,
    pub peg_recovery_fee: Decimal,
    pub er_threshold: Decimal,
    pub reward_denom: String,
    pub update_reward_index_addr: String,
}

```

<table><thead><tr><th width="281">Key</th><th width="125">Type</th><th>Description</th></tr></thead><tbody><tr><td>epoch_period</td><td>u64</td><td>Minimum time delay between undelegation batches <strong>[seconds]</strong></td></tr><tr><td>underlying_coin_denom</td><td>String</td><td>Underlying asset denomination of stAsset (Sei)</td></tr><tr><td>unbonding_period</td><td>u64</td><td>Time required for the Hub contract to consider an undelegation batch to be fully undelegated (past the unbonding period) <strong>[seconds]</strong></td></tr><tr><td>peg_recovery_fee</td><td>Decimal</td><td>Fee applied to stSei generation and redemption</td></tr><tr><td>er_threshold</td><td>Decimal</td><td>Minimum stSei exchange rate before peg recovery fee is applied</td></tr><tr><td>reward_denom</td><td>String</td><td>Native token denomination for distributed bSei rewards (kUSD)</td></tr><tr><td>update_reward_index_addr</td><td>String</td><td>The address allowed to call UpdateGlobalIndex</td></tr></tbody></table>

## ExecuteMsg

### Receive

Can be called during a Cw20 token transfer when the Hub contract is the recipient. Allows the token transfer to execute a [Receive Hook ](#receive-hooks)as a subsequent action within the same transaction.

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum ExecuteMsg {
    Receive {
        sender: String,
        amount: Uint128,
        msg: Binary,
    },
}
```

<table><thead><tr><th>Key</th><th width="145">Type</th><th>Description</th></tr></thead><tbody><tr><td>sender</td><td>String</td><td>Sender of token transfer</td></tr><tr><td>amount</td><td>Uint128</td><td>Amount of tokens received</td></tr><tr><td>msg</td><td>Binary</td><td>Base64-encoded string of JSON of <a href="#receive-hooks">Receive Hook</a></td></tr></tbody></table>

### BondForStSei

Bonds sei by delegating the sei amount equally between validators from the registry and mints stSei tokens to the message sender. Requires native Sei tokens to be sent to `Hub`.

The platform tries to distribute the stake evenly across all validators. Given a single delegation, the exact number of validators that will receive delegations and the amount that they will receive depends on the current distribution of stake. We take a sorted (ASC) list of validators, calculate the desired amount that each validator should have `target_stake = (total delegated + delegation_amount) / num_validators` and begin adding stake up to the desired amount, starting from the validator with the least stake. The exact amount of a single delegation is calculated as `target_stake - validator_stake`, and you'll have as many delegations as it takes to "drain" the delegation\_amount.

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum ExecuteMsg {
    BondForStSei {},
}
```

| Key | Type | Description |
| --- | ---- | ----------- |
|     |      |             |
|     |      |             |
|     |      |             |

### UpdateGlobalIndex

Distributes Sei delegation rewards to stSei holders. Withdraws all accrued delegation rewards to the `Reward Dispatcher` contract and requests the `Reward` contract to update the global reward index value. Can be issued by the specific address .

<pre class="language-rust"><code class="lang-rust"><strong>#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
</strong>#[serde(rename_all = "snake_case")]
pub enum ExecuteMsg {
    UpdateGlobalIndex {
       airdrop_hooks: Option&#x3C;Vec&#x3C;Binary>>,
    },
}
</code></pre>

<table><thead><tr><th width="192">Key</th><th width="200">Type</th><th>Description</th></tr></thead><tbody><tr><td>airdrop_hooks</td><td>Vec&#x3C;Binary></td><td>Not currently enabled</td></tr><tr><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### WithdrawUnbonded

Withdraws unbonded Sei. Requires an unbonding entry to have been made before the unbonding period.

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum ExecuteMsg {
    WithdrawUnbonded {},
}
```

| Key | Type | Description |
| --- | ---- | ----------- |
|     |      |             |
|     |      |             |
|     |      |             |

### CheckSlashing

Checks whether a slashing event occurred and updates state accordingly.

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum ExecuteMsg {
    CheckSlashing {},
}
```

| Key | Type | Description |
| --- | ---- | ----------- |
|     |      |             |
|     |      |             |
|     |      |             |

### UpdateParams

Updates parameter values of the Hub contract. Can only be issued by the creator.

```rust

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum ExecuteMsg {
    UpdateParams {
        epoch_period: Option<u64>,
        unbonding_period: Option<u64>,
        peg_recovery_fee: Option<Decimal>,
        er_threshold: Option<Decimal>,
        paused: Option<bool>,
        reward_denom: Option<String>,
    },
}
```

<table><thead><tr><th width="232">Key</th><th width="152">Type</th><th>Description</th></tr></thead><tbody><tr><td>epoch_period</td><td>u64</td><td>Minimum time delay between undelegation batches <strong>[seconds]</strong></td></tr><tr><td>unbonding_period</td><td>u64</td><td>Time required for the Hub contract to consider an undelegation batch to be fully undelegated (past the unbonding period) <strong>[seconds]</strong></td></tr><tr><td>peg_recovery_fee</td><td>Decimal</td><td>Fee applied to stSei generation and redemption</td></tr><tr><td>et_threshold</td><td>Decimal</td><td>Minimum stSei exchange rate before peg recovery fee is applied</td></tr><tr><td>paused</td><td>bool</td><td>The pause system operation switch to facilitate smooth contract upgrades and data migration</td></tr><tr><td>reward_denom</td><td>String</td><td>Native token denomination for distributed bSei rewards (kUSD)</td></tr></tbody></table>

### UpdateConfig

Updates the `Hub` contract configuration. Can only be issued by the creator.

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum ExecuteMsg {
  UpdateConfig {
        rewards_dispatcher_contract: Option<String>,
        validators_registry_contract: Option<String>,
        bsei_token_contract: Option<String>,
        stsei_token_contract: Option<String>,
        airdrop_registry_contract: Option<String>,
        rewards_contract: Option<String>,
        update_reward_index_addr: Option<String>,
    },
}
```

<table><thead><tr><th width="297">Key</th><th width="106">Type</th><th>Description</th></tr></thead><tbody><tr><td>rewards_dispatcher_contract</td><td>String</td><td>Contract address of <a href="/pages/bwqK9e6KOfutHx5u0qK4"> Rewards Dispatcher</a></td></tr><tr><td>validators_registry_contract</td><td>String</td><td>Contract address of  <a href="/pages/H9GEC0vUwikX9a1gs9rj">Validators Registry</a></td></tr><tr><td>bsei_token_contract</td><td>String</td><td>Contract address of bSei's Cw20 token contract</td></tr><tr><td>stsei_token_contract</td><td>String</td><td>Contract address of stSei's Cw20 token contract</td></tr><tr><td>airdrop_registry_contract</td><td>String</td><td>Not currently enabled</td></tr><tr><td>rewards_contract</td><td>String</td><td>Contract address of <a href="/pages/SWIB97e1ElrG6yxSYuE9">Reward</a></td></tr><tr><td>update_reward_index_addr</td><td>String</td><td>The address allowed to call <a href="#updateglobalindex">UpdateGlobalIndex</a></td></tr></tbody></table>

### \[Internal] RedelegateProxy

A proxy handler to execute redelegations from Hub address.

Can only be executed by[ Validators Registry ](broken://pages/H9GEC0vUwikX9a1gs9rj)or by the owner of the Hub.

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum ExecuteMsg {
 RedelegateProxy {
        // delegator is automatically set to address of the calling contract
        src_validator: String,
        redelegations: Vec<(String, Coin)>, //(dst_validator, amount)
    },

}
```

<table><thead><tr><th width="148">Key</th><th width="176">Type</th><th>Description</th></tr></thead><tbody><tr><td>src_validator</td><td>String</td><td>Address of source vaildator in redelegation pair</td></tr><tr><td>redelegations</td><td>Vec&#x3C;(String, Coin)></td><td>List of(destination validator, redelegation amount)</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### \[Internal] BondRewards

Bonds sei by delegating the sei amount equally between validators from the registry.

No stSei tokens have been minted.

Can only be executed by [Rewards Dispatcher](broken://pages/bwqK9e6KOfutHx5u0qK4).

Requires native Sei tokens to be sent to `Hub`.

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum ExecuteMsg {
    BondRewards {},
}
```

| Key | Type | Description |
| --- | ---- | ----------- |
|     |      |             |
|     |      |             |
|     |      |             |

## Receive Hooks

### Unbond

Burns received stSei and equally unbonds a corresponding amount of Sei from a validator from the registry.

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum Cw20HookMsg {
    Unbond {},
}
```

| Key | Type | Description |
| --- | ---- | ----------- |
|     |      |             |
|     |      |             |
|     |      |             |

## QueryMsg

### Config

Gets the `Hub` contract's configuration.

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum QueryMsg {
    Config {},
}
```

| Key | Type | Description |
| --- | ---- | ----------- |
|     |      |             |
|     |      |             |
|     |      |             |

### ConfigResponse

```rust

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct ConfigResponse {
    pub owner: String,
    pub update_reward_index_addr: String,
    pub reward_dispatcher_contract: Option<String>,
    pub validators_registry_contract: Option<String>,
    pub bsei_token_contract: Option<String>,
    pub stsei_token_contract: Option<String>,
    pub airdrop_registry_contract: Option<String>,

    // #[deprecated]
    pub token_contract: Option<String>,
}
```

<table><thead><tr><th width="259">Key</th><th width="143">Type</th><th>Description</th></tr></thead><tbody><tr><td>owner</td><td>String</td><td>Address of the owner</td></tr><tr><td>update_reward_index_addr</td><td>String</td><td>The address allowed to call <a href="#updateglobalindex">UpdateGlobalIndex</a></td></tr><tr><td>reward_dispatcher_contract</td><td>String</td><td>Contract address of <a href="/pages/bwqK9e6KOfutHx5u0qK4"> Rewards Dispatcher</a></td></tr><tr><td>validators_registry_contract</td><td>String</td><td>Contract address of  <a href="/pages/H9GEC0vUwikX9a1gs9rj">Validators Registry</a></td></tr><tr><td>bsei_token_contract</td><td>String</td><td>Contract address of bSei's Cw20 token contract</td></tr><tr><td>stsei_token_contract</td><td>String</td><td>Contract address of stSei's Cw20 token contract</td></tr><tr><td>airdrop_registry_contract</td><td>String</td><td>Not currently enabled</td></tr><tr><td>token_contract</td><td>String</td><td>Not currently enabled</td></tr></tbody></table>

### State

```rust

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum QueryMsg {
    State {},
}
```

### StateResponse

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct StateResponse {
    pub bsei_exchange_rate: Decimal,
    pub stsei_exchange_rate: Decimal,
    pub total_bond_bsei_amount: Uint128,
    pub total_bond_stsei_amount: Uint128,
    pub last_index_modification: u64,
    pub prev_hub_balance: Uint128,
    pub last_unbonded_time: u64,
    pub last_processed_batch: u64,

    // #[deprecated]
    pub total_bond_amount: Uint128,
    // #[deprecated]
    pub exchange_rate: Decimal,
}

```

<table><thead><tr><th width="264">Key</th><th width="112">Type</th><th>Description</th></tr></thead><tbody><tr><td>bsei_exchange_rate</td><td>Decimal</td><td>Current bSei &#x3C;> Sei exchange rate</td></tr><tr><td>stset_exchange_rate</td><td>Decimal</td><td>Current stSei &#x3C;> Sei exchange rate</td></tr><tr><td>total_bond_bsei_amount</td><td>Uint128</td><td>Total amount of Sei currently bonded by Hub via bSei logic</td></tr><tr><td>total_bond_stsei_amount</td><td>Uint128</td><td>Total amount of Sei currently bonded by Hub via stSei logic</td></tr><tr><td>last_index_modification</td><td>u64</td><td>Unix block timestamp when the global reward index was last updated</td></tr><tr><td>prev_hub_balance</td><td>Uint128</td><td>Hub's sei balance when WithdrawUnbonded was lasted executed. Used to calcutate the actual amount of unbonded Sei</td></tr><tr><td>last_unbonded_time</td><td>u64</td><td>Unix block timestamp when a batch was last undelegated</td></tr><tr><td>last_processed_batch</td><td>u64</td><td>Batch ID of the most recently released batch</td></tr></tbody></table>

### CurrentBatch

Gets information about the current undelegation batch.

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum QueryMsg {
    CurrentBatch {},
}
```

| Key | Type | Description |
| --- | ---- | ----------- |
|     |      |             |
|     |      |             |
|     |      |             |

### CurrentBatchResponse

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct CurrentBatchResponse {
    pub id: u64,
    pub requested_bsei_with_fee: Uint128,
    pub requested_stsei: Uint128,

    // #[deprecated]
    pub requested_with_fee: Uint128,
}
```

<table><thead><tr><th width="240">Key</th><th width="107">Type</th><th>Description</th></tr></thead><tbody><tr><td>id</td><td>u64</td><td>Batch ID of the current undelegation batch</td></tr><tr><td>requested_bsei_with_fee</td><td>Uint128</td><td>Amount of (fee-applied)bSei requested for undelegation in this batch</td></tr><tr><td>requested_stsei</td><td>Uint128</td><td>Amount of  stSei requested for undelegation in this batch</td></tr></tbody></table>

### WithdrawableUnbonded

Gets the amount of undelegated Sei that will be available for withdrawal (unbonding requests past the unbonding period) for the specified user.

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum QueryMsg {
    WithdrawableUnbonded {
        address: String,
    },
}
```

<table><thead><tr><th width="138">Key</th><th width="148">Type</th><th>Description</th></tr></thead><tbody><tr><td>address</td><td>String</td><td>Address of user that previously unbonded Sei via redeeming bSei</td></tr></tbody></table>

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct WithdrawableUnbondedResponse {
    pub withdrawable: Uint128,
}
```

<table><thead><tr><th width="177">Key</th><th width="192">Type</th><th>Description</th></tr></thead><tbody><tr><td>withdrawable</td><td>Uint128</td><td>Amount of undelegated Sei availabe for withdrawal</td></tr><tr><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

###

### Parameters

Gets parameter information.

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum QueryMsg {
    Parameters {},
}
```

| Key | Type | Description |
| --- | ---- | ----------- |
|     |      |             |
|     |      |             |
|     |      |             |

### ParametersResponse

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct Parameters {
    pub epoch_period: u64,
    pub underlying_coin_denom: String,
    pub unbonding_period: u64,
    pub peg_recovery_fee: Decimal,
    pub er_threshold: Decimal,
    pub reward_denom: String,
    pub paused: Option<bool>,
}

```

<table><thead><tr><th width="257">Key</th><th width="145">Type</th><th>Description</th></tr></thead><tbody><tr><td>epoch_period</td><td>u64</td><td>Minimum time delay between undelegation batches <strong>[seconds]</strong></td></tr><tr><td>underlying_coin_denom</td><td>String</td><td>Underlying asset denomination of stAsset (Sei)</td></tr><tr><td>unbonding_period</td><td>u64</td><td>Time required for the Hub contract to consider an undelegation batch to be fully undelegated (past the unbonding period) <strong>[seconds]</strong></td></tr><tr><td>peg_recovery_fee</td><td>Decimal</td><td>Fee applied to stSei generation and redemption</td></tr><tr><td>er_threshold</td><td>Decimal</td><td>Minimum stSei exchange rate before peg recovery fee is applied</td></tr><tr><td>reward_denom</td><td>String</td><td>Native token denomination for distributed bSei rewards (kUSD)</td></tr><tr><td>paused</td><td>Option&#x3C;bool></td><td>The pause system operation switch to facilitate smooth contract upgrades and data migration</td></tr></tbody></table>

### UnbondRequests

Gets the list of Sei unbonding amounts being unbonded for the specified user.

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum QueryMsg {
    UnbondRequests {
        address: String,
    },
}
```

<table><thead><tr><th width="173">Key</th><th width="158">Type</th><th>Description</th></tr></thead><tbody><tr><td>address</td><td>String</td><td>Address of user that previously unbonded Sei by redeeming stSei</td></tr><tr><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### UnbondRequestsResponse

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct UnbondRequestsResponse {
    pub address: String,
    pub requests: UnbondRequest,
}


pub type UnbondRequest = Vec<(u64, Uint128, Uint128)>;

```

<table><thead><tr><th width="132">Key</th><th width="176">Type</th><th>Description</th></tr></thead><tbody><tr><td>address</td><td>String</td><td>Address of user that requested to unbond stSei</td></tr><tr><td>requests</td><td>UnbondRequest</td><td>List of unbonding requests made by user</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

<table><thead><tr><th width="171">Key</th><th width="258">Type</th><th>Description</th></tr></thead><tbody><tr><td>UnbondRequest</td><td>Vec&#x3C;(u64, Uint128, Uint128)></td><td>List of (batch ID, bSei unbond amount, stSei unbond amount)</td></tr><tr><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### AllHistory

Gets the historical list of undelegation batch entries.

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum QueryMsg {
    AllHistory {
        start_from: Option<u64>,
        limit: Option<u32>,
    },
}
```

<table><thead><tr><th width="179">Key</th><th width="122">Type</th><th>Description</th></tr></thead><tbody><tr><td>start_from*</td><td>u64</td><td>Batch Id to start query</td></tr><tr><td>limit*</td><td>u32</td><td>Maximum number of query entries</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

\* = optional

### AllHistoryResponse

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct AllHistoryResponse {
    pub history: Vec<UnbondHistoryResponse>,
}


#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct UnbondHistoryResponse {
    pub batch_id: u64,
    pub time: u64,
    pub bsei_amount: Uint128,
    pub bsei_applied_exchange_rate: Decimal,
    pub bsei_withdraw_rate: Decimal,

    pub stsei_amount: Uint128,
    pub stsei_applied_exchange_rate: Decimal,
    pub stsei_withdraw_rate: Decimal,

    pub released: bool,

    // #[deprecated]
    pub amount: Uint128,
    // #[deprecated]
    pub applied_exchange_rate: Decimal,
    // #[deprecated]
    pub withdraw_rate: Decimal,
}
```

<table><thead><tr><th width="150">Key</th><th width="265">Type</th><th>Description</th></tr></thead><tbody><tr><td>history</td><td>Vec&#x3C;UnbondHistoryResponse></td><td>List of batch information</td></tr></tbody></table>

<table><thead><tr><th width="260">Key</th><th width="118">Type</th><th>Description</th></tr></thead><tbody><tr><td>batch_id</td><td>u64</td><td>Batch ID</td></tr><tr><td>time</td><td>u64</td><td>Unix block timestamp when this batch was undelegated</td></tr><tr><td>bsei_amount</td><td>Uint128</td><td>(Fee-applied)amount of bSei unbonded in this batch</td></tr><tr><td>bsei_applied_exchange_rate</td><td>Decimal</td><td>bSei exchange rate at the time of batch undelegation</td></tr><tr><td>bsei_withdraw_rate</td><td>Decimal</td><td>Conversion rate applied when users later withdraw from this batch</td></tr><tr><td>stsei_amount</td><td>Uint128</td><td>(Fee-applied)amount of stSei unbonded in this batch</td></tr><tr><td>stsei_applied_exchange_rate</td><td>Decimal</td><td>stSei exchange rate at the time of batch undelegation</td></tr><tr><td>stsei_withdraw_rate</td><td>Decimal</td><td>Convertion rate applied when users later withdraw from this batch</td></tr><tr><td>released</td><td>bool</td><td>Indication on whether is batch is released(processed as fully undelegated by the contract)</td></tr></tbody></table>


# Reward

The Reward contract contains the logic for distributing Sei delegation rewards to holders of stSei. After the Hub contract withdraws Sei delegation rewards to the Reward contract, the Hub contract can request all rewards to be redelegated, which then updates the stSei vs Sei exchange rate.

## Config

<table><thead><tr><th width="194">Key</th><th width="172">Type</th><th>Description</th></tr></thead><tbody><tr><td>owner</td><td>CanonicalAddr</td><td>The owner's address of the contract</td></tr><tr><td>hub_contract</td><td>CanonicalAddr</td><td>Contract address of <a href="/pages/uDcmHmpc0mZMeW8nOOdR">Hub</a></td></tr><tr><td>reward_denom</td><td>String</td><td>Native token denomination for distributed bSei rewards</td></tr><tr><td>swap_contract</td><td>CanonicalAddr</td><td>Contract address of <a href="/pages/aecTtgcR55hEz3feD4Y6">Swap Extension</a></td></tr><tr><td>swap_denoms</td><td>Vec&#x3C;String></td><td>The supported swap denoms type is configured as "usei"</td></tr></tbody></table>

## InitMsg

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct InstantiateMsg {
    pub hub_contract: String,
    pub reward_denom: String,
    pub swap_contract: String,
    pub swap_denoms: Vec<String>,
}
```

<table><thead><tr><th width="173">Key</th><th width="145">Type</th><th>Description</th></tr></thead><tbody><tr><td>hub_contract</td><td>String</td><td>Contract address of <a href="/pages/uDcmHmpc0mZMeW8nOOdR">Hub</a></td></tr><tr><td>reward_denom</td><td>String</td><td>Native token denomination for distributed bSei rewards</td></tr><tr><td>swap_contract</td><td>String</td><td>Contract address of <a href="/pages/aecTtgcR55hEz3feD4Y6">Swap Extension</a></td></tr><tr><td>swap_denoms</td><td>Vec&#x3C;String></td><td>The supported swap denoms type is configured as "usei"</td></tr></tbody></table>

## ExecuteMsg

### ClaimRewards

Claims bSei holder's accrued rewards to the specified address. Sends rewards to the message sender if the `recipient` is not specified.

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum ExecuteMsg {
    /// return the accrued reward in uusd to the user.
    ClaimRewards { recipient: Option<String> },
}
```

<table><thead><tr><th width="181">Key</th><th width="186">Type</th><th>Description</th></tr></thead><tbody><tr><td>recipient*</td><td>String</td><td>Recipient address of claimed bSei rewards</td></tr><tr><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

\* = optional

### UpdateConfig

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum ExecuteMsg {
   UpdateConfig {
        hub_contract: Option<String>,
        reward_denom: Option<String>, 
        swap_contract: Option<String>,
    },
}
```

<table><thead><tr><th width="172">Key</th><th width="156">Type</th><th>Description</th></tr></thead><tbody><tr><td>hub_contract*</td><td>String</td><td>Contract address of <a href="/pages/uDcmHmpc0mZMeW8nOOdR">Hub</a></td></tr><tr><td>reward_denom*</td><td>String</td><td>Native token denomination for distributed bSei rewards</td></tr><tr><td>swap_contract*</td><td>String</td><td>Contract address of <a href="/pages/aecTtgcR55hEz3feD4Y6">Swap Extension</a></td></tr></tbody></table>

\* = optional

### SetOwner

Transfer ownership permissions to a new owner address.

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum ExecuteMsg {
 SetOwner {
        new_owner_addr: String,
    },
}
```

<table><thead><tr><th width="188">Key</th><th width="140">Type</th><th>Description</th></tr></thead><tbody><tr><td>new_owner_addr</td><td>String</td><td>The address of new owner</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### AcceptOwnership

The new owner accepts ownership permissions.

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum ExecuteMsg {
    AcceptOwnership {},
}
```

### \[Internal] SwapToRewardDenom

Swaps all withdrawn delegation rewards to `reward_denom`. Can only be issued by the `Hub`

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum ExecuteMsg {
     SwapToRewardDenom {},
}
```

| Key | Type | Desciption |
| --- | ---- | ---------- |
|     |      |            |

### \[Internal] UpdateGlobalIndex

Updates the global reward index based on the newly withdrawn rewards. Can only be issued by the [Rewards Dispatcher](broken://pages/bwqK9e6KOfutHx5u0qK4)

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum ExecuteMsg {
    UpdateGlobalIndex {},
}
```

<table><thead><tr><th width="219">Key</th><th width="216">Type</th><th>Description</th></tr></thead><tbody><tr><td></td><td></td><td></td></tr></tbody></table>

### \[Internal] IncreaseBalance

Increases stored user's bSei balance. Stores the user's accrued rewards to pending rewards and updates user's reward index to the current global reward index. Can only be issued by the `Token`.

<pre class="language-rust"><code class="lang-rust"><strong>#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
</strong>#[serde(rename_all = "snake_case")]
pub enum ExecuteMsg {
    IncreaseBalance { 
        address: String, 
        amount: Uint128
     },
}
</code></pre>

<table><thead><tr><th width="183">Key</th><th width="147">Type</th><th>Description</th></tr></thead><tbody><tr><td>address</td><td>String</td><td>Address of user whose balance has increased</td></tr><tr><td>amount</td><td>Uint128</td><td>Amount of bINJ balance increased</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### \[Internal] DecreaseBalance

Decreases stored user's bSei balance. Stores the user's accrued rewards to pending rewards and updates user's reward index to the current global reward index. Can only be issued by the `Token`.

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum ExecuteMsg {
    DecreaseBalance { 
        address: String, 
        amount: Uint128
     },
}
```

<table><thead><tr><th width="175">Key</th><th width="172">Type</th><th>Description</th></tr></thead><tbody><tr><td>address</td><td>String</td><td>Address of user whose balance has decreased</td></tr><tr><td>amount</td><td>Uint128</td><td>Amount of bINJ balance decreased</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### UpdateSwapDenom

Add or remove Native token denomination types supported by the [Swap Extension](broken://pages/aecTtgcR55hEz3feD4Y6).

<pre class="language-rust"><code class="lang-rust">#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum ExecuteMsg {
    UpdateSwapDenom {
        swap_denom: String,
        is_add: bool,
    },
<strong>}
</strong></code></pre>

<table><thead><tr><th width="179">Key</th><th width="183">Type</th><th>Description</th></tr></thead><tbody><tr><td>swap_denom</td><td>String</td><td>Add or remove Native token denomination types</td></tr><tr><td>is_add</td><td>bool</td><td>"true" represents "add", and "false" represents "remove"</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

## QueryMsg

### Config

Gets the contract configuration of `Reward`.

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum QueryMsg {
    Config {},
}
```

### ConfigResponse

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct ConfigResponse {
    pub hub_contract: String,
    pub reward_denom: String,
    pub owner: String,
    pub swap_contract: String,
}
```

<table><thead><tr><th width="217">Key</th><th width="144">Type</th><th>Description</th></tr></thead><tbody><tr><td>hub_contract</td><td>String</td><td>Contract address of <a href="/pages/uDcmHmpc0mZMeW8nOOdR">Hub</a></td></tr><tr><td>reward_denom</td><td>String</td><td>Native token denomination for distributed bSei rewards</td></tr><tr><td>owner</td><td>String</td><td>The owner's address of the contract</td></tr><tr><td>swap_contract</td><td>String</td><td>The supported swap denoms type is configured as "usei"</td></tr></tbody></table>

### State

Gets information about the contract's current state.

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum QueryMsg {
    State {},
}
```

### StateResponse

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct StateResponse {
    pub global_index: Decimal,
    pub total_balance: Uint128,
    pub prev_reward_balance: Uint128,
}
```

<table><thead><tr><th width="238">Key</th><th width="144">Type</th><th>Description</th></tr></thead><tbody><tr><td>global_index</td><td>Decimal</td><td>Current global reward index of bSei</td></tr><tr><td>total_balance</td><td>Uint128</td><td>Total bSei balance of all holders</td></tr><tr><td>prev_reward_balance</td><td>Uint128</td><td>kUSD balance of Reward contract at the end of last <a href="#internal-updateglobalindex"><code>UpdateGlobalIndex</code></a></td></tr></tbody></table>

### AccruedRewards

Gets the amount of rewards accrued to the specified bSei holder.

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum QueryMsg {
    AccruedRewards {
        address: String,
    },
}
```

<table><thead><tr><th width="218">Key</th><th width="171">Type</th><th>Description</th></tr></thead><tbody><tr><td>address</td><td>String</td><td>Address of bSei holder</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### AccruedRewardsResponse

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct AccruedRewardsResponse {
    pub rewards: Uint128,
}
```

<table><thead><tr><th width="197">Key</th><th width="184">Type</th><th>Description</th></tr></thead><tbody><tr><td>rewards</td><td>Uint128</td><td>Amount of <code>reward_denom</code> rewards accrued</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### Holder

Gets information about the specified bSei holder.

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum QueryMsg {
    Holder {
        address: String,
    },
}
```

<table><thead><tr><th width="218">Key</th><th width="171">Type</th><th>Description</th></tr></thead><tbody><tr><td>address</td><td>String</td><td>Address of bSei holder</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### HolderResponse

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct HolderResponse {
    pub address: String,
    pub balance: Uint128,
    pub index: Decimal,
    pub pending_rewards: Decimal,
}
```

<table><thead><tr><th width="201">Key</th><th width="171">Type</th><th>Description</th></tr></thead><tbody><tr><td>address</td><td>String</td><td>Address of bSei holder</td></tr><tr><td>balance</td><td>Uint128</td><td>bSei balance of holder</td></tr><tr><td>index</td><td>Decimal</td><td>Holder's reward index value</td></tr><tr><td>pending_rewards</td><td>Decimal</td><td>Amount of holder's pending rewards</td></tr></tbody></table>

### Holders

Gets information about all bSei holders.

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum QueryMsg {
  Holders {
        start_after: Option<String>,
        limit: Option<u32>,
    },
}
```

<table><thead><tr><th width="205">Key</th><th width="108">Type</th><th>Description</th></tr></thead><tbody><tr><td>start_after*</td><td>String</td><td>Address of bSei holder to start query</td></tr><tr><td>limit*</td><td>u32</td><td>Maximum number of query entries</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

\* = optional

### HoldersResponse

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct HoldersResponse {
    pub holders: Vec<HolderResponse>,
}

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct HolderResponse {
    pub address: String,
    pub balance: Uint128,
    pub index: Decimal,
    pub pending_rewards: Decimal,
}
```

<table><thead><tr><th width="168">Key</th><th width="219">Type</th><th>Description</th></tr></thead><tbody><tr><td>holders</td><td>Vec&#x3C;HolderResponse></td><td>Vector of holder informations</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

<table><thead><tr><th width="175">Key</th><th width="218">Type</th><th>Description</th></tr></thead><tbody><tr><td>address</td><td>String</td><td>Address of bSei holder</td></tr><tr><td>balance</td><td>Uint128</td><td>bSei balance of holder</td></tr><tr><td>index</td><td>Decimal</td><td>Holder's reward index value</td></tr><tr><td>pending_rewards</td><td>Decimal</td><td>Amount of holder's pending rewards</td></tr></tbody></table>

### NewOwner

Query the address of the new owner.

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum QueryMsg {
  NewOwner {},
}
```

### NewOwnerResponse

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct NewOwnerResponse {
    pub new_owner: String,
}
```

<table><thead><tr><th width="186">Key</th><th width="190">Type</th><th>Description</th></tr></thead><tbody><tr><td>new_owner</td><td>String</td><td>The address of new owner</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>


# Rewards Dispatcher

The Rewards Dispatcher contract accumulates the rewards from Hub's delegations and manages the rewards.

All rewards from *stSei* tokens (the share of all rewards proportional to the amount of *stSei* tokens minted) are converted to Luna and are re-delegated back to the validators pool.

All rewards from *bSei* (the share of all rewards proportional to the amount of *bSei* tokens minted) are sent to the Reward Contract and handled the old way.

## Config

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct Config {
    pub owner: CanonicalAddr,
    pub hub_contract: CanonicalAddr,
    pub bsei_reward_contract: CanonicalAddr,
    pub stsei_reward_denom: String,
    pub bsei_reward_denom: String,
    pub krp_keeper_address: CanonicalAddr,
    pub krp_keeper_rate: Decimal,
    pub swap_contract: CanonicalAddr,
    pub swap_denoms: Vec<String>,
    pub oracle_contract: CanonicalAddr,
}
```

<table><thead><tr><th width="212">Key</th><th width="189">Type</th><th>Description</th></tr></thead><tbody><tr><td>owner</td><td>CanonicalAddr</td><td>Owner of the contract</td></tr><tr><td>hub_contract</td><td>CanonicalAddr</td><td>Contract address of <a href="/pages/uDcmHmpc0mZMeW8nOOdR">Hub</a></td></tr><tr><td>bsei_reward_contract</td><td>CanonicalAddr</td><td>Contract address of <a href="/pages/SWIB97e1ElrG6yxSYuE9">bSei Reward</a></td></tr><tr><td>stsei_reward_denom</td><td>String</td><td>Native token denomination for distributed stSei rewards</td></tr><tr><td>bsei_reward_denom</td><td>String</td><td>Native token denomination for distributed bSei rewards</td></tr><tr><td>krp_keeper_address</td><td>CanonicalAddr</td><td>Address for fee distribution</td></tr><tr><td>krp_keeper_rate</td><td>Decimal</td><td>Amount of fees which goes to Fee Address</td></tr><tr><td>swap_contract</td><td>CanonicalAddr</td><td>Contract address of <a href="/pages/aecTtgcR55hEz3feD4Y6">Swap Extension</a></td></tr><tr><td>swap_denoms</td><td>Vec&#x3C;String></td><td>The supported swap denoms type is configured as "usei"</td></tr><tr><td>oracle_contract</td><td>CanonicalAddr</td><td>Contract address of <a href="/pages/GZsWYCeNNKVDvIf1ouxL">Oracle</a></td></tr></tbody></table>

## InitMsg

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct InstantiateMsg {
    pub hub_contract: String,
    pub bsei_reward_contract: String,
    pub stsei_reward_denom: String,
    pub bsei_reward_denom: String,
    pub krp_keeper_address: String,
    pub krp_keeper_rate: Decimal,
    pub swap_contract: String,
    pub swap_denoms: Vec<String>,
    pub oracle_contract: String,
}
```

<table><thead><tr><th width="212">Key</th><th width="189">Type</th><th>Description</th></tr></thead><tbody><tr><td>hub_contract</td><td>CanonicalAddr</td><td>Contract address of <a href="/pages/uDcmHmpc0mZMeW8nOOdR">Hub</a></td></tr><tr><td>bsei_reward_contract</td><td>CanonicalAddr</td><td>Contract address of <a href="/pages/SWIB97e1ElrG6yxSYuE9">bSei Reward</a></td></tr><tr><td>stsei_reward_denom</td><td>String</td><td>Native token denomination for distributed stSei rewards</td></tr><tr><td>bsei_reward_denom</td><td>String</td><td>Native token denomination for distributed bSei rewards</td></tr><tr><td>krp_keeper_address</td><td>CanonicalAddr</td><td>Address for fee distribution</td></tr><tr><td>krp_keeper_rate</td><td>Decimal</td><td>Amount of fees which goes to Fee Address</td></tr><tr><td>swap_contract</td><td>CanonicalAddr</td><td>Contract address of <a href="/pages/aecTtgcR55hEz3feD4Y6">Swap Extension</a></td></tr><tr><td>swap_denoms</td><td>Vec&#x3C;String></td><td>The supported swap denoms type is configured as "usei"</td></tr><tr><td>oracle_contract</td><td>CanonicalAddr</td><td>Contract address of <a href="/pages/GZsWYCeNNKVDvIf1ouxL">Oracle</a></td></tr></tbody></table>

## ExecuteMsg

### \[Internal] SwapToRewardDenom

Swaps all native tokens on his balance to Sei and kUSD proportional to the minted stSei and bSei amount.

Can only be executed by the [Hub](broken://pages/uDcmHmpc0mZMeW8nOOdR).

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum ExecuteMsg {
    SwapToRewardDenom {
        bsei_total_bonded: Uint128,
        stsei_total_bonded: Uint128,
    },
}
```

<table><thead><tr><th width="193">Key</th><th width="206">Type</th><th>Description</th></tr></thead><tbody><tr><td>bsei_total_bonded</td><td>Uint128</td><td>Total amount of minted bSei</td></tr><tr><td>stsei_total_bonded</td><td>Uint128</td><td>Total amount of minted stSei</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### \[Internal] DispatchRewards

Re-stakes the stSei rewards (with subtracted Fee) and sends the bSei rewards to the old bSei Rewards contract (with subtracted Fee).

Can only be executed by the [Hub](broken://pages/uDcmHmpc0mZMeW8nOOdR).

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum ExecuteMsg {
    DispatchRewards {},
}
```

### UpdateConfig

Updates the dispatcher's configuration. Can only be executed by the owner.

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum ExecuteMsg {
    UpdateConfig {
        hub_contract: Option<String>,
        bsei_reward_contract: Option<String>,
        stsei_reward_denom: Option<String>,
        bsei_reward_denom: Option<String>,
        krp_keeper_address: Option<String>,
        krp_keeper_rate: Option<Decimal>,
    },
}
```

<table><thead><tr><th width="209">Key</th><th width="191">Type</th><th>Description</th></tr></thead><tbody><tr><td>hub_contract</td><td>String</td><td>Contract address of <a href="/pages/uDcmHmpc0mZMeW8nOOdR">Hub</a></td></tr><tr><td>bsei_reward_contract</td><td>String</td><td>Contract address of <a href="/pages/SWIB97e1ElrG6yxSYuE9">bSei Reward</a></td></tr><tr><td>stsei_reward_denom</td><td>String</td><td>Native token denomination for distributed stSei rewards</td></tr><tr><td>bsei_reward_denom</td><td>String</td><td>Native token denomination for distributed bSei rewards</td></tr><tr><td>krp_keeper_addres</td><td>String</td><td>Address for fee distribution</td></tr><tr><td>krp_keeper_rate</td><td>Decimal</td><td>Amount of fees which goes to Fee Address</td></tr></tbody></table>

### SetOwner

Transfer ownership permissions to a new owner address.

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum ExecuteMsg {
 SetOwner {
        new_owner_addr: String,
    },
}
```

<table><thead><tr><th width="188">Key</th><th width="140">Type</th><th>Description</th></tr></thead><tbody><tr><td>new_owner_addr</td><td>String</td><td>The address of new owner</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### AcceptOwnership

The new owner accepts ownership permissions.

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum ExecuteMsg {
    AcceptOwnership {},
}
```

### UpdateSwapContract

Update the contract address of the [Swap Extension](broken://pages/aecTtgcR55hEz3feD4Y6), which can only be modified by the owner.

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum ExecuteMsg {
     UpdateSwapContract {
        swap_contract: String,
     },
}
```

<table><thead><tr><th width="176">Key</th><th width="184">Type</th><th>Description</th></tr></thead><tbody><tr><td>swap_contract</td><td>String</td><td>The new address of <a href="/pages/aecTtgcR55hEz3feD4Y6">Swap Extension</a></td></tr><tr><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### UpdateSwapDenom

Add or remove Native token denomination types supported by the [Swap Extension](broken://pages/aecTtgcR55hEz3feD4Y6).

<pre class="language-rust"><code class="lang-rust">#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum ExecuteMsg {
    UpdateSwapDenom {
        swap_denom: String,
        is_add: bool,
    },
<strong>}
</strong></code></pre>

<table><thead><tr><th width="179">Key</th><th width="183">Type</th><th>Description</th></tr></thead><tbody><tr><td>swap_denom</td><td>String</td><td>Add or remove Native token denomination types</td></tr><tr><td>is_add</td><td>bool</td><td>"true" represents "add", and "false" represents "remove"</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### UpdateOracleContract

Update the contract address of the [Oracle](broken://pages/GZsWYCeNNKVDvIf1ouxL), which can only be modified by the owner.

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum ExecuteMsg {
    UpdateOracleContract{
        oracle_contract: String,
    }
}
```

<table><thead><tr><th width="188">Key</th><th width="182">Type</th><th>Description</th></tr></thead><tbody><tr><td>oracle_contract</td><td>String</td><td>The new address of <a href="/pages/GZsWYCeNNKVDvIf1ouxL">Oracle</a></td></tr><tr><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

## QueryMsg

### Config

Returns the current configuration of the contract.

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum QueryMsg {
    Config {},
}
```

### ConfigResponse

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct ConfigResponse {
    pub owner: String,
    pub hub_contract: String,
    pub bsei_reward_contract: String,
    pub stsei_reward_denom: String,
    pub bsei_reward_denom: String,
    pub krp_keeper_address: String,
    pub krp_keeper_rate: Decimal,
    pub swap_contract: String,
    pub swap_denoms: Vec<String>,
    pub oracle_contract: String,
}
```

<table><thead><tr><th width="212">Key</th><th width="189">Type</th><th>Description</th></tr></thead><tbody><tr><td>owner</td><td>CanonicalAddr</td><td>Owner of the contract</td></tr><tr><td>hub_contract</td><td>CanonicalAddr</td><td>Contract address of <a href="/pages/uDcmHmpc0mZMeW8nOOdR">Hub</a></td></tr><tr><td>bsei_reward_contract</td><td>CanonicalAddr</td><td>Contract address of <a href="/pages/SWIB97e1ElrG6yxSYuE9">bSei Reward</a></td></tr><tr><td>stsei_reward_denom</td><td>String</td><td>Native token denomination for distributed stSei rewards</td></tr><tr><td>bsei_reward_denom</td><td>String</td><td>Native token denomination for distributed bSei rewards</td></tr><tr><td>krp_keeper_address</td><td>CanonicalAddr</td><td>Address for fee distribution</td></tr><tr><td>krp_keeper_rate</td><td>Decimal</td><td>Amount of fees which goes to Fee Address</td></tr><tr><td>swap_contract</td><td>CanonicalAddr</td><td>Contract address of <a href="/pages/aecTtgcR55hEz3feD4Y6">Swap Extension</a></td></tr><tr><td>swap_denoms</td><td>Vec&#x3C;String></td><td>The supported swap denoms type is configured as "usei"</td></tr><tr><td>oracle_contract</td><td>CanonicalAddr</td><td>Contract address of <a href="/pages/GZsWYCeNNKVDvIf1ouxL">Oracle</a></td></tr></tbody></table>

### NewOwner

Query the address of the new owner.

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum QueryMsg {
  NewOwner {},
}
```

### NewOwnerResponse

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct NewOwnerResponse {
    pub new_owner: String,
}
```

<table><thead><tr><th width="186">Key</th><th width="190">Type</th><th>Description</th></tr></thead><tbody><tr><td>new_owner</td><td>String</td><td>The address of new owner</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>


# Validators Registry

The Validator Registry contract stores an approved validators whitelist.

The main query of the contract - [`GetValidatorsForDelegation` ](#getvalidatorsfordelegation)returns a list of approved validators sorted by total\_delegated amount.

The [Hub ](broken://pages/uDcmHmpc0mZMeW8nOOdR)uses this query to equally distribute delegations between validators.

## Config

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct Config {
    pub owner: CanonicalAddr,
    pub hub_contract: CanonicalAddr,
}
```

<table><thead><tr><th width="162">Key</th><th width="194">Type</th><th>Description</th></tr></thead><tbody><tr><td>owner</td><td>CanonicalAddr</td><td>Owner of the contract</td></tr><tr><td>hub_contract</td><td>CanonicalAddr</td><td>Contract address of <a href="/pages/uDcmHmpc0mZMeW8nOOdR">Hub</a></td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

## InitMsg

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct InstantiateMsg {
    pub registry: Vec<Validator>,
    pub hub_contract: String,
}

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct Validator {
    pub address: String,
}

```

<table><thead><tr><th width="171">Key</th><th width="188">Type</th><th>Description</th></tr></thead><tbody><tr><td>registry</td><td>Vec&#x3C;Validator></td><td>List of whitelisted validators</td></tr><tr><td>hub_contract</td><td>String</td><td>Contract address of <a href="/pages/uDcmHmpc0mZMeW8nOOdR">Hub</a></td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

<table><thead><tr><th width="171">Key</th><th width="188">Type</th><th>Description</th></tr></thead><tbody><tr><td>address</td><td>String</td><td>Operator address</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

## ExecuteMsg

### AddValidator

Adds a validator to the registry. Can only be executed by the owner.

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum ExecuteMsg {
    AddValidator { validator: Validator },
}

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct Validator {
    pub address: String,
}
```

<table><thead><tr><th width="169">Key</th><th width="190">Type</th><th>Description</th></tr></thead><tbody><tr><td>validator</td><td>Validator</td><td>validator struct</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

<table><thead><tr><th width="171">Key</th><th width="189">Type</th><th>Description</th></tr></thead><tbody><tr><td>address</td><td>String</td><td>Operator address</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### RemoveValidator

Removes a validator from the registry. Can only be executed by the owner.

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum ExecuteMsg {
    RemoveValidator { address: String},
}
```

<table><thead><tr><th width="178">Key</th><th width="187">Type</th><th>Description</th></tr></thead><tbody><tr><td>address</td><td>String</td><td>Operator address</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### UpdateConfig

Updates a registry's configuration. Can only be issued by the owner.

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum ExecuteMsg {
    UpdateConfig {
        hub_contract: Option<String>,
    },
}
```

<table><thead><tr><th width="178">Key</th><th width="190">Type</th><th>Description</th></tr></thead><tbody><tr><td>hub_contract*</td><td>String</td><td>New contract address of <a href="/pages/uDcmHmpc0mZMeW8nOOdR">Hub</a></td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

\* = optional

### Redelegations

Re-delegate the delegation from the validator which removed to other whitelisted validator nodes.

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum ExecuteMsg {
    Redelegations { address: String }, 
}
```

<table><thead><tr><th width="183">Key</th><th width="191">Type</th><th>Description</th></tr></thead><tbody><tr><td>address</td><td>String</td><td>Operator address</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### SetOwner

Transfer ownership permissions to a new owner address.

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum ExecuteMsg {
 SetOwner {
        new_owner_addr: String,
    },
}
```

<table><thead><tr><th width="188">Key</th><th width="140">Type</th><th>Description</th></tr></thead><tbody><tr><td>new_owner_addr</td><td>String</td><td>The address of new owner</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### AcceptOwnership

The new owner accepts ownership permissions.

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum ExecuteMsg {
    AcceptOwnership {},
}
```

## QueryMsg

### GetValidatorsForDelegation

Returns validators sorted by total\_delegated amount.

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum QueryMsg {
    GetValidatorsForDelegation {},
}
```

### ValidatorResponse

returns list validatorResponse

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct ValidatorResponse {
    #[serde(default)]
    pub total_delegated: Uint128,
    pub address: String,
}
```

<table><thead><tr><th width="183">Key</th><th width="178">Type</th><th>Description</th></tr></thead><tbody><tr><td>total_delegated</td><td>Uint128</td><td>total Sei delegated to validator</td></tr><tr><td>address</td><td>String</td><td>Operator address</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### Config

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum QueryMsg {
    Config {},
}
```

Returns a [Config ](#config)struct.

### NewOwner

Query the address of the new owner.

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum QueryMsg {
  NewOwner {},
}
```

### NewOwnerResponse

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct NewOwnerResponse {
    pub new_owner: String,
}
```

<table><thead><tr><th width="186">Key</th><th width="190">Type</th><th>Description</th></tr></thead><tbody><tr><td>new_owner</td><td>String</td><td>The address of new owner</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>


# Tokens: stSei and bSei

stSei and bSei tokens are assets built for the Sei blockchain, their value backed by underlying Sei delegations. stSei and bSei tokens follow full compliance with the CW20 standard, having the potential to be integrated into a wide variety of decentralized finance applications.

## Base

This handles balances and transfers. Note that all amounts are handled as `Uint128` (128 bit integers with JSON string representation). Handling decimals is left to the UI and not interpreted

### Messages

`Transfer{recipient, amount}` - Moves `amount` tokens from the `env.sender` account to the `recipient` account. This is designed to send to an address controlled by a private key and *does not* trigger any actions on the recipient if it is a contract.

`Send{contract, amount, msg}` - Moves `amount` tokens from the `env.sender` account to the `recipient` account. `contract` must be an address of a contract that implements the `Receiver` interface. The `msg` will be passed to the recipient contract, along with the amount.

`Burn{amount}` - Remove `amount` tokens from the balance of `env.sender` and reduce `total_supply` by the same amount.

### Queries

`Balance{address}` - Returns the balance of the given address. Returns "0" if the address is unknown to the contract. Return type is `BalanceResponse{balance}`.

`TokenInfo{}` - Returns the token info of the contract. Return type is `TokenInfoResponse{name, symbol, decimal, total_supply}`.

### Receiver

The counter-part to `Send` is `Receive`, which must be implemented by any contract that wishes to manage CW20 tokens. This is generally *not* implemented by any CW20 contract.

`Receive{sender, amount, msg}` - This is designed to handle `Send` messages. The address of the contract is stored in `env.sender` so it cannot be faked. The contract should ensure the sender matches the token contract it expects to handle, and not allow arbitrary addresses.

The `sender` is the original account requesting to move the tokens and `msg` is a `Binary` data that can be decoded into a contract-specific message. This can be empty if we have only one default action, or it may be a `ReceiveMsg` variant to clarify the intention. For example, if I send to a uniswap contract, I can specify which token I want to swap against using this field.

## Allowances

A contract may allow actors to delegate some of their balance to other accounts. This is not as essential as with ERC20 as we use `Send`/`Receive` to send tokens to a contract, not `Approve`/`TransferFrom`. But it is still a nice use-case, and you can see how the Cosmos SDK wants to add payment allowances to native tokens. This is mainly designed to provide access to other public-key-based accounts.

There was an issue with race conditions in the original ERC20 approval spec. If you had an approval of 50 and I then want to reduce it to 20, I submit a Tx to set the allowance to 20. If you see that and immediately submit a tx using the entire 50, you then get access to the other 20. Not only did you quickly spend the 50 before I could reduce it, you get another 20 for free.

The solution discussed in the Ethereum community was an `IncreaseAllowance` and `DecreaseAllowance` operator (instead of `Approve`). To originally set an approval, use `IncreaseAllowance`, which works fine with no previous allowance. `DecreaseAllowance` is meant to be robust, that is if you decrease by more than the current allowance (eg. the user spent some in the middle), it will just round down to 0 and not make any underflow error.

### Messages

`IncreaseAllowance{spender, amount, expires}` - Set or increase the allowance such that `spender` may access up to `amount + current_allowance` tokens from the `env.sender` account. This may optionally come with an `Expiration` time, which if set limits when the approval can be used (by time or height).

`DecreaseAllowance{spender, amount, expires}` - Decrease or clear the allowance such that `spender` may access up to `current_allowance - amount` tokens from the `env.sender` account. This may optionally come with an `Expiration` time, which if set limits when the approval can be used (by time or height). If `amount >= current_allowance`, this will clear the allowance (delete it).

`TransferFrom{owner, recipient, amount}` - This makes use of an allowance and if there was a valid, un-expired pre-approval for the `env.sender`, then we move `amount` tokens from `owner` to `recipient` and deduct it from the available allowance.

`SendFrom{owner, contract, amount, msg}` - `SendFrom` is to `Send`, what `TransferFrom` is to `Transfer`. This allows a pre-approved account to not just transfer the tokens, but to send them to another contract to trigger a given action. **Note** `SendFrom` will set the `Receive{sender}` to be the `env.sender` (the account that triggered the transfer) rather than the `owner` account (the account the money is coming from). This is an open question whether we should switch this?

`BurnFrom{owner, amount}` - This works like `TransferFrom`, but burns the tokens instead of transfering them. This will reduce the owner's balance, `total_supply` and the caller's allowance.

### Queries

`Allowance{owner, spender}` - This returns the available allowance that `spender` can access from the `owner`'s account, along with the expiration info. Return type is `AllowanceResponse{balance, expiration}`.

## Mintable

This allows another contract to mint new tokens, possibly with a cap. There is only one minter specified here, if you want more complex access management, please use a multisig or other contract as the minter address and handle updating the ACL there.

### Messages

`Mint{recipient, amount}` - If the `env.sender` is the allowed minter, this will create `amount` new tokens (updating total supply) and add them to the balance of `recipient`, as long as it does not exceed the cap.

### Queries

`Minter{}` - Returns who and how much can be minted. Return type is `MinterResponse {minter, cap}`. Cap may be unset.

If the cap is set, it defines the maximum `total_supply` that may ever exist. If initial supply is 1000 and cap is `Some(2000)`, you can only mint 1000 more tokens. However, if someone then burns 500 tokens, the minter can mint those 500 again. This allows for dynamic token supply within a set of parameters, especially when the minter is a smart contract.

## Enumerable

This should be enabled with all blockchains that have iterator support. It allows us to get lists of results with pagination.

## Marketing

This allows us to attach more metadata on the token to help with displaying the token in wallets. When you see a token's website, then see it in a wallet, you know what it is. However, if you see it in a wallet or a DEX trading pair, there is no clear way to find out any more info about it.

This extension allows us to attach more "Marketing" metadata, which has no effect on the on-chain functionality of the token, but is very useful in providing a better client-side experience. Note, that we add a new role `marketing`, which can update such info, but not affect on-chain logic.

### Messages

`UploadLogo{url | embedded}` - If the `env.sender` is the allowed marketing account, this will either set a new URL reference where the logo is served, or allow them to upload a small (less than 5KB) SVG or PNG logo onto the blockchain to be served.

`UpdateMarketing{project, description, marketing}` - If the `env.sender` is the allowed marketing account, this will update some marketing-related metadata on the contract.

### Queries

`MarketingInfo{}` - Returns marketing-related metadata. Return type is `MarketingInfoResponse {project, description, logo, marketing}`.

`DownloadLogo{}` - If the token's logo was previously uploaded to the blockchain (see `UploadLogo` message), then it returns the raw data to be displayed in a browser. Return type is `DownloadLogoResponse{ mime_type, data }`.

### Queries

`AllAllowances{owner, start_after, limit}` - Returns the list of all non-expired allowances by the given owner. `start_after` and `limit` provide pagination.

`AllAccounts{start_after, limit}` - Returns the list of all accounts that have been created on the contract (just the addresses). `start_after` and `limit` provide pagination.


# SEILOR Token


# Boost

veSEILOR holders receive a varied percentage of yield boost depending on the lock-up length.

## Config

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct BoostConfig {
    pub gov: Addr,
    pub ve_seilor_lock_settings: Vec<VeSeilorLockSetting>,
}

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct VeSeilorLockSetting {
    pub duration: Uint128,
    pub mining_boost: Uint128,
}
```

<table><thead><tr><th width="225">Key</th><th width="233">Type</th><th>Description</th></tr></thead><tbody><tr><td>gov</td><td>Addr</td><td>The address of the governance contract</td></tr><tr><td>ve_seilor_lock_settings</td><td>Vec&#x3C;VeSeilorLockSetting></td><td>List of VeSeilorLockSetting</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

<table><thead><tr><th width="187">Key</th><th width="196">Type</th><th>Description</th></tr></thead><tbody><tr><td>duration</td><td>Uint128</td><td></td></tr><tr><td>mining_boost</td><td>Uint128</td><td></td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

## InitMsg

```rust
#[cw_serde]
pub struct InstantiateMsg {
    pub gov: Option<Addr>,
    pub ve_seilor_lock_settings: Vec<VeSeilorLockSetting>,
}
```

```json
{
  "gov": "addr",
  "ve_seilor_lock_settings": [
    {
      "duration": "1000000000000000000",
      "mining_boost": "1000000000000000000"
    }
  ]
}
```

<table><thead><tr><th width="187">Key</th><th width="196">Type</th><th>Description</th></tr></thead><tbody><tr><td>duration</td><td>String</td><td>The duration of the lock</td></tr><tr><td>mining_boost</td><td>String</td><td>The boost percentage</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

## ExecuteMsg

### AddLockSetting&#x20;

```rust
#[cw_serde]
pub enum ExecuteMsg {
    AddLockSetting {
        duration: Uint128,
        mining_boost: Uint128,
    },
}
```

```json
{
  "add_lock_setting": {
    "duration": "1000000000000000000",
    "mining_boost": "1000000000000000000"
  }
}
```

<table><thead><tr><th width="172">Key</th><th width="211">Type</th><th>Description</th></tr></thead><tbody><tr><td>duration</td><td>String</td><td>The duration of the lock</td></tr><tr><td>mining_boost</td><td>String</td><td>The boost percentage</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### ChangeGov

```rust
#[cw_serde]
pub enum ExecuteMsg {
    ChangeGov {
        gov: Addr,
    },
}
```

```json
{
  "change_gov": {
    "gov": "addr"
  }
}
```

<table><thead><tr><th width="190">Key</th><th width="185">Type</th><th>Description</th></tr></thead><tbody><tr><td>gov</td><td>String</td><td>The address of the governance contract</td></tr><tr><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### SetLockStatus

```rust
#[cw_serde]
pub enum ExecuteMsg {
    SetLockStatus {
        index: u32,
    },
}
```

```json
{
  "set_lock_status": {
    "index": 0
  }
}
```

<table><thead><tr><th width="189">Key</th><th width="193">Type</th><th>Description</th></tr></thead><tbody><tr><td>index</td><td>number</td><td>The index of the lock setting to update</td></tr><tr><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

## QueryMsg

### GetUnlockTime

```rust
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
    #[returns(GetUnlockTimeResponse)]
    GetUnlockTime {
        user: Addr,
    },
}
```

```json
{
  "get_unlock_time": {
    "user": "addr"
  }
}
```

<table><thead><tr><th width="198">Key</th><th width="183">Type</th><th>Description</th></tr></thead><tbody><tr><td>user</td><td>String</td><td>The address of the user</td></tr><tr><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### GetUnlockTimeResponse&#x20;

```rust
#[cw_serde]
pub struct GetUnlockTimeResponse {
    pub unlock_time: Uint128,
}
```

```json
{
  "unlock_time": "1000000000000000000"
}
```

<table><thead><tr><th width="198">Key</th><th width="202">Type</th><th>Description</th></tr></thead><tbody><tr><td>unlock_time</td><td>String</td><td>The unlock time of user</td></tr><tr><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### GetUserLockStatus&#x20;

```rust
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
    #[returns(LockStatusResponse)]
    GetUserLockStatus {
        user: Addr,
    },
}
```

```json
{
  "get_user_lock_status": {
    "user": "addr"
  }
}
```

<table><thead><tr><th width="202">Key</th><th width="154">Type</th><th>Decription</th></tr></thead><tbody><tr><td>user</td><td>String</td><td>The address of the user</td></tr><tr><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### LockStatusResponse

```rust
#[cw_serde]
pub struct LockStatusResponse {
    pub unlock_time: Uint128,
    pub duration: Uint128,
    pub mining_boost: Uint128,
}
```

```json
{
  "unlock_time": "1000000000000000000",
  "duration": "1000000000000000000",
  "mining_boost": "1000000000000000000"
}
```

<table><thead><tr><th width="218">Key</th><th width="162">Type</th><th>Description</th></tr></thead><tbody><tr><td>unlock_time</td><td>string</td><td>The unlock time of user</td></tr><tr><td>duration</td><td>string</td><td>The duration of the lock</td></tr><tr><td>mining_boost</td><td>string</td><td>The boost percentage</td></tr></tbody></table>

### GetUserBoost

```rust
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
    #[returns(GetUserBoostResponse)]
    GetUserBoost {
        user: Addr,
        user_updated_at: Uint128,
        finish_at: Uint128,
    },
}
```

```json
{
  "get_user_boost": {
    "user": "sei1...",
    "user_updated_at": "1000000000000000000",
    "finish_at": "1000000000000000000"
  }
}
```

<table><thead><tr><th width="201">Key</th><th width="163">Type</th><th>Description</th></tr></thead><tbody><tr><td>user</td><td>string</td><td>The address of the user</td></tr><tr><td>user_updated_at</td><td>string</td><td>The last updated time of user</td></tr><tr><td>finish_at</td><td>string</td><td>The finish time of user</td></tr></tbody></table>

### GetUserBoostResponse

```rust
#[cw_serde]
pub struct GetUserBoostResponse {
    pub user_boost: Uint128,
}
```

```json
{
  "user_boost": "1000000000000000000"
}
```

<table><thead><tr><th width="207">Key</th><th width="200">Type</th><th>Description</th></tr></thead><tbody><tr><td>user_boost</td><td>string</td><td>The boost percentage</td></tr><tr><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### GetBoostConfig

```rust
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
    #[returns(GetBoostConfigResponse)]
    GetBoostConfig {},
}
```

```json
{
  "get_boost_config": {}
}
```

### GetBoostConfigResponse

```rust
#[cw_serde]
pub struct GetBoostConfigResponse {
    pub gov: Addr,
    pub ve_seilor_lock_settings: Vec<VeSeilorLockSetting>,
}
```

```json
{
  "gov": "addr",
  "ve_seilor_lock_settings": [
    {
      "duration": "1000000000000000000",
      "mining_boost": "1000000000000000000"
    }
  ]
}
```

<table><thead><tr><th width="221">Key</th><th width="207">Type</th><th>Description</th></tr></thead><tbody><tr><td>gov</td><td>string</td><td>The address of the governance contract</td></tr><tr><td>ve_seilor_lock_settings</td><td>array</td><td>The array of the lock settings</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>


# Dispatcher

This contract mainly releases Seilor tokens of SHO on a monthly basis. (Lock the locked Seilor tokens in this contract)

## Config

```rust
pub struct GlobalConfig {
    pub gov: Addr,
    pub claim_token: Addr,
    pub total_lock_amount: Uint256,
    pub start_lock_period_time: u64,
    pub duration_per_period: u64,
    pub periods: u64,
}
```

<table><thead><tr><th width="223">Key</th><th width="139">Type</th><th>Description</th></tr></thead><tbody><tr><td>gov</td><td>Addr</td><td>The address of the governance contract</td></tr><tr><td>claim_token</td><td>Addr</td><td>The address of the token contract to be claimed</td></tr><tr><td>end_regret_time</td><td>u64</td><td>The end time of the regret period</td></tr><tr><td>total_lock_amount</td><td>Uint256</td><td>The total amount of tokens to be locked</td></tr><tr><td>start_lock_period_time</td><td>u64</td><td>The start time of the lock period</td></tr><tr><td>duration_per_period</td><td>u64</td><td>The duration of each lock period</td></tr><tr><td>periods</td><td>u64</td><td>The number of lock periods</td></tr></tbody></table>

## InitMsg

```rust
#[cw_serde]
pub struct InstantiateMsg {
    pub gov: Option<Addr>,
    pub claim_token: Addr,
    pub total_lock_amount: Uint256,
    pub start_lock_period_time: u64,
    pub duration_per_period: u64,
    pub periods: u64,
}
```

```json
{
  "gov": "sei1...",
  "claim_token": "sei1...",
  "total_lock_amount": "80_000_000_000_000",
  "start_lock_period_time": "1688828677",
  "duration_per_period": "2592000",
  "periods": "25"
}
```

<table><thead><tr><th width="217">Key</th><th width="137">Type</th><th>Description</th></tr></thead><tbody><tr><td>gov</td><td>Addr</td><td>The address of the governance contract</td></tr><tr><td>claim_token</td><td>Addr</td><td>The address of the token contract to be claimed</td></tr><tr><td>total_lock_amount</td><td>Uint256</td><td>The total amount of tokens to be locked</td></tr><tr><td>start_lock_period_time</td><td>u64</td><td>The start time of the lock period</td></tr><tr><td>duration_per_period</td><td>u64</td><td>The duration of each lock period</td></tr><tr><td>periods</td><td>u64</td><td>The number of lock periods</td></tr></tbody></table>

## ExecuteMsg

### UpdateConfig

```rust
#[cw_serde]
pub enum ExecuteMsg {
    UpdateConfig(UpdateGlobalConfigMsg),
}
#[cw_serde]
pub struct UpdateGlobalConfigMsg {
    pub gov: Option<Addr>,
    pub claim_token: Option<Addr>,
    pub start_lock_period_time: Option<u64>,
    pub total_lock_amount: Option<Uint256>,
}
```

```
{
  "update_config": {
      {
          "gov": "sei1...",
          "claim_token": "sei1...",
          "start_lock_period_time": "1688828677",
          "total_lock_amount": "80_000_000_000_000"
      }
}
```

<table><thead><tr><th width="225">Key</th><th width="98">Type</th><th>Description</th></tr></thead><tbody><tr><td>gov*</td><td>Addr</td><td>The address of the governance contract</td></tr><tr><td>claim_token*</td><td>Addr</td><td>The address of the token contract to be claimed</td></tr><tr><td>start_lock_period_time</td><td>u64</td><td>The start time of the lock period</td></tr><tr><td>total_lock_amount*</td><td>Uint256</td><td>The total amount of tokens to be locked</td></tr></tbody></table>

'\* = optional

### AddUser

```rust
#[cw_serde]
pub enum ExecuteMsg {
    AddUser(Vec<AddUserMsg>),
}
#[cw_serde]
pub struct AddUserMsg {
    pub user: Addr,
    pub lock_amount: Uint256,
    pub replace: bool,
}
```

```json
{
  "add_user": [ 
      {
         "user": "sei1...",
         "lock_amount": "20_000_000_000_000",
         "replace": false
      }
   ]
}
```

<table><thead><tr><th width="187">Key</th><th width="206">Type</th><th>Description</th></tr></thead><tbody><tr><td>add_user</td><td>Vec&#x3C;AddUserMsg></td><td>List of AddUserMsg</td></tr><tr><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

<table><thead><tr><th width="183">Key</th><th width="146">Type</th><th>Description</th></tr></thead><tbody><tr><td>user</td><td>Addr</td><td>The address of the user to be added</td></tr><tr><td>lock_amount</td><td>Uint256</td><td>The amount of tokens to be locked</td></tr><tr><td>replace</td><td>bool</td><td>Whether to replace the existing user with the same address (default: false)</td></tr></tbody></table>

### UserRegret

```rust
#[cw_serde]
pub enum ExecuteMsg {
    UserRegret {},
}
```

```json
{
  "user_regret": {}
}
```

### UserClaim

```rust
#[cw_serde]
pub enum ExecuteMsg {
    UserClaim {},
}
```

```json
{
  "user_claim": {}
}
```

### RegretClaim

```rust
#[cw_serde]
pub enum ExecuteMsg {
    RegretClaim {},
}
```

```json
{
  "regret_claim": {}
}
```

## QueryMsg

### QueryGlobalConfig

```rust
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
    #[returns(GlobalInfosResponse)]
    QueryGlobalConfig {},
}
```

```json
{
  "query_global_config": {}
}
```

### GlobalInfosResponse

```rust
#[cw_serde]
pub struct GlobalInfosResponse {
    pub config: GlobalConfig,
    pub state: GlobalState,
}

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct GlobalConfig {
    pub gov: Addr,
    pub claim_token: Addr,
    pub total_lock_amount: Uint256,
    pub start_lock_period_time: u64,
    pub duration_per_period: u64,
    pub periods: u64,
}

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct GlobalState {
    pub total_user_lock_amount: Uint256,
    pub total_user_claimed_lock_amount: Uint256,
}
```

```json
{
  "config": {},
  "state": {}
}
```

<table><thead><tr><th width="165">Key</th><th width="183">Type</th><th>Description</th></tr></thead><tbody><tr><td>config</td><td>GlobalConfig</td><td>Configuration in the GlobalConfig struct</td></tr><tr><td>state</td><td>GlobalState</td><td>Station in the GlobalState struct</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

<table><thead><tr><th width="222">Key</th><th width="156">Type</th><th>Description</th></tr></thead><tbody><tr><td>gov</td><td>Addr</td><td>The address of the governance contract</td></tr><tr><td>claim_token</td><td>Addr</td><td>The address of the token contract to be claimed</td></tr><tr><td>total_lock_amount</td><td>Uint256</td><td>The total amount of tokens to be locked</td></tr><tr><td>start_lock_period_time</td><td>u64</td><td>The start time of the lock period</td></tr><tr><td>duration_per_period</td><td>u64</td><td>The duration of each lock period</td></tr><tr><td>periods</td><td>u64</td><td>The number of lock periods</td></tr></tbody></table>

<table><thead><tr><th width="295">Key</th><th width="161">Type</th><th>Description</th></tr></thead><tbody><tr><td>total_user_lock_amount</td><td>Uint256</td><td>The total amount of tokens to be locked by all users</td></tr><tr><td>total_user_claimed_lock_amount</td><td>Uint256</td><td>The total amount of tokens to be locked by all users that have been claimed</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### QueryUserInfo

```rust
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
    #[returns(UserInfoResponse)]
    QueryUserInfo { user: Addr },
}
```

```json
{
  "query_user_info": {
    "user": "sei1..."
  }
}
```

### UserInfoResponse

```rust
#[cw_serde]
pub struct UserInfoResponse {
    pub state: UserState,
    pub current_period: u64,
    pub claimable_lock_amount: Uint256,
}

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct UserState {
    pub user: Addr,
    pub total_user_lock_amount: Uint256,

    pub claimed_lock_amount: Uint256,

    pub last_claimed_period: u64,
    pub user_per_lock_amount: Uint256,

}
```

```json
{
  "state": {
      "user": "sei1...",
      "total_user_lock_amount": "20_000_000_000_000",
      "claimed_lock_amount": "0",
      "last_claimed_period": "0",
      "user_per_lock_amount": "0"
   },
  "current_period": "0",
  "claimable_lock_amount": "0"
}
```

<table><thead><tr><th width="223">Key</th><th width="174">Type</th><th>Description</th></tr></thead><tbody><tr><td>state</td><td>UserState</td><td>The user state</td></tr><tr><td>current_period</td><td>u64</td><td>The current lock period</td></tr><tr><td>claimable_lock_amount</td><td>Uint256</td><td>The amount of tokens that can be claimed by the user in the current period</td></tr></tbody></table>

<table><thead><tr><th width="223">Key</th><th width="180">Type</th><th>Description</th></tr></thead><tbody><tr><td>user</td><td>Addr</td><td>The address of the user</td></tr><tr><td>total_user_lock_amount</td><td>Uint256</td><td>The total amount of tokens to be locked by the user</td></tr><tr><td>claimed_lock_amount</td><td>Uint256</td><td>The total amount of tokens to be locked by the user that have been claimed</td></tr><tr><td>last_claimed_period</td><td>u64</td><td>The last claimed lock period</td></tr><tr><td>user_per_lock_amount</td><td>Uint256</td><td>The amount of tokens to be locked by the user per lock period</td></tr></tbody></table>

### QueryUserInfos

```rust
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
    #[returns(Vec < UserInfoResponse >)]
    QueryUserInfos {
        start_after: Option<Addr>,
        limit: Option<u32>,
    },
}
```

```json
{
  "query_user_infos": {
    "start_after": "sei1...",
    "limit": 10
  }
}
```

<table><thead><tr><th width="161">Key</th><th width="196">Type</th><th>Description</th></tr></thead><tbody><tr><td>start_after*</td><td>Addr</td><td>The address of the user to start after</td></tr><tr><td>limit*</td><td>u32</td><td>The maximum number of users to return</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

\* = optional


# Distribute

The SEILOR token allocation contract includes a linear release of locks and warehouses, including Community Offering Liquidity, MM, Incentives, Mining Rewards, Team, and Partners & Advisors.

## Config

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct DistributeConfig {
    pub gov: Addr,
    pub total_amount: u128,
    pub distribute_token: Addr,
    pub rules_total_amount: u128,
    pub new_gov: Option<Addr>,
    pub distribute_ve_token: Addr,
    pub token_cap: Option<Uint128>,
}
```

<table><thead><tr><th width="226">Key</th><th width="163">Type</th><th>Description</th></tr></thead><tbody><tr><td>gov</td><td>Addr</td><td>The address of the governance contract</td></tr><tr><td>total_amount</td><td>u128</td><td>Total amount of SEILOR</td></tr><tr><td>distribute_token</td><td>Addr</td><td>Token address to be distributed</td></tr><tr><td>rules_total_amount</td><td>u128</td><td>Total amount of rules</td></tr><tr><td>new_gov</td><td>Addr</td><td>New Governance  address</td></tr><tr><td>distribute_ve_token</td><td>Addr</td><td>veToken address to be distributed</td></tr><tr><td>token_cap</td><td>Uint128</td><td>Token amount limit</td></tr></tbody></table>

## InitMsg

```rust
#[cw_serde]
pub struct InstantiateMsg {
    pub gov: Option<Addr>,
    pub total_amount: u128,
    pub distribute_token: Addr,
    pub rule_configs_map: HashMap<String, RuleConfigMsg>,
}

#[cw_serde]
pub struct RuleConfigMsg {
    pub rule_name: String,
    pub rule_owner: Addr,
    pub rule_total_amount: u128,
    pub start_release_amount: u128,
    pub lock_start_time: u64,
    pub lock_end_time: u64,
    pub start_linear_release_time: u64,
    pub unlock_linear_release_amount: u128,
    pub unlock_linear_release_time: u64,
}
```

```json
{
  "gov": "sei1...",
  "total_amount": "1000000000000",
  "distribute_token": "sei1...",
  "rule_configs_map": {
    "key": {
             "rule_name": "Test",
             "rule_owner": "sei1...",
             "rule_total_amount": "1000000000000",
             "start_release_amount": "0",
             "lock_start_time": "175052201",
             "lock_end_time": "185052201",
             "start_linear_release_time": "175052201",
             "unlock_linear_release_amount": "185052201",
             "unlock_linear_release_time": "185052201"
         }
  }
}
```

<table><thead><tr><th width="188">Key</th><th width="292">Type</th><th>Description</th></tr></thead><tbody><tr><td>gov*</td><td>Addr</td><td>Governance contract address</td></tr><tr><td>total_amount</td><td>u128</td><td>Total amount of SEILOR</td></tr><tr><td>distribute_token</td><td>Addr</td><td>Token address to be distributed</td></tr><tr><td>rule_configs_map</td><td>HashMap&#x3C;String, RuleConfigMsg></td><td>Rule configuration map</td></tr></tbody></table>

<table><thead><tr><th width="284">Key</th><th width="199">Type</th><th>Description</th></tr></thead><tbody><tr><td>rule_name</td><td>String</td><td>Rule name</td></tr><tr><td>rule_owner</td><td>Addr</td><td>Rule owner</td></tr><tr><td>rule_total_amount</td><td>u128</td><td>Rule total amount</td></tr><tr><td>start_release_amount</td><td>u128</td><td>Start release amount</td></tr><tr><td>lock_start_time</td><td>u64</td><td>Lock start time</td></tr><tr><td>lock_end_time</td><td>u64</td><td>Lock end time</td></tr><tr><td>start_linear_release_time</td><td>u64</td><td>Start linear release time</td></tr><tr><td>unlock_linear_release_amount</td><td>u128</td><td>Unlock linear release amount</td></tr><tr><td>unlock_linear_release_time</td><td>u64</td><td>Unlock linear release time</td></tr></tbody></table>

## ExecuteMsg

### Claim

Claim the vested SEILOR tokens.

```rust
#[cw_serde]
pub enum ExecuteMsg {
    Claim {
        rule_type: String,
        msg: Option<Binary>,
    },
}
```

```json
{
  "claim": {
    "rule_type": "String",
    "msg": "Binary"
  }
}
```

<table><thead><tr><th width="167">Key</th><th width="191">Type</th><th>Description</th></tr></thead><tbody><tr><td>rule_type</td><td>String</td><td>Rule type</td></tr><tr><td>msg*</td><td>Binary</td><td>Message</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

\* = optional

### UpdateConfig

Update the configuration of the contract.

```rust
#[cw_serde]
pub enum ExecuteMsg {
    UpdateConfig {
        gov: Option<Addr>,
        distribute_token: Option<Addr>,
    },
}
```

```json
{
  "update_config": {
    "gov": "Addr",
    "distribute_token": "Addr"
  }
}
```

<table><thead><tr><th width="195">Key</th><th width="175">Type</th><th>Description</th></tr></thead><tbody><tr><td>gov*</td><td>Addr</td><td>Governance contract address</td></tr><tr><td>distribute_token*</td><td>Addr</td><td>Token address to be distributed</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

\* = optional

### UpdateRuleConfig

Update the configuration of the rule.

```rust
#[cw_serde]
pub enum ExecuteMsg {
    UpdateRuleConfig {
        update_rule_msg: UpdateRuleConfigMsg,
    },
}

#[cw_serde]
pub struct UpdateRuleConfigMsg {
    pub rule_type: String,
    pub rule_name: Option<String>,
    pub rule_owner: Option<Addr>,
}
```

<pre class="language-json"><code class="lang-json">{
  "update_rule_config": {
    "update_rule_msg": {
         "rule_type": "String",
         "rule_name": "String",
         "rule_owner": "Addr"
<strong>      }
</strong><strong>   }
</strong>}
</code></pre>

<table><thead><tr><th width="196">Key</th><th width="202">Type</th><th>Description</th></tr></thead><tbody><tr><td>update_rule_msg</td><td>UpdateRuleConfigMsg</td><td></td></tr></tbody></table>

<table><thead><tr><th width="198">Key</th><th width="204"></th><th></th></tr></thead><tbody><tr><td>rule_type</td><td>String</td><td>Rule type</td></tr><tr><td>rule_name*</td><td>String</td><td>Rule name</td></tr><tr><td>rule_owner*</td><td>Addr</td><td>Rule owner</td></tr></tbody></table>

\* = optional

### AddRuleConfig

```rust
#[cw_serde]
pub enum ExecuteMsg {
    AddRuleConfig {
        rule_type: String,
        rule_msg: RuleConfigMsg,
    },
}

#[cw_serde]
pub struct RuleConfigMsg {
    pub rule_name: String,
    pub rule_owner: Addr,
    pub rule_total_amount: u128,
    pub start_release_amount: u128,
    pub lock_start_time: u64,
    pub lock_end_time: u64,
    pub start_linear_release_time: u64,
    pub unlock_linear_release_amount: u128,
    pub unlock_linear_release_time: u64,
}
```

<pre class="language-json"><code class="lang-json">{
  "add_rule_config": {
     "rule_type": "String",
     "rule_msg": {
        "rule_name": "String",
        "rule_owner": "Addr",
        "rule_total_amount": "u128",
        "start_release_amount": "u128",
        "lock_start_time": "u64",
        "lock_end_time": "u64",
        "start_linear_release_time": "u64",
        "unlock_linear_release_amount": "u128",
        "unlock_linear_release_time": "u64"
    }
  }
<strong>}
</strong></code></pre>

<table><thead><tr><th width="192">Key</th><th width="176">Type</th><th>Description</th></tr></thead><tbody><tr><td>rule_type</td><td>String</td><td>Rule type</td></tr><tr><td>rule_msg*</td><td>RuleConfigMsg</td><td>Rule config</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

<table><thead><tr><th width="279">Key</th><th width="181">Type</th><th>Description</th></tr></thead><tbody><tr><td>rule_name</td><td>String</td><td>Rule name</td></tr><tr><td>rule_owner</td><td>Addr</td><td>Rule owner</td></tr><tr><td>rule_total_amount</td><td>u128</td><td>Rule total amount</td></tr><tr><td>start_release_amount</td><td>u128</td><td>Start release amount</td></tr><tr><td>lock_start_time</td><td>u64</td><td>Lock start time</td></tr><tr><td>lock_end_time</td><td>u64</td><td>Lock end time</td></tr><tr><td>start_linear_release_time</td><td>u64</td><td>Start linear release time</td></tr><tr><td>unlock_linear_release_amount</td><td>u128</td><td>Unlock linear release amount</td></tr><tr><td>unlock_linear_release_time</td><td>u64</td><td>Unlock linear release time</td></tr></tbody></table>

## QueryMsg

### QueryClaimableInfo&#x20;

Query the claimable info.

```rust
#[cw_serde]
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
    #[returns(QueryClaimableInfoResponse)]
    QueryClaimableInfo { rule_type: String },
}
```

```json
{
  "query_claimable_info": {
    "rule_type": "String"
  }
}
```

<table><thead><tr><th width="184">Key</th><th width="148">Type</th><th>Description</th></tr></thead><tbody><tr><td>rule_type</td><td>String</td><td>Rule type</td></tr><tr><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### QueryClaimableInfoResponse&#x20;

```rust
#[cw_serde]
pub struct QueryClaimableInfoResponse {
    pub can_claim_amount: u128,
    pub release_amount: u128,
    pub linear_release_amount: u128,
}
```

```json
{
  "can_claim_amount": "u128",
  "release_amount": "u128",
  "linear_release_amount": "u128"
}
```

<table><thead><tr><th width="233">Key</th><th width="107">Type</th><th>Description</th></tr></thead><tbody><tr><td>can_claim_amount</td><td>u128</td><td>Can claim amount</td></tr><tr><td>release_amount</td><td>u128</td><td>Release amount</td></tr><tr><td>linear_release_amount</td><td>u128</td><td>Linear release amount</td></tr></tbody></table>

### QueryRuleInfo&#x20;

Query the rule info.

```rust
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
    #[returns(QueryRuleInfoResponse)]
    QueryRuleInfo { rule_type: String },
}
```

```json
{
  "query_rule_info": {
    "rule_type": "String"
  }
}
```

<table><thead><tr><th width="162">Key</th><th width="174">Type</th><th>Description</th></tr></thead><tbody><tr><td>rule_type</td><td>String</td><td>Rule type</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### QueryRuleInfoResponse&#x20;

```rust
#[cw_serde]
pub struct QueryRuleInfoResponse {
    pub rule_config: RuleConfig,
    pub rule_config_state: RuleConfigState,
}

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct RuleConfig {
    pub rule_name: String,
    pub rule_owner: Addr,
    pub rule_total_amount: u128,
    pub start_release_amount: u128,
    pub lock_start_time: u64,
    pub lock_end_time: u64,
    pub start_linear_release_time: u64,
    pub end_linear_release_time: u64,
    pub unlock_linear_release_amount: u128,
    pub unlock_linear_release_time: u64,
    pub linear_release_per_second: u128,
}

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct RuleConfigState {
    pub is_start_release: bool,
    pub released_amount: u128,
    pub claimed_amount: u128,
    pub last_claim_linear_release_time: u64,
}

```

```json
{
  "rule_config": {
       "rule_name": "String",
       "rule_owner": "Addr",
       "rule_total_amount": "u128",
       "start_release_amount": "u128",
       "lock_start_time": "u64",
       "lock_end_time": "u64",
       "start_linear_release_time": "u64",
       "end_linear_release_time": "u64",
       "unlock_linear_release_amount": "u128",
       "unlock_linear_release_time": "u64",
       "linear_release_per_second": "u128"
   },
  "rule_config_state": {
       "is_start_release": "bool",
       "released_amount": "u128",
       "claimed_amount": "u128",
       "last_claim_linear_release_time": "u64"
    }
}
```

<table><thead><tr><th width="184">Key</th><th width="182">Type</th><th>Description</th></tr></thead><tbody><tr><td>rule_config</td><td>RuleConfig</td><td>Rule config</td></tr><tr><td>rule_config_type</td><td>RuleConfigType</td><td>Rule config type</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

<table><thead><tr><th width="271">Key</th><th width="112">Type</th><th>Description</th></tr></thead><tbody><tr><td>rule_name</td><td>String</td><td>Rule name</td></tr><tr><td>rule_owner</td><td>Addr</td><td>Rule owner</td></tr><tr><td>rule_total_amount</td><td>u128</td><td>Rule total amount</td></tr><tr><td>start_release_amount</td><td>u128</td><td>Start release amount</td></tr><tr><td>lock_start_time</td><td>u64</td><td>Lock start time</td></tr><tr><td>lock_end_time</td><td>u64</td><td>Lock end time</td></tr><tr><td>start_linear_release_time</td><td>u64</td><td>Start linear release time</td></tr><tr><td>end_linear_release_time</td><td>u64</td><td>End linear release time</td></tr><tr><td>unlock_linear_release_amount</td><td>u128</td><td>Unlock linear release amount</td></tr><tr><td>unlock_linear_release_time</td><td>u64</td><td>Unlock linear release time</td></tr><tr><td>linear_release_per_second</td><td>u128</td><td>Linear release per second</td></tr></tbody></table>

<table><thead><tr><th width="275">Key</th><th width="149">Type</th><th>Description</th></tr></thead><tbody><tr><td>is_start_release</td><td>bool</td><td>Is start release</td></tr><tr><td>released_amount</td><td>u128</td><td>Released amount</td></tr><tr><td>claimed_amount</td><td>u128</td><td>Claimed amount</td></tr><tr><td>last_claim_linear_release_time</td><td>u64</td><td>Last claim linear release time</td></tr></tbody></table>

### QueryConfig

Query the configuration of the distribute contract.

```rust
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
    #[returns(QueryConfigResponse)]
    QueryConfig {},
}

#[cw_serde]
pub struct QueryConfigResponse {
    pub gov: Addr,
    pub total_amount: u128,
    pub distribute_token: Addr,
    pub distribute_ve_token: Addr,
    pub rules_total_amount: u128,
    pub token_cap: Option<Uint128>,
    pub new_gov: Option<Addr>,
}

```

```json
{
  "gov": "Addr",
  "total_amount": "u128",
  "distribute_token": "Addr",
  "rules_total_amount": "u128"
}
```

<table><thead><tr><th width="230">Key</th><th width="132">Type</th><th>Description</th></tr></thead><tbody><tr><td>gov</td><td>Addr</td><td>Governance contract address</td></tr><tr><td>total_amount</td><td>u128</td><td>Total amount of SEILOR</td></tr><tr><td>distribute_token</td><td>Addr</td><td>Token address to be distributed</td></tr><tr><td>distribute_ve_token</td><td>Addr</td><td>veToken address to be distributed</td></tr><tr><td>rules_total_amount</td><td>u128</td><td>Total amount of rules</td></tr><tr><td>token_cap*</td><td>Uint128</td><td>Token amount limit</td></tr><tr><td>new_gov*</td><td>Addr</td><td>New governance contract address</td></tr></tbody></table>

\* = optional


# Fund

The Fund is a derivative version of Synthetix Staking Rewards, distributing protocol revenue to veSEILOR stakers.

## Config

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct FundConfig {
    pub gov: Addr,
    pub ve_seilor_addr: Addr,
    pub seilor_addr: Addr,
    pub kusd_denom: String,
    pub kusd_reward_addr: Addr,
    pub kusd_reward_total_amount: Uint128,
    pub kusd_reward_total_paid_amount: Uint128,
    // Sum of (reward rate * dt * 1e18 / total supply)
    pub reward_per_token_stored: Uint128,
    // uint256 immutable exitCycle = 30 days;
    pub exit_cycle: Uint64,
    // uint256 public claimAbleTime;
    pub claim_able_time: Uint64,
    pub new_gov: Option<Addr>,
    pub token_cap: Option<Uint128>,
}
```

<table><thead><tr><th width="294">Key</th><th width="120">Type</th><th>Description</th></tr></thead><tbody><tr><td>gov</td><td>Addr</td><td>The address of the governance contract</td></tr><tr><td>ve_seilor_addr</td><td>Addr</td><td>The address of the veSEILOR contract</td></tr><tr><td>seilor_addr</td><td>Addr</td><td>The address of SEILOR token contract</td></tr><tr><td>kusd_denom</td><td>String</td><td>Stablecoin kUSD denomination</td></tr><tr><td>kusd_reward_addr</td><td>Addr</td><td>The address of the token contract for kUSD rewards</td></tr><tr><td>kusd_reward_total_amount</td><td>Uint128</td><td>The total amount of kUSD rewards</td></tr><tr><td>kusd_reward_total_paid_amount</td><td>Uint128</td><td>The total amount of kUSD rewards paid</td></tr><tr><td>reward_per_token_stored</td><td>Uint128</td><td>Reward per token stored</td></tr><tr><td>exit_cycle</td><td>Uint64</td><td>Exit cycle</td></tr><tr><td>claim_able_time</td><td>Uint64</td><td>Claim able time</td></tr><tr><td>new_gov</td><td>Addr</td><td>The address of the new governance contract</td></tr><tr><td>token_cap</td><td>Uint128</td><td>Token amount limit</td></tr></tbody></table>

## InitMsg

### InstantiateMsg

```rust
#[cw_serde]
pub struct InstantiateMsg {
    pub gov: Option<Addr>,
    pub ve_seilor_addr: Addr,
    pub seilor_addr: Addr,
    pub kusd_denom: String,
    pub kusd_reward_addr: Addr,
    pub exit_cycle: Uint64,
    pub claim_able_time: Uint64,
}
```

```json
{
  "gov": "sei1...",
  "ve_seilor_addr": "sei1...",
  "seilor_addr": "sei1...",
  "kusd_denom": "factor/sei1.../KUSD",
  "kusd_reward_addr": "sei2...",
  "exit_cycle": "2592000",
  "claim_able_time": "1687190400"
}
```

<table><thead><tr><th width="207">Key</th><th width="205">Type</th><th>Description</th></tr></thead><tbody><tr><td>gov</td><td>Addr</td><td>The address of the governance contract</td></tr><tr><td>ve_seilor_addr</td><td>Addr</td><td>The address of the veSEILOR contract</td></tr><tr><td>seilor_addr</td><td>Addr</td><td>The address of SEILOR token contract</td></tr><tr><td>kusd_denom</td><td>String</td><td>Stablecoin kUSD denomination</td></tr><tr><td>kusd_reward_addr</td><td>Addr</td><td>The address of the token contract for kUSD rewards</td></tr><tr><td>exit_cycle</td><td>Uint64</td><td>Exit cycle</td></tr><tr><td>claim_able_time</td><td>Uint64</td><td>Claim able time</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

## ExecuteMsg

### UpdateFundConfig

```rust
#[cw_serde]
pub enum ExecuteMsg {
    UpdateFundConfig { update_config_msg: UpdateConfigMsg },
}

#[cw_serde]
pub struct UpdateConfigMsg {
    pub gov: Option<Addr>,
    pub ve_seilor_addr: Option<Addr>,
    pub seilor_addr: Option<Addr>,
    pub kusd_denom: Option<String>,
    pub kusd_reward_addr: Option<Addr>,
    pub claim_able_time: Option<Uint64>,
}
```

```json
{
  "update_fund_config":
   {
      "update_config_msg": 
      {
         "gov": "sei1...",
         "ve_seilor_addr": "sei1...",
         "seilor_addr": "sei1...",
         "kusd_denom": "factor/sei1.../KUSD",
         "kusd_reward_addr": "sei2...",
         "claim_able_time": "1687190400"
      }
   }
}
```

<table><thead><tr><th width="236">Key</th><th width="202">Type</th><th>Description</th></tr></thead><tbody><tr><td>update_fund_config</td><td>UpdateConfigMsg</td><td>Fund contract configuration structure</td></tr><tr><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

<table><thead><tr><th width="235">Key</th><th width="205">Type</th><th>Description</th></tr></thead><tbody><tr><td>gov*</td><td>Addr</td><td>The address of the governance contract</td></tr><tr><td>ve_seilor_addr*</td><td>Addr</td><td>The address of the veSEILOR contract</td></tr><tr><td>seilor_addr*</td><td>Addr</td><td>The address of SEILOR token contract</td></tr><tr><td>kusd_denom*</td><td>String</td><td>Stablecoin kUSD denomination</td></tr><tr><td>kusd_reward_addr*</td><td>Addr</td><td>The address of the token contract for kUSD rewards</td></tr><tr><td>claim_able_time*</td><td>Uint64</td><td>Claim able time</td></tr></tbody></table>

### RefreshReward

Update user reward.

```rust
#[cw_serde]
pub enum ExecuteMsg {
    RefreshReward { account: Addr },
}
```

```json
{
  "refresh_reward": {
    "account": "sei1..."
  }
}
```

<table><thead><tr><th width="170">Key</th><th width="185">Type</th><th>Description</th></tr></thead><tbody><tr><td>account</td><td>Addr</td><td>The user's address</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### Stake

Stake SEILOR.

```rust
#[cw_serde]
pub enum ExecuteMsg {
    Stake { amount: Uint128 },
}
```

```json
{
  "stake": {
    "amount": "1000000000000000000"
  }
}
```

<table><thead><tr><th width="169">Key</th><th width="199">Type</th><th>Description</th></tr></thead><tbody><tr><td>amount</td><td>Uint128</td><td>The amount of SEILOR to stake</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### Withdraw

```rust
#[cw_serde]
pub enum ExecuteMsg {
    Withdraw { amount: Uint128 },
}
```

```json
{
  "withdraw": {
    "amount": "1000000000000000000"
  }
}
```

<table><thead><tr><th width="177">Key</th><th width="193">Type</th><th>Description</th></tr></thead><tbody><tr><td>amount</td><td>Uint128</td><td>The amount of SEILOR to withdraw</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### ReStake

```rust
#[cw_serde]
pub enum ExecuteMsg {
    ReStake {},
}
```

```
{
  "re_stake": {}
}
```

### GetReward

```rust
#[cw_serde]
pub enum ExecuteMsg {
    GetReward {},
}
```

```json
{
  "get_reward": {}
}
```

### NotifyRewardAmount

```rust
#[cw_serde]
pub enum ExecuteMsg {
    NotifyRewardAmount { reward: Uint128 },
}
```

```json
{
  "notify_reward_amount": {
    "reward": "1000000000000000000"
  }
}
```

### SetVeFundMinter

```rust
#[cw_serde]
pub enum ExecuteMsg {
    SetVeFundMinter {
        minter: Addr,
        is_ve_minter: bool,
    },
}
```

```json
{
  "set_ve_fund_minter": {
    "minter": "sei1...",
    "is_ve_minter": true
  }
}
```

<table><thead><tr><th width="174">Key</th><th width="205">Type</th><th>Description</th></tr></thead><tbody><tr><td>minter</td><td>Addr</td><td>The minter's address</td></tr><tr><td>is_ve_minter</td><td>bool</td><td>Whether the user is a ve-minter</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### VeFundMint

```rust
#[cw_serde]
pub enum ExecuteMsg {
    VeFundMint {
        user: Addr,
        amount: Uint128,
    },
}
```

```json
{
  "ve_fund_mint": {
    "user": "sei1...",
    "amount": "1000000000000000000"
  }
}
```

<table><thead><tr><th width="168">Key</th><th width="213">Type</th><th>Description</th></tr></thead><tbody><tr><td>user</td><td>Addr</td><td>The user's address</td></tr><tr><td>amout</td><td>Uint128</td><td>mint amount</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

## QueryMsg

### FundConfig

```rust
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
    #[returns(FundConfigResponse)]
    FundConfig {},
}
```

```
{
  "fund_config": {}
}
```

### FundConfigResponse

```rust
#[cw_serde]
pub struct FundConfigResponse {
    pub gov: Addr,
    pub ve_seilor_addr: Addr,
    pub seilor_addr: Addr,
    pub kusd_denom: String,
    pub kusd_reward_addr: Addr,
    pub kusd_reward_total_amount: Uint128,
    pub kusd_reward_total_paid_amount: Uint128,
    // Sum of (reward rate * dt * 1e18 / total supply)
    pub reward_per_token_stored: Uint128,
    // uint256 immutable exitCycle = 30 days;
    pub exit_cycle: Uint64,
    // uint256 public claimAbleTime;
    pub claim_able_time: Uint64,
}
```

```json
{
  "gov": "sei1...",
  "ve_seilor_addr": "sei1...",
  "seilor_addr": "sei1...",
  "kusd_denom": "factor/sei1.../kUSD",
  "kusd_reward_addr": "sei2...",
  "kusd_reward_total_amount": "1000000000000000000",
  "kusd_reward_total_paid_amount": "1000000000000000000",
  "reward_per_token_stored": "1000000000000000000",
  "exit_cycle": "2592000",
  "claim_able_time": "1687190400"
}
```

<table><thead><tr><th width="297">Key</th><th width="95">Type</th><th>Description</th></tr></thead><tbody><tr><td>gov</td><td>Addr</td><td>The address of the governance contract</td></tr><tr><td>ve_seilor_addr</td><td>Addr</td><td>The address of the veSEILOR contract</td></tr><tr><td>seilor_addr</td><td>Addr</td><td>The address of SEILOR token contract</td></tr><tr><td>kusd_denom</td><td>String</td><td>Stablecoin kUSD denomination</td></tr><tr><td>kusd_reward_addr</td><td>Addr</td><td>The address of the token contract for kUSD rewards</td></tr><tr><td>kusd_reward_total_amount</td><td>Uint128</td><td>The total amount of kUSD rewards</td></tr><tr><td>kusd_reward_total_paid_amount</td><td>Uint128</td><td>The total amount of kUSD rewards paid</td></tr><tr><td>reward_per_token_stored</td><td>Uint128</td><td>Reward per token stored</td></tr><tr><td>exit_cycle</td><td>Uint64</td><td>Exit cycle</td></tr><tr><td>claim_able_time</td><td>Uint64</td><td>Claim able time</td></tr></tbody></table>

### GetClaimAbleSeilor

```rust
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
    #[returns(GetClaimAbleSeilorResponse)]
    GetClaimAbleSeilor { user: Addr },
}
```

```json
{
  "get_claim_able_seilor": {
    "user": "sei1..."
  }
}
```

<table><thead><tr><th width="218">Key</th><th width="178">Type</th><th>Description</th></tr></thead><tbody><tr><td>user</td><td>Addr</td><td>The user's address</td></tr><tr><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### GetClaimAbleSeilorResponse&#x20;

```rust
#[cw_serde]
pub struct GetClaimAbleSeilorResponse {
    pub amount: Uint128,
}
```

```json
{
  "amount": "1000000000000000000"
}
```

<table><thead><tr><th width="195">Key</th><th width="194">Type</th><th>Description</th></tr></thead><tbody><tr><td>amount</td><td>Uint128</td><td>The amount of SEILOR that can be claimed</td></tr><tr><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### GetReservedSeilorForVesting

```rust
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
    #[returns(GetReservedSeilorForVestingResponse)]
    GetReservedSeilorForVesting { user: Addr },
}
```

```json
{
  "get_reserved_seilor_for_vesting": {
    "user": "sei1..."
  }
}
```

<table><thead><tr><th width="184">Key</th><th width="224">Type</th><th>Description</th></tr></thead><tbody><tr><td>user</td><td>Addr</td><td>The user's address</td></tr><tr><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### GetReservedSeilorForVestingResponse&#x20;

```rust
#[cw_serde]
pub struct GetReservedSeilorForVestingResponse {
    pub amount: Uint128,
}
```

```rust
{
  "amount": "1000000000000000000"
}
```

<table><thead><tr><th width="132">Key</th><th width="125">Type</th><th>Description</th></tr></thead><tbody><tr><td>amount</td><td>Unit128</td><td>The remaining amount of veSEILOR that is vested for the user</td></tr><tr><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### Earned&#x20;

```rust
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
    #[returns(EarnedResponse)]
    Earned { account: Addr },
}
```

```json
{
  "earned": {
    "account": "sei1..."
  }
}
```

<table><thead><tr><th width="184">Key</th><th width="224">Type</th><th>Description</th></tr></thead><tbody><tr><td>account</td><td>Addr</td><td>The user's address</td></tr><tr><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### EarnedResponse

```rust
#[cw_serde]
pub struct EarnedResponse {
    pub amount: Uint128,
}
```

```json
{
  "amount": "1000000000000000000"
}
```

<table><thead><tr><th width="132">Key</th><th width="125">Type</th><th>Description</th></tr></thead><tbody><tr><td>amount</td><td>Unit128</td><td>The amount of veSEILOR that is earned by the user</td></tr><tr><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### GetClaimAbleKusd&#x20;

```rust
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
    #[returns(GetClaimAbleKusdResponse)]
    GetClaimAbleKusd { account: Addr },
}
```

```json
{
  "get_claim_able_kusd": {
    "account": "sei1..."
  }
}
```

<table><thead><tr><th width="167">Key</th><th width="196">Type</th><th>Description</th></tr></thead><tbody><tr><td>account</td><td>Addr</td><td>The user's address</td></tr><tr><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### GetClaimAbleKusdResponse&#x20;

```rust
#[cw_serde]
pub struct GetClaimAbleKusdResponse {
    pub amount: Uint128,
}
```

```json
{
  "amount": "1000000000000000000"
}
```

<table><thead><tr><th width="172">Key</th><th width="187">Type</th><th>Description</th></tr></thead><tbody><tr><td>amount</td><td>Uint128</td><td>The amount of kUSD that the user is able to claim</td></tr><tr><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### GetUserRewardPerTokenPaid&#x20;

```rust
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
    #[returns(UserRewardPerTokenPaidResponse)]
    GetUserRewardPerTokenPaid { account: Addr },
}
```

```json
{
  "get_user_reward_per_token_paid": {
    "account": "sei1..."
  }
}
```

<table><thead><tr><th width="185">Key</th><th width="161">Type</th><th>Description</th></tr></thead><tbody><tr><td>account</td><td>Addr</td><td>The user's address</td></tr><tr><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### GetUserRewardPerTokenPaidResponse&#x20;

```rust
#[cw_serde]
pub struct UserRewardPerTokenPaidResponse {
    pub user_reward_per_token_paid: Uint128,
}
```

```json
{
  "user_reward_per_token_paid": "1000000000000000000"
}
```

<table><thead><tr><th width="172">Key</th><th width="187">Type</th><th>Description</th></tr></thead><tbody><tr><td>user_reward_per_token_paid</td><td>Uint128</td><td>The rate of reward allocation per token for the user</td></tr><tr><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### GetUserRewards&#x20;

```rust
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
    #[returns(UserRewardsResponse)]
    GetUserRewards { account: Addr },
}
```

```json
{
  "get_user_rewards": {
    "account": "sei1..."
  }
}
```

<table><thead><tr><th width="185">Key</th><th width="161">Type</th><th>Description</th></tr></thead><tbody><tr><td>account</td><td>Addr</td><td>The user's address</td></tr><tr><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### UserRewardsResponse&#x20;

```rust
#[cw_serde]
pub struct UserRewardsResponse {
    pub user_rewards: Uint128,
}
```

```json
{
  "user_rewards": "1000000000000000000"
}
```

<table><thead><tr><th width="172">Key</th><th width="187">Type</th><th>Description</th></tr></thead><tbody><tr><td>user_rewards</td><td>Uint128</td><td>The amount of rewards that the user is able to claim</td></tr><tr><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### GetUserTime2fullRedemption&#x20;

```rust
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
    #[returns(UserTime2fullRedemptionResponse)]
    GetUserTime2fullRedemption { account: Addr },
}
```

```json
{
  "get_user_time2full_redemption": {
    "account": "sei1..."
  }
}
```

<table><thead><tr><th width="185">Key</th><th width="161">Type</th><th>Description</th></tr></thead><tbody><tr><td>account</td><td>Addr</td><td>The user's address</td></tr><tr><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### UserTime2fullRedemptionResponse&#x20;

```rust
#[cw_serde]
pub struct UserTime2fullRedemptionResponse {
    pub user_time2full_redemption: Uint64,
}
```

```
{
  "user_time2full_redemption": "1000000000000000000"
}
```

<table><thead><tr><th width="250">Key</th><th width="210">Type</th><th>Description</th></tr></thead><tbody><tr><td>user_time2full_redemption</td><td>Uint64</td><td></td></tr><tr><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### GetUserUnstakeRate&#x20;

```rust
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
    #[returns(UserUnstakeRateResponse)]
    GetUserUnstakeRate { account: Addr },
}
```

```json
{
  "get_user_unstake_rate": {
    "account": "sei1..."
  }
}
```

<table><thead><tr><th width="185">Key</th><th width="161">Type</th><th>Description</th></tr></thead><tbody><tr><td>account</td><td>Addr</td><td>The user's address</td></tr><tr><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### UserUnstakeRateResponse&#x20;

```rust
#[cw_serde]
pub struct UserUnstakeRateResponse {
    pub user_unstake_rate: Uint256,
}
```

```
{
  "user_unstake_rate": "1000000000000000000"
}
```

<table><thead><tr><th width="188">Key</th><th width="172">Type</th><th>Description</th></tr></thead><tbody><tr><td>user_unstake_rate</td><td>Uint256</td><td></td></tr><tr><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### GetUserLastWithdrawTime&#x20;

```rust
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
    #[returns(UserLastWithdrawTimeResponse)]
    GetUserLastWithdrawTime { account: Addr },
}
```

```json
{
  "get_user_last_withdraw_time": {
    "account": "sei1..."
  }
}
```

<table><thead><tr><th width="185">Key</th><th width="161">Type</th><th>Description</th></tr></thead><tbody><tr><td>account</td><td>Addr</td><td>The user's address</td></tr><tr><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### UserLastWithdrawTimeResponse&#x20;

```rust
#[cw_serde]
pub struct UserLastWithdrawTimeResponse {
    pub user_last_withdraw_time: Uint64,
}
```

```json
{
  "user_last_withdraw_time": "1000000000000000000"
}
```

<table><thead><tr><th width="243">Key</th><th width="120">Type</th><th>Description</th></tr></thead><tbody><tr><td>user_last_withdraw_time</td><td>Uint64</td><td>The time when the user last withdrew</td></tr><tr><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### IsVeFundMinter&#x20;

```rust
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
    #[returns(bool)]
    IsVeFundMinter { minter: Addr },
}
```

```json
{
  "is_ve_fund_minter": {
    "minter": "sei1..."
  }
}
```

<table><thead><tr><th width="185">Key</th><th width="161">Type</th><th>Description</th></tr></thead><tbody><tr><td>minter</td><td>Addr</td><td>The user's address</td></tr><tr><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

Return true or false.


# Seilor

Kryptonite is an open-source Decentralized Autonomous Organization (DAO) project. It is governed by individuals worldwide who hold its governance token, SEILOR. Through a governance system that includes Executive Voting and Governance Polling, SEILOR holders can influence the protocol's direction. The SEILOR token is the native token of the kryptonite Protocol, providing essential functionalities such as staking, governance, minting, and liquidator rewards. SEILOR is an ERC-20 governance token with a maximum supply of 100,000,000. SEILOR holders manage the kryptonite Protocol and oversee the financial risks associated with kUSD to ensure stability, transparency, and efficiency. The voting weight of SEILOR is proportional to the amount staked by a voter in the voting contract. In other words, the more SEILOR tokens locked in the contract, the greater the voter's decision-making power.

## Config

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct SeilorConfig {
    pub max_supply: u128,
    pub fund: Addr,
    pub gov: Addr,
    pub distribute: Addr,
    pub new_gov: Option<Addr>,
    pub cross_chain_swap_contract: Option<Addr>,
}
```

<table><thead><tr><th width="263">Key</th><th width="124">Type</th><th>Description</th></tr></thead><tbody><tr><td>max_supply</td><td>u128</td><td>SEILOR token max supply</td></tr><tr><td>fund</td><td>Addr</td><td>The address of  <a href="/pages/Cee0W0Awot4wWTDzaYb7">fund</a></td></tr><tr><td>gov</td><td>Addr</td><td>The address of the governance contract</td></tr><tr><td>distribute</td><td>Addr</td><td>The address of <a href="/pages/oISsPHEg5DQCHsGoOQA4">distribute</a></td></tr><tr><td>new_gov*</td><td>Addr</td><td>The address of the new governance contract</td></tr><tr><td>cross_chain_swap_contract*</td><td>Addr</td><td>The address of the cross chain swap contract</td></tr></tbody></table>

\* = optional

## InitMsg

### InstantiateMsg&#x20;

```rust
#[cw_serde]
pub struct InstantiateMsg {
    pub cw20_init_msg: Cw20InstantiateMsg,
    pub max_supply: u128,
    // default msg.sender
    pub gov: Option<Addr>,
}
```

```json
{
  "cw20_init_msg": {
    "name": "Kryptonite",
    "symbol": "SEILOR",
    "decimals": 6,
    "initial_balances": [],
    "mint": null,
    "marketing": null
  },
  "max_supply": "1000000000000000",
  "gov": null
}
```

<table><thead><tr><th width="172">Key</th><th width="203">Type</th><th>Description</th></tr></thead><tbody><tr><td>cw20_init_msg</td><td>Cw20InstantiateMsg</td><td>The cw20 initialization message structure based on the cw20_base library</td></tr><tr><td>max_supply</td><td>u128</td><td>SEILOR token max supply</td></tr><tr><td>gov*</td><td>Addr</td><td>The address of the governance contract</td></tr></tbody></table>

\* = optional

## ExecuteMsg

### UpdateConfig

Updates the configuration of the contract. Can only be issued by the owner.

```rust
#[cw_serde]
pub enum ExecuteMsg {
    UpdateConfig {
        seilor_fund: Option<Addr>,
        gov: Option<Addr>,
        seilor_distribute: Option<Addr>,
    }
}
```

```json
{
  "update_config": {
    "seilor_fund": null,
    "gov": null,
    "seilor_distribute": null
  }
}
```

<table><thead><tr><th width="184">Key</th><th width="140">Type</th><th>Description</th></tr></thead><tbody><tr><td>seilor_fund*</td><td>Addr</td><td>The address of  <a href="/pages/Cee0W0Awot4wWTDzaYb7">fund</a></td></tr><tr><td>gov*</td><td>Addr</td><td>The address of the new governance contract</td></tr><tr><td>seilor_distribute*</td><td>Addr</td><td>The address of <a href="/pages/oISsPHEg5DQCHsGoOQA4">distribute</a></td></tr></tbody></table>

### Mint&#x20;

Only with the "mintable" extension. If authorized, creates amount new tokens and adds to the recipient balance.

```rust
#[cw_serde]
pub enum ExecuteMsg {
    Mint {
        recipient: String,
        amount: Uint128
    }
}
```

```json
{
  "mint": {
    "recipient": "sei...",
    "amount": "100000000000000000000000000"
  }
}
```

<table><thead><tr><th width="171">Key</th><th width="187">Type</th><th>Description</th></tr></thead><tbody><tr><td>recipient</td><td>String</td><td>Recipient's address</td></tr><tr><td>amount</td><td>Uint128</td><td>Amount to be minted</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### Burn&#x20;

Burn is a base message to destroy tokens forever

```rust
#[cw_serde]
pub enum ExecuteMsg {
    Burn {
        amount: Uint128
    }
}
```

```json
{
  "burn": {
    "amount": "100000000000000000000000000"
  }
}
```

<table><thead><tr><th width="166">Key</th><th width="183">Type</th><th>Description</th></tr></thead><tbody><tr><td>amount</td><td>Uint128</td><td>Amount to be burned</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### Transfer

Transfer is a base message to move tokens to another account without triggering actions

```rust
#[cw_serde]
pub enum ExecuteMsg {
    Transfer {
        recipient: String,
        amount: Uint128
    }
}
```

```json
{
  "transfer": {
    "recipient": "sei...",
    "amount": "100000000000000000000000000"
  }
}
```

<table><thead><tr><th width="171">Key</th><th width="187">Type</th><th>Description</th></tr></thead><tbody><tr><td>recipient</td><td>String</td><td>Recipient's address</td></tr><tr><td>amount</td><td>Uint128</td><td>Amount to be transfered</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### Send

Send is a base message to transfer tokens to a contract and trigger an action on the receiving contract.

```rust
#[cw_serde]
pub enum ExecuteMsg {
    Send {
        contract: String,
        amount: Uint128,
        msg: Binary
    }
}
```

```json
{
  "send": {
    "contract": "sei...",
    "amount": "100000000000000000000000000",
    "msg": "eyJh..."
  }
}
```

<table><thead><tr><th width="173">Key</th><th width="141">Type</th><th>Description</th></tr></thead><tbody><tr><td>contract</td><td>String</td><td>The contract to be trigger on action</td></tr><tr><td>amount</td><td>Uint128</td><td>Amount to be transfered</td></tr><tr><td>msg</td><td>Binary</td><td>Message to be sent</td></tr></tbody></table>

### IncreaseAllowance&#x20;

Only with "approval" extension. Allows spender to access an additional amount tokens from the owner's (env.sender) account. If expires is Some(), overwrites current allowance expiration with this one.

```rust
#[cw_serde]
pub enum ExecuteMsg {
    IncreaseAllowance {
        spender: String,
        amount: Uint128,
        expires: Option<Expiration>
    }
}
```

```json
{
  "increase_allowance": {
    "spender": "sei...",
    "amount": "100000000000000000000000000",
    "expires": null
  }
}
```

<table><thead><tr><th width="181">Key</th><th width="208">Type</th><th>Description</th></tr></thead><tbody><tr><td>spender</td><td>String</td><td>The spender's address</td></tr><tr><td>amount</td><td>Uint128</td><td>Amount to increase for allowance</td></tr><tr><td>expires*</td><td>Expiration</td><td>Expiration time</td></tr></tbody></table>

\* = optional

### DecreaseAllowance&#x20;

Only with "approval" extension. Lowers the spender's access of tokens from the owner's (env.sender) account by amount. If expires is Some(), overwrites current allowance expiration with this one.

```rust
#[cw_serde]
pub enum ExecuteMsg {
    DecreaseAllowance {
        spender: String,
        amount: Uint128,
        expires: Option<Expiration>
    }
}
```

```json
{
  "decrease_allowance": {
    "spender": "sei...",
    "amount": "100000000000000000000000000",
    "expires": null
  }
}
```

<table><thead><tr><th width="171">Key</th><th width="190">Type</th><th>Description</th></tr></thead><tbody><tr><td>spender</td><td></td><td>The spender's address</td></tr><tr><td>amount</td><td></td><td>Amount to decrease for allowance</td></tr><tr><td>expires*</td><td></td><td>Expiration time</td></tr></tbody></table>

\* = optional

### TransferFrom

Only with "approval" extension. Transfers amount tokens from owner -> recipient if env.sender has sufficient pre-approval.

```rust
#[cw_serde]
pub enum ExecuteMsg {
    TransferFrom {
        owner: String,
        recipient: String,
        amount: Uint128
    }
}
```

```json
{
  "transfer_from": {
    "owner": "sei...",
    "recipient": "sei...",
    "amount": "100000000000000000000000000"
  }
}
```

<table><thead><tr><th width="186">Key</th><th width="211">Type</th><th>Description</th></tr></thead><tbody><tr><td>owner</td><td>String</td><td>The owner's address</td></tr><tr><td>recipient</td><td>String</td><td>The address of recipient</td></tr><tr><td>amount</td><td>Uint128</td><td>Amount to be transfered</td></tr></tbody></table>

### SendFrom

Only with "approval" extension. Sends amount tokens from owner -> contract if env.sender has sufficient pre-approval.

```rust
#[cw_serde]
pub enum ExecuteMsg {
    SendFrom {
        owner: String,
        contract: String,
        amount: Uint128,
        msg: Binary
    }
}
```

```json
{
  "send_from": {
    "owner": "sei...",
    "contract": "sei...",
    "amount": "100000000000000000000000000",
    "msg": "eyJh..."
  }
}
```

<table><thead><tr><th width="172">Key</th><th width="194">Type</th><th>Description</th></tr></thead><tbody><tr><td>owner</td><td>String</td><td>The owner's address</td></tr><tr><td>contract</td><td>String</td><td>The contract to be trigger on action</td></tr><tr><td>amount</td><td>Uint128</td><td>Amount to be sent</td></tr><tr><td>msg</td><td>Binary</td><td>Message to be sent</td></tr></tbody></table>

### BurnFrom

Only with "approval" extension. Destroys tokens forever.

```rust
#[cw_serde]
pub enum ExecuteMsg {
    BurnFrom {
        owner: String,
        amount: Uint128
    }
}
```

```json
{
  "burn_from": {
    "owner": "sei...",
    "amount": "100000000000000000000000000"
  }
}
```

<table><thead><tr><th width="182">Key</th><th width="188">Type</th><th>Description</th></tr></thead><tbody><tr><td>owner</td><td>String</td><td>The owner's address</td></tr><tr><td>amount</td><td>Uint128</td><td>Amount to be burned</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### UpdateMinter

Only with the "mintable" extension. The current minter may set a new minter. Setting the minter to None will remove the token's minter forever.

```rust
#[cw_serde]
pub enum ExecuteMsg {
    UpdateMinter {
        minter: Option<String>
    }
}
```

```json
{
  "update_minter": {
    "minter": null
  }
}
```

<table><thead><tr><th width="178">Key</th><th width="213">Type</th><th>Description</th></tr></thead><tbody><tr><td>minter*</td><td>String</td><td>The new miner's address</td></tr><tr><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

\* = optional

### UpdateMarketing

Only with the "marketing" extension. If authorized, updates marketing metadata. Setting None/null for any of these will leave it unchanged. Setting Some("") will clear this field on the contract storage

```rust
#[cw_serde]
pub enum ExecuteMsg {
    UpdateMarketing {
        project: Option<String>,
        description: Option<String>,
        marketing: Option<String>,
    }
}
```

```json
{
  "update_marketing": {
    "project": null,
    "description": null,
    "marketing": null
  }
}
```

<table><thead><tr><th width="176">Key</th><th width="158">Type</th><th>Description</th></tr></thead><tbody><tr><td>project*</td><td>String</td><td>Project name</td></tr><tr><td>description*</td><td>String</td><td>Project description</td></tr><tr><td>marketing*</td><td>String</td><td>Marketing URL</td></tr></tbody></table>

\* = optional

### UploadLogo&#x20;

If set as the "marketing" role on the contract, upload a new URL, SVG, or PNG for the token

```rust
#[cw_serde]
pub enum ExecuteMsg {
    UploadLogo {
        logo: String
    }
}
```

```json
{
  "upload_logo": {
    "logo": "https://..."
  }
}
```

<table><thead><tr><th width="168">Key</th><th width="189">Type</th><th>Description</th></tr></thead><tbody><tr><td>logo</td><td>String</td><td>Logo URL</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

## QueryMsg

### SeilorConfig&#x20;

Gets the SEILOR contract configuration.

```rust
#[cw_serde]
pub enum QueryMsg {
    SeilorConfig {}
}
```

```
{
  "seilor_config": {}
}
```

### SeilorConfigResponse&#x20;

```rust
#[cw_serde]
pub struct SeilorConfigResponse {
    pub max_supply: u128,
    pub fund: Addr,
    pub distribute: Addr,
    pub gov: Addr,
}
```

```json
{
  "max_supply": "1000000000000000000000000000",
  "seilor_fund": "sei...",
  "seilor_distribute": "sei...",
  "gov": "sei..."
}
```

<table><thead><tr><th width="181">Key</th><th width="145">Valu</th><th>Description</th></tr></thead><tbody><tr><td>max_supply</td><td>u128</td><td>SEILOR token max supply</td></tr><tr><td>fund</td><td>Addr</td><td>The address of  <a href="/pages/Cee0W0Awot4wWTDzaYb7">fund</a></td></tr><tr><td>distribute</td><td>Addr</td><td>The address of <a href="/pages/oISsPHEg5DQCHsGoOQA4">distribute</a></td></tr><tr><td>gov</td><td>Addr</td><td>The address of the governance contract</td></tr></tbody></table>

### Balance

Returns the current balance of the given address, 0 if unset. Return type: BalanceResponse.

```rust
#[cw_serde]
pub enum QueryMsg {
    Balance {
        address: String
    }
}
```

```json
{
  "balance": {
    "address": "sei..."
  }
}
```

<table><thead><tr><th width="181">Key</th><th width="172">Type</th><th>Description</th></tr></thead><tbody><tr><td>address</td><td>String</td><td>The user's address</td></tr><tr><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### BalanceResponse

```rust
#[cw_serde]
pub struct BalanceResponse {
    pub balance: Uint128,
}
```

```json
{
  "balance": "100000000000000000000000000"
}
```

<table><thead><tr><th width="186">Key</th><th width="242">Type</th><th>Description</th></tr></thead><tbody><tr><td>balance</td><td>Uint128</td><td>The balance of SEILOR tokens for the queried user's address.</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### TokenInfo

Returns metadata on the contract - name, decimals, supply, etc. Return type: TokenInfoResponse

```rust
#[cw_serde]
pub enum QueryMsg {
    TokenInfo {}
}
```

```json
{
  "token_info": {}
}
```

### TokenInfoResponse

```rust
#[cw_serde]
pub struct TokenInfoResponse {
    pub name: String,
    pub symbol: String,
    pub decimals: u8,
    pub total_supply: Uint128,
}
```

```json
{
  "name": "SEILOR",
  "symbol": "SEILOR",
  "decimals": 18,
  "total_supply": "100000000000000000000000000"
}
```

<table><thead><tr><th width="211">Key</th><th width="191">Type</th><th>Description</th></tr></thead><tbody><tr><td>name</td><td>String</td><td>Name</td></tr><tr><td>symbol</td><td>String</td><td>Symbol</td></tr><tr><td>decimals</td><td>u8</td><td>Decimals</td></tr><tr><td>total_supply</td><td>Uint128</td><td>Total supply</td></tr></tbody></table>

### Allowance&#x20;

Only with "allowance" extension. Returns how much spender can use from owner account, 0 if unset. Return type: AllowanceResponse.

```rust
#[cw_serde]
pub enum QueryMsg {
    Allowance {
        owner: String,
        spender: String
    }
}
```

```json
{
  "allowance": {
    "owner": "sei...",
    "spender": "sei..."
  }
}
```

<table><thead><tr><th width="195">Key</th><th width="154">Type</th><th>Description</th></tr></thead><tbody><tr><td>owner</td><td>String</td><td>The owner's address</td></tr><tr><td>spender</td><td>String</td><td>The spender's address</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### AllowanceResponse&#x20;

```rust
#[cw_serde]
pub struct AllowanceResponse {
    pub allowance: Uint128,
    pub expires: Expiration,
}

#[cw_serde]
#[derive(Copy)]
pub enum Expiration {
    /// AtHeight will expire when `env.block.height` >= height
    AtHeight(u64),
    /// AtTime will expire when `env.block.time` >= time
    AtTime(Timestamp),
    /// Never will never expire. Used to express the empty variant
    Never {},
}

```

```json
{
  "allowance": "100000000000000000000000000",
  "expires": {
    "at_height": "0",
    "at_time": "0",
    "never": {}
  }
}
```

<table><thead><tr><th width="173">Key</th><th width="210">Type</th><th>Description</th></tr></thead><tbody><tr><td>allowance</td><td>Uint128</td><td>The amount allowed to be spent by spender</td></tr><tr><td>expires</td><td>Expiration</td><td>Expiration time</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

<table><thead><tr><th width="173">Key</th><th width="213">Type</th><th>Description</th></tr></thead><tbody><tr><td>at_height</td><td>u64</td><td>AtHeight will expire when <code>env.block.height</code> >= height</td></tr><tr><td>at_time</td><td>Timestamp</td><td>AtTime will expire when <code>env.block.time</code> >= time</td></tr><tr><td>never</td><td></td><td>Never will never expire. Used to express the empty variant</td></tr></tbody></table>

### Minter&#x20;

Only with "mintable" extension. Returns who can mint and the hard cap on maximum tokens after minting. Return type: MinterResponse.

```rust
#[cw_serde]
pub enum QueryMsg {
    Minter {}
}
```

```json
{
  "minter": {}
}
```

### MinterResponse

```rust
#[cw_serde]
pub struct MinterResponse {
    pub minter: Addr,
    pub cap: Option<Uint128>,
}
```

```json
{
  "minter": "sei...",
  "cap": "100000000000000000000000000"
}
```

<table><thead><tr><th width="161">Key</th><th width="186">Type</th><th>Description</th></tr></thead><tbody><tr><td>minter</td><td>Addr</td><td>the minter's address</td></tr><tr><td>cap*</td><td>Uint128</td><td>cap is a hard cap on total supply that can be achieved by minting. Note that this refers to total_supply. If None, there is unlimited cap.</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

\* = optional

### MarketingInfo&#x20;

Only with "marketing" extension Returns more metadata on the contract to display in the client:

description, logo, project url, etc. Return type: MarketingInfoResponse.

```rust
#[cw_serde]
pub enum QueryMsg {
    MarketingInfo {}
}
```

```json
{
  "marketing_info": {}
}
```

### MarketingInfoResponse&#x20;

```rust
#[cw_serde]
pub struct MarketingInfoResponse {
    /// A URL pointing to the project behind this token.
    pub project: Option<String>,
    /// A longer description of the token and it's utility. Designed for tooltips or such
    pub description: Option<String>,
    /// A link to the logo, or a comment there is an on-chain logo stored
    pub logo: Option<LogoInfo>,
    /// The address (if any) who can update this data structure
    pub marketing: Option<Addr>,
}
```

```json
{
  "project": "https://...",
  "description": "Ku...",
  "logo": {
    "url": "logo",
    "embedded": "iVBORw0KGgoAAAANSUhEUgAA..."
  },
  "marketing": "sei..."
}
```

<table><thead><tr><th width="174">Key</th><th width="111">Type</th><th>Description</th></tr></thead><tbody><tr><td>project*</td><td>String</td><td>A URL pointing to the project behind this token.</td></tr><tr><td>description*</td><td>String</td><td>A longer description of the token and it's utility. Designed for tooltips or such</td></tr><tr><td>logo*</td><td>String</td><td>A link to the logo, or a comment there is an on-chain logo stored</td></tr><tr><td>marketing*</td><td>Addr</td><td>The address (if any) who can update this data structure</td></tr></tbody></table>

### DownLoadLogo

Only with "marketing" extension Downloads the embedded logo data (if stored on chain). Errors if no logo data stored for this contract. Return type: DownloadLogoResponse.

```rust
#[cw_serde]
pub enum QueryMsg {
    DownloadLogo {}
}
```

```json
{
  "download_logo": {}
}
```

### DownloadLogoResponse&#x20;

When we download an embedded logo, we get this response type. We expect a SPA to be able to accept this info and display it.

```rust
#[cw_serde]
pub struct DownloadLogoResponse {
    /// The mime type of the image
    pub mime_type: String,
    /// The raw bytes of the image
    pub data: Binary,
}
```

```json
{
  "mime_type": "image/png",
  "data": "iVBORw0KGgoAAAANSUhEUgAA..."
}
```

<table><thead><tr><th width="187">Key</th><th width="200">Type</th><th>Description</th></tr></thead><tbody><tr><td>mime_type</td><td>String</td><td>The mime type of the image</td></tr><tr><td>data</td><td>Binary</td><td>The raw bytes of the image</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### AllAllowances&#x20;

Only with "enumerable" extension (and "allowances") Returns all allowances this owner has approved. Supports pagination. Return type: AllAllowancesResponse.

```rust
#[cw_serde]
pub enum QueryMsg {
    AllAllowances {
        owner: String,
        start_after: Option<String>,
        limit: Option<u32>,
    }
}
```

```json
{
  "all_allowances": {
    "owner": "sei...",
    "start_after": "sei...",
    "limit": 10
  }
}
```

<table><thead><tr><th width="181">Key</th><th width="144">Type</th><th>Description</th></tr></thead><tbody><tr><td>owner</td><td>String</td><td>The owner of the allowances</td></tr><tr><td>start_after*</td><td>String</td><td>The address to start after, used for pagination</td></tr><tr><td>limit*</td><td>u32</td><td>The number of allowances to limit the query to</td></tr></tbody></table>

### AllAllowancesResponse

```rust
#[cw_serde]
pub struct AllAllowancesResponse {
    pub allowances: Vec<AllowanceInfo>,
}
```

```json
{
  "allowances": [
    {
      "spender": "sei...",
      "allowance": "100000000000000000000000000",
      "expires": {
        "at_height": "0",
        "at_time": "0",
        "never": {}
      }
    }
  ]
}
```

<table><thead><tr><th width="173">Key</th><th width="220">Type</th><th>Description</th></tr></thead><tbody><tr><td>allowances</td><td>Vec&#x3C;AllowanceInfo></td><td>The list of allowances</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### AllowanceInfo&#x20;

```rust
#[cw_serde]
pub struct AllowanceInfo {
    pub spender: Addr,
    pub allowance: Uint128,
    pub expires: Expiration,
}
```

```json
{
  "spender": "sei...",
  "allowance": "100000000000000000000000000",
  "expires": {
    "at_height": "0",
    "at_time": "0",
    "never": {}
  }
}
```

<table><thead><tr><th width="186">Key</th><th width="216">Type</th><th>Description</th></tr></thead><tbody><tr><td>spender</td><td>Addr</td><td>The address of the spender</td></tr><tr><td>allowance</td><td>Uint128</td><td>The amount of tokens the spender is allowed to spend</td></tr><tr><td>expires</td><td>Expiration</td><td>When the allowance expires</td></tr></tbody></table>

### AllAccounts

Only with "enumerable" extension Returns all accounts that have balances. Supports pagination. Return type: AllAccountsResponse.

```rust
#[cw_serde]
pub enum QueryMsg {
    AllAccounts {
        start_after: Option<String>,
        limit: Option<u32>,
    }
}
```

```json
{
  "all_accounts": {
    "start_after": "sei...",
    "limit": 10
  }
}
```

<table><thead><tr><th width="177">Key</th><th width="158">Type</th><th>Description</th></tr></thead><tbody><tr><td>start_after*</td><td>String</td><td>The address to start after, used for pagination</td></tr><tr><td>limit*</td><td>u32</td><td>The number of accounts to limit the query to</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

\* = optional


# Staking

Lock LP tokens to obtain veSEILOR tokens. The total amount of rewards is determined based on the configuration of this contract and the boost locking time. LP tokens can be withdrawn in advance, but the rewards cannot be withdrawn until they expire according to the lock.

## Config

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct StakingConfig {
    pub gov: Addr,
    // Immutable variables for staking and rewards tokens
    pub staking_token: Addr,
    pub rewards_token: Addr,
    pub boost: Addr,
    pub fund: Addr,
    pub reward_controller_addr: Addr,
    pub new_gov: Option<Addr>,
}

```

<table><thead><tr><th width="237">Key</th><th width="89">Type</th><th>Description</th></tr></thead><tbody><tr><td>gov</td><td>Addr</td><td>The address of the governance contract</td></tr><tr><td>staking_token</td><td>Addr</td><td>The address of the token contract to be staked</td></tr><tr><td>rewards_token</td><td>Addr</td><td>The address of the token contract to be rewarded</td></tr><tr><td>boost</td><td>Addr</td><td>The address of contract <a href="/pages/Lda4TL0MXzjH3zJwS5X2">boost</a></td></tr><tr><td>fund</td><td>Addr</td><td>The address of contract <a href="/pages/Cee0W0Awot4wWTDzaYb7">fund</a></td></tr><tr><td>reward_controller_addr</td><td>Addr</td><td>The address controlling the amount of SEILOR token rewards for each mining.</td></tr><tr><td>new_gov*</td><td>Addr</td><td>The address of the new governance contract</td></tr></tbody></table>

\* = optional

## InitMsg

```rust
#[cw_serde]
pub struct InstantiateMsg {
    pub gov: Option<Addr>,
    pub staking_token: Addr,
    pub rewards_token: Addr,
    pub boost: Addr,
    pub fund: Addr,
    pub reward_controller_addr: Addr,
    pub duration: Uint128,
}
```

```json
{
  "gov": "sei1...",
  "staking_token": "sei1...",
  "rewards_token": "sei1...",
  "boost": "sei1...",
  "fund": "sei1...",
  "reward_controller_addr": "sei1...",
  "duration": "2592000"
}
```

<table><thead><tr><th width="227">Key</th><th width="164">Type</th><th>Description</th></tr></thead><tbody><tr><td>gov</td><td>Addr</td><td>The address of the governance contract</td></tr><tr><td>staking_token</td><td>Addr</td><td>The address of the token contract to be staked</td></tr><tr><td>rewards_token</td><td>Addr</td><td>The address of the token contract to be rewarded</td></tr><tr><td>boost</td><td>Addr</td><td>The address of contract <a href="/pages/Lda4TL0MXzjH3zJwS5X2">boost</a></td></tr><tr><td>fund</td><td>Addr</td><td>The address of contract <a href="/pages/Cee0W0Awot4wWTDzaYb7">fund</a></td></tr><tr><td>reward_controller_addr</td><td>Addr</td><td>The address controlling the amount of SEILOR token rewards for each mining</td></tr><tr><td>duration</td><td>Uint128</td><td>The duration of this batch mining reward</td></tr></tbody></table>

## ExecuteMsg

### Receive

```rust
#[cw_serde]
pub enum ExecuteMsg {
    /// Receives a message of type [`Cw20ReceiveMsg`]
    Receive(Cw20ReceiveMsg),
}
#[cw_serde]
pub struct Cw20ReceiveMsg {
    pub sender: String,
    pub amount: Uint128,
    pub msg: Binary,
}
```

<pre class="language-json"><code class="lang-json">{
  "receive": {
    "cw20_receive_msg": {
        "sender": "sei1...",
        "amount": "1000000",
        "msg": "eyJ0eXBlIjoiY3cyMCIsImFtb3VudCI6IjEwMDAwMCJ9"
<strong>      }
</strong>  }
}
</code></pre>

<table><thead><tr><th width="181">Key</th><th width="196">Type</th><th>Description</th></tr></thead><tbody><tr><td>sender</td><td>String</td><td>The sender's address</td></tr><tr><td>amount</td><td>Uint128</td><td>Amount to be sent</td></tr><tr><td>msg</td><td>Binary</td><td>Message to be sent</td></tr></tbody></table>

### UpdateStakingConfig&#x20;

```rust
#[cw_serde]
pub enum ExecuteMsg {
    UpdateStakingConfig {
        config_msg: UpdateStakingConfigStruct,
    },
}
#[cw_serde]
pub struct UpdateStakingConfigStruct {
    pub gov: Option<Addr>,
    pub staking_token: Option<Addr>,
    pub rewards_token: Option<Addr>,
    pub boost: Option<Addr>,
    pub fund: Option<Addr>,
    pub reward_controller_addr: Option<Addr>,
}
```

<pre class="language-json"><code class="lang-json">{
  "update_staking_config": {
    "config_msg": {
          "gov": "sei1...",
          "staking_token": "sei1...",
          "rewards_token": "sei1...",
          "boost": "sei1...",
          "fund": "sei1...",
          "reward_controller_addr": "sei1..."
<strong>      }
</strong>  }
}
</code></pre>

<table><thead><tr><th width="227">Key</th><th width="164">Type</th><th>Description</th></tr></thead><tbody><tr><td>gov</td><td>Addr</td><td>The address of the governance contract</td></tr><tr><td>staking_token</td><td>Addr</td><td>The address of the token contract to be staked</td></tr><tr><td>rewards_token</td><td>Addr</td><td>The address of the token contract to be rewarded</td></tr><tr><td>boost</td><td>Addr</td><td>The address of contract <a href="/pages/Lda4TL0MXzjH3zJwS5X2">boost</a></td></tr><tr><td>fund</td><td>Addr</td><td>The address of contract <a href="/pages/Cee0W0Awot4wWTDzaYb7">fund</a></td></tr><tr><td>reward_controller_addr</td><td>Addr</td><td>The address controlling the amount of SEILOR token rewards for each mining</td></tr></tbody></table>

### UpdateStakingState&#x20;

```rust
#[cw_serde]
pub enum ExecuteMsg {
    UpdateStakingState {
        duration: Uint128,
    },
}
```

```json
{
  "update_staking_state": {
    "duration": "2592000"
  }
}
```

<table><thead><tr><th width="164">Key</th><th width="191">Type</th><th>Description</th></tr></thead><tbody><tr><td>duration</td><td>Uint128</td><td>The duration of this batch mining reward</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### GetReward&#x20;

```rust
#[cw_serde]
pub enum ExecuteMsg {
    GetReward {},
}
```

```json
{
  "get_reward": {}
}
```

### Withdraw&#x20;

```rust
#[cw_serde]
pub enum ExecuteMsg {
    Withdraw {
        amount: Uint128,
    },
}
```

```json
{
  "withdraw": {
    "amount": "1000000"
  }
}
```

<table><thead><tr><th width="207">Key</th><th width="183">Type</th><th>Description</th></tr></thead><tbody><tr><td>amount</td><td>Uint128</td><td>Amount to be withdrew</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### NotifyRewardAmount&#x20;

```rust
#[cw_serde]
pub enum ExecuteMsg {
    NotifyRewardAmount {
        amount: Uint128,
    },
}
```

```json
{
  "notify_reward_amount": {
    "amount": "1000000"
  }
}
```

<table><thead><tr><th width="180">Key</th><th width="152">Type</th><th>Description</th></tr></thead><tbody><tr><td>amount</td><td>Uint128</td><td>The total allocation of mining rewards for this batch</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

## QueryMsg

```rust
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
    #[returns(RewardPerTokenResponse)]
    RewardPerToken {},
}
```

```json
{
  "reward_per_token": {}
}
```

### RewardPerTokenResponse

```rust
#[cw_serde]
pub struct RewardPerTokenResponse {
    pub reward_per_token: Uint128,
}
```

```
{
  "reward_per_token": "1000000"
}
```

<table><thead><tr><th width="213">Key</th><th width="175">Type</th><th>Description</th></tr></thead><tbody><tr><td>reward_per_token</td><td>Uint128</td><td>The rate of reward for each token</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### LastTimeRewardApplicable&#x20;

```rust
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
    #[returns(LastTimeRewardApplicableResponse)]
    LastTimeRewardApplicable {},
}
```

```json
{
  "last_time_reward_applicable": {}
}
```

### LastTimeRewardApplicableResponse&#x20;

```rust
#[cw_serde]
pub struct LastTimeRewardApplicableResponse {
    pub last_time_reward_applicable: Uint128,
}
```

```json
{
  "last_time_reward_applicable": "1000000"
}
```

<table><thead><tr><th width="266">Key</th><th width="127">Type</th><th>Description</th></tr></thead><tbody><tr><td>last_time_reward_applicable</td><td>Uint128</td><td>Last time reward applicable</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### GetBoost

```rust
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
    #[returns(GetBoostResponse)]
    GetBoost { account: Addr },
}
```

```
{
  "get_boost": {
    "account": "sei1..."
  }
}
```

### GetBoostResponse&#x20;

```rust
#[cw_serde]
pub struct GetBoostResponse {
    pub boost: Uint128,
}
```

```
{
  "boost": "1000000"
}
```

<table><thead><tr><th width="137">Key</th><th width="170">Type</th><th>Description</th></tr></thead><tbody><tr><td>boost</td><td>Uint128</td><td>boost value</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### Earned&#x20;

```rust
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
    #[returns(EarnedResponse)]
    Earned { account: Addr },
}
```

```json
{
  "earned": {
    "account": "sei1..."
  }
}
```

<table><thead><tr><th width="180">Key</th><th width="183">Type</th><th>Description</th></tr></thead><tbody><tr><td>account</td><td>Addr</td><td>The user's address</td></tr><tr><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### EarnedResponse

```rust
#[cw_serde]
pub struct EarnedResponse {
    pub earned: Uint128,
}
```

```
{
  "earned": "1000000"
}
```

<table><thead><tr><th width="143">Key</th><th width="123">Type</th><th>Description</th></tr></thead><tbody><tr><td>earned</td><td>Uint128</td><td>The amount of rewards that the user has already received.</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### QueryStakingConfig&#x20;

```rust
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
    #[returns(StakingConfigResponse)]
    QueryStakingConfig {},
}
```

```
{
  "query_staking_config": {}
}
```

### StakingConfigResponse

```rust
#[cw_serde]
pub struct StakingConfigResponse {
    pub gov: Addr,
    pub staking_token: Addr,
    pub rewards_token: Addr,
    pub boost: Addr,
    pub fund: Addr,
    pub reward_controller_addr: Addr,
}
```

```
{
  "gov": "sei1...",
  "staking_token": "sei1...",
  "rewards_token": "sei1...",
  "boost": "sei1...",
  "fund": "sei1...",
  "reward_controller_addr": "sei1..."
}
```

<table><thead><tr><th width="237">Key</th><th width="89">Type</th><th>Description</th></tr></thead><tbody><tr><td>gov</td><td>Addr</td><td>The address of the governance contract</td></tr><tr><td>staking_token</td><td>Addr</td><td>The address of the token contract to be staked</td></tr><tr><td>rewards_token</td><td>Addr</td><td>The address of the token contract to be rewarded</td></tr><tr><td>boost</td><td>Addr</td><td>The address of contract <a href="/pages/Lda4TL0MXzjH3zJwS5X2">boost</a></td></tr><tr><td>fund</td><td>Addr</td><td>The address of contract <a href="/pages/Cee0W0Awot4wWTDzaYb7">fund</a></td></tr><tr><td>reward_controller_addr</td><td>Addr</td><td>The address controlling the amount of SEILOR token rewards for each mining.</td></tr><tr><td>new_gov*</td><td>Addr</td><td>The address of the new governance contract</td></tr></tbody></table>

\* = optional

### QueryStakingState

```rust
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
    #[returns(StakingStateResponse)]
    QueryStakingState {},
}
```

```
{
  "query_staking_state": {}
}
```

### StakingStateResponse

```rust
#[cw_serde]
pub struct StakingStateResponse {
    pub duration: Uint128,
    pub finish_at: Uint128,
    pub updated_at: Uint128,
    pub reward_rate: Uint256,
    pub reward_per_token_stored: Uint128,
    pub total_supply: Uint128,
}
```

```json
{
  "duration": "1000000",
  "finish_at": "1000000",
  "updated_at": "1000000",
  "reward_rate": "1000000",
  "reward_per_token_stored": "1000000",
  "total_supply": "1000000"
}
```

<table><thead><tr><th width="266">Key</th><th width="118">Type</th><th>Description</th></tr></thead><tbody><tr><td>duration</td><td>Uint128</td><td>Duration of rewards to be paid out (in seconds) 2_592_000 = 30 days</td></tr><tr><td>finish_at</td><td>Uint128</td><td>Timestamp of when the rewards finish</td></tr><tr><td>update_at</td><td>Uint128</td><td>last updated time</td></tr><tr><td>reward_rate</td><td>Uint256</td><td>Reward to be paid out per second</td></tr><tr><td>reward_per_token_stored</td><td>Uint128</td><td>Sum of (reward rate * dt * 1e6 / total supply)</td></tr><tr><td>total_supply</td><td>Uint128</td><td>The total amount of staked tokens.</td></tr></tbody></table>

### GetUserUpdatedAt&#x20;

```rust
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
    #[returns(GetUserUpdatedAtResponse)]
    GetUserUpdatedAt { account: Addr },
}
```

```
{
  "get_user_updated_at": {
    "account": "sei1..."
  }
}
```

<table><thead><tr><th width="147">Key</th><th width="153">Type</th><th>Decription</th></tr></thead><tbody><tr><td>account</td><td>Addr</td><td>The user's address</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### GetUserUpdatedAtResponse&#x20;

```rust
#[cw_serde]
pub struct GetUserUpdatedAtResponse {
    pub updated_at: Uint128,
}
```

```
{
  "updated_at": "1000000"
}
```

<table><thead><tr><th width="192">Key</th><th width="188">Type</th><th>Description</th></tr></thead><tbody><tr><td>updated_at</td><td>Uint128</td><td>last updated time for user</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### GetUserRewardPerTokenPaid&#x20;

```rust
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
    #[returns(GetUserRewardPerTokenPaidResponse)]
    GetUserRewardPerTokenPaid { account: Addr },
}
```

```
{
  "get_user_reward_per_token_paid": {
    "account": "sei1..."
  }
}
```

<table><thead><tr><th width="193">Key</th><th width="193">Type</th><th>Description</th></tr></thead><tbody><tr><td>account</td><td>Addr</td><td>the user's address</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### GetUserRewardPerTokenPaidResponse&#x20;

```rust
#[cw_serde]
pub struct GetUserRewardPerTokenPaidResponse {
    pub reward_per_token_paid: Uint128,
}
```

```
{
  "reward_per_token_paid": "1000000"
}
```

<table><thead><tr><th width="221">Key</th><th width="101">Type</th><th>Description</th></tr></thead><tbody><tr><td>reward_per_token_paid</td><td>Uint128</td><td>Calculating the reward rate per Staking token for a specific user after applying the boost</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### BalanceOf&#x20;

```rust
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
    #[returns(BalanceOfResponse)]
    BalanceOf { account: Addr },
}
```

```json
{
  "balance_of": {
    "account": "sei1..."
  }
}
```

<table><thead><tr><th width="185">Key</th><th width="179">Type</th><th>Description</th></tr></thead><tbody><tr><td>account</td><td>Addr</td><td>the user's address</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### BalanceOfResponse&#x20;

```rust
#[cw_serde]
pub struct BalanceOfResponse {
    pub balance_of: Uint128,
}
```

```json
{
  "balance_of": "1000000"
}
```

<table><thead><tr><th width="191">Key</th><th width="169">Type</th><th>Description</th></tr></thead><tbody><tr><td>balance_of</td><td>Uint128</td><td>the balance of the user's address</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>


# Ve Seilor

veSEILOR is escrowed SEILOR. It has the same value as SEILOR and is subject to the total supply of SEILOR. veSEILOR cannot be traded or transferred but has voting rights and can share in protocol earnings. Mining rewards are the primary source of veSEILOR. veSEILOR holders can convert their veSEILOR to SEILOR through a vesting process. Once the process is started, veSEILOR will be linearly converted to SEILOR over a period of 30 days.

## Config

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct VoteConfig {
    pub max_supply: u128,
    pub fund: Addr,
    pub gov: Addr,
    pub max_minted: Uint128,
    pub total_minted: Uint128,
    pub new_gov: Option<Addr>,
}

```

<table><thead><tr><th width="163">Key</th><th width="135">Type</th><th>Description</th></tr></thead><tbody><tr><td>max_supply</td><td>u128</td><td>veSEILOR max supply</td></tr><tr><td>fund</td><td>Addr</td><td>The address of contract <a href="/pages/Cee0W0Awot4wWTDzaYb7">fund</a></td></tr><tr><td>gov</td><td>Addr</td><td>The address of the governance contract</td></tr><tr><td>max_minted</td><td>Uint128</td><td>Maximum amount of veSEILOR that can be minted</td></tr><tr><td>total_minted</td><td>Uint128</td><td>Total amount of veSEILOR that has been minted</td></tr><tr><td>new_gov</td><td>Addr</td><td>The address of the new governance contract</td></tr></tbody></table>

## InitMsg

```rust
#[cw_serde]
pub struct InstantiateMsg {
    pub cw20_init_msg: Cw20InstantiateMsg,

    pub max_supply: u128,
    // default msg.sender
    pub gov: Option<Addr>,
    pub max_minted: u128,
}
```

```json
{
  "cw20_init_msg": {
    "name": "seilor dev",
    "symbol": "seilor",
    "decimals": 6,
    "initial_balances": []
  },
  "max_supply": "650000000000000"
}
```

<table><thead><tr><th width="174">Key</th><th width="201">Type</th><th>Description</th></tr></thead><tbody><tr><td>cw20_init_msg</td><td>Cw20InstantiateMsg</td><td>The cw20 initialization message structure based on the cw20_base library</td></tr><tr><td>max_supply</td><td>u128</td><td>SEILOR max supply</td></tr><tr><td>gov*</td><td>Addr</td><td>Address of contract owner that can update config. If not filled in, it is the initialization call address</td></tr><tr><td>max_minted</td><td>Uint128</td><td>Maximum amount of veSEILOR that can be minted</td></tr></tbody></table>

\* = optional

## ExecuteMsg

### UpdateConfig&#x20;

Updates the configuration of the contract. Can only be issued by the gov address.

```rust
#[cw_serde]
pub enum ExecuteMsg {
    UpdateConfig {
        max_minted: Option<Uint128>,
        fund: Option<Addr>,
        gov: Option<Addr>,
    }
}
```

```json
{
  "update_config": {
    "max_minted": "650000000000000",
    "fund": "sei1...",
    "gov": "sei1..."
  }
}
```

<table><thead><tr><th width="161">Key</th><th width="210">Type</th><th>Description</th></tr></thead><tbody><tr><td>max_minted*</td><td>Uint128</td><td>Maximum amount of veSEILOR that can be minted</td></tr><tr><td>fund*</td><td>Addr</td><td>The address of contract <a href="/pages/Cee0W0Awot4wWTDzaYb7">fund</a></td></tr><tr><td>gov*</td><td>Addr</td><td>The address of the governance contract</td></tr></tbody></table>

### SetMinters&#x20;

Updates the minters of the contract. Can only be issued by the gov address.

```rust
#[cw_serde]
pub enum ExecuteMsg {
    SetMinters {
        contracts: Vec<Addr>,
        is_minter: Vec<bool>
    }
}
```

```json
{
  "set_minters": {
    "contracts": [
      "sei1..."
    ],
    "is_minter": [
      true
    ]
  }
}
```

<table><thead><tr><th width="162">Key</th><th width="181">Type</th><th>Description</th></tr></thead><tbody><tr><td>contracts</td><td>Vec&#x3C;Addr></td><td>List of contracts to be updated</td></tr><tr><td>is_minter</td><td>Vec&#x3C;bool></td><td>List of corresponding mint permissions</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### Mint

Mints veSEILOR. Can only be issued by the mint permissions.

```rust
#[cw_serde]
pub enum ExecuteMsg {
    Mint {
        recipient: String,
        amount: Uint128,
    }
}
```

```json
{
  "mint": {
    "recipient": "sei1...",
    "amount": "650000000000000"
  }
}
```

<table><thead><tr><th width="199">Key</th><th width="202">Type</th><th>Description</th></tr></thead><tbody><tr><td>recipient</td><td>String</td><td>Recipient's address</td></tr><tr><td>amount</td><td>Uint128</td><td>Amount of veSEILOR to mint</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### Burn

Burns veSEILOR. Can only be issued by the mint permissions.

```rust
#[cw_serde]
pub enum ExecuteMsg {
    Burn {
        user: String,
        amount: Uint128,
    }
}
```

```json
{
  "burn": {
    "user": "sei1...",
    "amount": "650000000000000"
  }
}
```

<table><thead><tr><th width="186">Key</th><th width="184">Type</th><th>Description</th></tr></thead><tbody><tr><td>user</td><td>String</td><td>The user address for veSEILOR to be burned</td></tr><tr><td>amount</td><td>Uint128</td><td>The amount of veSEILOR to be burned</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### UpdateMarketing

Only with the "marketing" extension. If authorized, updates marketing metadata. Setting None/null for any of these will leave it unchanged. Setting Some("") will clear this field on the contract storage

```rust
#[cw_serde]
pub enum ExecuteMsg {
    UpdateMarketing {
        project: Option<String>,
        description: Option<String>,
        marketing: Option<String>,
    }
}
```

```json
{
  "update_marketing": {
    "project": null,
    "description": null,
    "marketing": null
  }
}
```

<table><thead><tr><th width="176">Key</th><th width="158">Type</th><th>Description</th></tr></thead><tbody><tr><td>project*</td><td>String</td><td>Project name</td></tr><tr><td>description*</td><td>String</td><td>Project description</td></tr><tr><td>marketing*</td><td>String</td><td>Marketing URL</td></tr></tbody></table>

### UploadLogo&#x20;

If set as the "marketing" role on the contract, upload a new URL, SVG, or PNG for the token

```rust
#[cw_serde]
pub enum ExecuteMsg {
    UploadLogo {
        logo: String
    }
}
```

```json
{
  "upload_logo": {
    "logo": "https://..."
  }
}
```

<table><thead><tr><th width="168">Key</th><th width="189">Type</th><th>Description</th></tr></thead><tbody><tr><td>logo</td><td>String</td><td>Logo URL</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

## QueryMsg

### VoteConfig&#x20;

Returns the current configuration of the contract.

```rust
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
    #[returns(VoteConfigResponse)]
    VoteConfig {},
}
```

```
{
  "vote_config": {}
}
```

### VoteConfigResponse&#x20;

```rust
#[cw_serde]
pub struct VoteConfigResponse {
    pub max_supply: u128,
    pub fund: Addr,
    pub gov: Addr,
    pub max_minted: Uint128,
    pub total_minted: Uint128,
    pub new_gov: Option<Addr>,
}
```

```json
{
  "max_supply": "650000000000000",
  "fund": "sei1...",
  "gov": "sei1...",
  "max_minted": "650000000000000",
  "total_minted": "650000000000000"
}
```

<table><thead><tr><th width="163">Key</th><th width="135">Type</th><th>Description</th></tr></thead><tbody><tr><td>max_supply</td><td>u128</td><td>veSEILOR max supply</td></tr><tr><td>fund</td><td>Addr</td><td>The address of contract <a href="/pages/Cee0W0Awot4wWTDzaYb7">fund</a></td></tr><tr><td>gov</td><td>Addr</td><td>The address of the governance contract</td></tr><tr><td>max_minted</td><td>Uint128</td><td>Maximum amount of veSEILOR that can be minted</td></tr><tr><td>total_minted</td><td>Uint128</td><td>Total amount of veSEILOR that has been minted</td></tr><tr><td>new_gov*</td><td>Addr</td><td>The address of the new governance contract</td></tr></tbody></table>

\* = optional

### IsMinter&#x20;

Returns whether the given address is a minter.

```rust
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
    #[returns(IsMinterResponse)]
    IsMinter { address: String },
}
```

```json
{
  "is_minter": {
    "address": "sei1..."
  }
}
```

### IsMinterResponse&#x20;

```rust
#[cw_serde]
pub struct IsMinterResponse {
    pub is_minter: bool,
}
```

```json
{
  "is_minter": true
}
```

<table><thead><tr><th width="189">Key</th><th width="175">Type</th><th>Description</th></tr></thead><tbody><tr><td>is_minter</td><td>bool</td><td>Return whether the user is a minter</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### Checkpoints&#x20;

Returns the checkpoints of the given address and points.

```rust
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
    #[returns(CheckpointResponse)]
    Checkpoints { account: Addr, pos: u32 },
}
```

```json
{
  "checkpoints": {
    "account": "sei1...",
    "pos": 0
  }
}
```

<table><thead><tr><th width="187">Key</th><th width="175">Type</th><th>Description</th></tr></thead><tbody><tr><td>account</td><td>Addr</td><td>the user's address</td></tr><tr><td>pos</td><td>u32</td><td>Voting index</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### CheckpointResponse&#x20;

```rust
#[cw_serde]
pub struct CheckpointResponse {
    pub from_block: u64,
    pub votes: u128,
}
```

```
{
  "from_block": 0,
  "votes": "650000000000000"
}
```

<table><thead><tr><th width="188">Key</th><th width="170">Type</th><th>Description</th></tr></thead><tbody><tr><td>from_block</td><td>u64</td><td>Starting block height</td></tr><tr><td>votes</td><td>u128</td><td>The amount of votes received</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### NumCheckpoints

Returns the number of checkpoints for the given address.

```rust
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
    #[returns(NumCheckpointsResponse)]
    NumCheckpoints { account: Addr },
}
```

```
{
  "num_checkpoints": {
    "account": "sei1..."
  }
}
```

<table><thead><tr><th width="169">Key</th><th width="168">Type</th><th>Description</th></tr></thead><tbody><tr><td>account</td><td>Addr</td><td>The address of the queried user</td></tr><tr><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### NumCheckpointsResponse&#x20;

```rust
#[cw_serde]
pub struct NumCheckpointsResponse {
    pub num: usize,
}
```

```
{
  "num": 1
}
```

| Key | Type | Description  |
| --- | ---- | ------------ |
| num | u128 | Voting index |
|     |      |              |

### GetVotes&#x20;

Returns the amount of votes the given address has.

```rust
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
    #[returns(GetVotesResponse)]
    GetVotes { account: Addr },
}
```

```json
{
  "get_votes": {
    "account": "sei1..."
  }
}
```

<table><thead><tr><th width="193">Key</th><th width="153">Type</th><th>Description</th></tr></thead><tbody><tr><td>account</td><td>Addr</td><td>The address of the queried user</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### GetVotesResponse&#x20;

```rust
#[cw_serde]
pub struct GetVotesResponse {
    pub votes: u128,
}
```

```
{
  "votes": "650000000000000"
}
```

<table><thead><tr><th width="174">Key</th><th width="207">Type</th><th>Description</th></tr></thead><tbody><tr><td>votes</td><td>u128</td><td>The amount of votes received</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### GetPastVotes&#x20;

Returns the amount of votes the given address had at the given block.

```rust
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
    #[returns(GetPastVotesResponse)]
    GetPastVotes { account: Addr, block_number: u64 },
}
```

```json
{
  "get_past_votes": {
    "account": "sei1...",
    "block_number": 0
  }
}
```

<table><thead><tr><th width="181">Key</th><th width="203">Type</th><th>Description</th></tr></thead><tbody><tr><td>account</td><td>Addr</td><td>The address of the queried user</td></tr><tr><td>block_number</td><td>u64</td><td>The given block height</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### GetPastVotesResponse&#x20;

```rust
#[cw_serde]
pub struct GetPastVotesResponse {
    pub votes: u128,
}
```

```
{
  "votes": "650000000000000"
}
```

<table><thead><tr><th width="182">Key</th><th width="209">Type</th><th>Description</th></tr></thead><tbody><tr><td>votes</td><td>u128</td><td>The amount of votes received</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### GetPastTotalSupply&#x20;

Returns the amount of total supply  at the given block.

```rust
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
    #[returns(GetPastTotalSupplyResponse)]
    GetPastTotalSupply { block_number: u64 },
}
```

```json
{
  "get_past_total_supply": {
    "block_number": 0
  }
}
```

<table><thead><tr><th width="192">Key</th><th width="196">Type</th><th>Description</th></tr></thead><tbody><tr><td>block_number</td><td>u64</td><td>The given block height</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### GetPastTotalSupplyResponse&#x20;

```rust
#[cw_serde]
pub struct GetPastTotalSupplyResponse {
    pub total_supply: u128,
}
```

```
{
  "total_supply": "650000000000000"
}
```

<table><thead><tr><th width="198">Key</th><th width="186">Type</th><th>Description</th></tr></thead><tbody><tr><td>total_supply</td><td>u128</td><td>The total number of tokens participating in the vote at the given height</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### Balance

Returns the current balance of the given address, 0 if unset. Return type: BalanceResponse.

```rust
#[cw_serde]
pub enum QueryMsg {
    Balance {
        address: String
    }
}
```

```json
{
  "balance": {
    "address": "sei..."
  }
}
```

<table><thead><tr><th width="181">Key</th><th width="172">Type</th><th>Description</th></tr></thead><tbody><tr><td>address</td><td>String</td><td>The user's address</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### BalanceResponse

```rust
#[cw_serde]
pub struct BalanceResponse {
    pub balance: Uint128,
}
```

```json
{
  "balance": "100000000000000000000000000"
}
```

<table><thead><tr><th width="186">Key</th><th width="242">Type</th><th>Description</th></tr></thead><tbody><tr><td>balance</td><td>Uint128</td><td>The balance of SEILOR tokens for the queried user's address.</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### TokenInfo

Returns metadata on the contract - name, decimals, supply, etc. Return type: TokenInfoResponse

```rust
#[cw_serde]
pub enum QueryMsg {
    TokenInfo {}
}
```

```json
{
  "token_info": {}
}
```

### TokenInfoResponse

```rust
#[cw_serde]
pub struct TokenInfoResponse {
    pub name: String,
    pub symbol: String,
    pub decimals: u8,
    pub total_supply: Uint128,
}
```

```json
{
  "name": "SEILOR",
  "symbol": "SEILOR",
  "decimals": 18,
  "total_supply": "100000000000000000000000000"
}
```

### Minter&#x20;

Only with "mintable" extension. Returns who can mint and the hard cap on maximum tokens after minting. Return type: MinterResponse.

```rust
#[cw_serde]
pub enum QueryMsg {
    Minter {}
}
```

```json
{
  "minter": {}
}
```

### MinterResponse

```rust
#[cw_serde]
pub struct MinterResponse {
    pub minter: Addr,
    pub cap: Option<Uint128>,
}
```

```json
{
  "minter": "sei...",
  "cap": "100000000000000000000000000"
}
```

<table><thead><tr><th width="161">Key</th><th width="186">Type</th><th>Description</th></tr></thead><tbody><tr><td>minter</td><td>Addr</td><td>the minter's address</td></tr><tr><td>cap*</td><td>Uint128</td><td>cap is a hard cap on total supply that can be achieved by minting. Note that this refers to total_supply. If None, there is unlimited cap.</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### AllAccounts

Only with "enumerable" extension Returns all accounts that have balances. Supports pagination. Return type: AllAccountsResponse.

```rust
#[cw_serde]
pub enum QueryMsg {
    AllAccounts {
        start_after: Option<String>,
        limit: Option<u32>,
    }
}
```

```json
{
  "all_accounts": {
    "start_after": "sei...",
    "limit": 10
  }
}
```

<table><thead><tr><th width="177">Key</th><th width="158">Type</th><th>Description</th></tr></thead><tbody><tr><td>start_after*</td><td>String</td><td>The address to start after, used for pagination</td></tr><tr><td>limit*</td><td>u32</td><td>The number of accounts to limit the query to</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

\* = optional

### MarketingInfo&#x20;

Only with "marketing" extension Returns more metadata on the contract to display in the client:

description, logo, project url, etc. Return type: MarketingInfoResponse.

```rust
#[cw_serde]
pub enum QueryMsg {
    MarketingInfo {}
}
```

```json
{
  "marketing_info": {}
}
```

### MarketingInfoResponse&#x20;

```rust
#[cw_serde]
pub struct MarketingInfoResponse {
    /// A URL pointing to the project behind this token.
    pub project: Option<String>,
    /// A longer description of the token and it's utility. Designed for tooltips or such
    pub description: Option<String>,
    /// A link to the logo, or a comment there is an on-chain logo stored
    pub logo: Option<LogoInfo>,
    /// The address (if any) who can update this data structure
    pub marketing: Option<Addr>,
}
```

```json
{
  "project": "https://...",
  "description": "Ku...",
  "logo": {
    "url": "logo",
    "embedded": "iVBORw0KGgoAAAANSUhEUgAA..."
  },
  "marketing": "sei..."
}
```

<table><thead><tr><th width="174">Key</th><th width="111">Type</th><th>Description</th></tr></thead><tbody><tr><td>project*</td><td>String</td><td>A URL pointing to the project behind this token.</td></tr><tr><td>description*</td><td>String</td><td>A longer description of the token and it's utility. Designed for tooltips or such</td></tr><tr><td>logo*</td><td>String</td><td>A link to the logo, or a comment there is an on-chain logo stored</td></tr><tr><td>marketing*</td><td>Addr</td><td>The address (if any) who can update this data structure</td></tr></tbody></table>

### DownLoadLogo

Only with "marketing" extension Downloads the embedded logo data (if stored on chain). Errors if no logo data stored for this contract. Return type: DownloadLogoResponse.

```rust
#[cw_serde]
pub enum QueryMsg {
    DownloadLogo {}
}
```

```json
{
  "download_logo": {}
}
```

### DownloadLogoResponse&#x20;

When we download an embedded logo, we get this response type. We expect a SPA to be able to accept this info and display it.

```rust
#[cw_serde]
pub struct DownloadLogoResponse {
    /// The mime type of the image
    pub mime_type: String,
    /// The raw bytes of the image
    pub data: Binary,
}
```

```json
{
  "mime_type": "image/png",
  "data": "iVBORw0KGgoAAAANSUhEUgAA..."
}
```

<table><thead><tr><th width="187">Key</th><th width="200">Type</th><th>Description</th></tr></thead><tbody><tr><td>mime_type</td><td>String</td><td>The mime type of the image</td></tr><tr><td>data</td><td>Binary</td><td>The raw bytes of the image</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>


# Oracle

Encapsulated the call to PythOracle.

## Config

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct Config {
    pub owner: CanonicalAddr,
    pub pyth_contract: CanonicalAddr,
    pub new_owner: Option<CanonicalAddr>,
}
```

<table><thead><tr><th width="184">Key</th><th width="199">Type</th><th>Description</th></tr></thead><tbody><tr><td>owner</td><td>CanonicalAddr</td><td>The address of the contract's owner</td></tr><tr><td>pyth_contract</td><td>CanonicalAddr</td><td>The address of pyth oracle contract</td></tr><tr><td>new_owner*</td><td>CanonicalAddr</td><td>The address of the contract's new owner</td></tr></tbody></table>

\* = optional

## InitMsg

```rust
#[cw_serde]
pub struct InstantiateMsg {
    pub pyth_contract: String,
    pub owner: Addr,
}
```

```json
{
  "owner": "sei...address...",
  "pyth_contract": "sei...address..."
}
```

<table><thead><tr><th width="193">Key</th><th width="203">Type</th><th>Description</th></tr></thead><tbody><tr><td>owner</td><td>string</td><td>The address of the contract's owner</td></tr><tr><td>pyth_contract</td><td>string</td><td>The address of pyth oracle contract</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

## ExecuteMsg

### ConfigFeedInfo&#x20;

Set the relevant information for updating oracle.

```rust
#[cw_serde]
pub enum ExecuteMsg {
    ConfigFeedInfo {
        asset: String,
        price_feed_id: String,
        price_feed_symbol: String,
        price_feed_decimal: u32,
        check_feed_age: bool,
        price_feed_age: u64,
    },
}
```

```
{
  "config_feed_info": {
    "asset": "factory/sei1h3ukufh4lhacftdf6kyxzum4p86rcnel35v4jk/usdt",
    "price_feed_id": "ff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace",
    "price_feed_symbol": "Crypto.ETH/USD",
    "price_feed_decimal": 8,
    "price_feed_age": 360,
    "check_feed_age": true
  }
}
```

<table><thead><tr><th width="231">Key</th><th width="113">Type</th><th>Description</th></tr></thead><tbody><tr><td>asset</td><td>string</td><td>The address of the asset</td></tr><tr><td>price_feed_id</td><td>string</td><td>The pyth price feed id</td></tr><tr><td>price_feed_symbol</td><td>string</td><td>The pyth price feed symbol</td></tr><tr><td>price_feed_decimal</td><td>u32</td><td>The pyth price feed decimal</td></tr><tr><td>check_feed_age</td><td>bool</td><td>Whether to check the age of the price feed</td></tr><tr><td>price_feed_age</td><td>u64</td><td>The maximum age of the price feed in seconds</td></tr></tbody></table>

### ChangeOwner

Change the contract owner, only can issued by current owner.

```rust
#[cw_serde]
pub enum ExecuteMsg {
    ChangeOwner {
        new_owner: String,
    },
}
```

```json
{
  "change_owner": {
    "new_owner": "sei...addr..."
  }
}
```

<table><thead><tr><th width="176">Key</th><th width="217">Type</th><th>Description</th></tr></thead><tbody><tr><td>new_owner</td><td>string</td><td>The address of the new contract owner.</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### SetConfigFeedValid&#x20;

Set whether the oracle is available, the default is available, the type is bool.

```rust
#[cw_serde]
pub enum ExecuteMsg {
    SetConfigFeedValid {
        asset: String,
        valid: bool,
    },
}
```

```
{
  "set_config_feed_valid": {
    "asset": "factory/sei1h3ukufh4lhacftdf6kyxzum4p86rcnel35v4jk/usdt",
    "valid": true
  }
}
```

<table><thead><tr><th width="151">Key</th><th width="169">Type</th><th>Description</th></tr></thead><tbody><tr><td>asset</td><td>string</td><td>The address of the asset</td></tr><tr><td>valid</td><td>bool</td><td>Whether the oracle is available</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### ChangePythContract&#x20;

Change the pyth contract address, only can issued by current owner.

```rust
#[cw_serde]
pub enum ExecuteMsg {
    ChangePythContract {
        pyth_contract: String,
    },
}
```

```
{
  "change_pyth_contract": {
    "pyth_contract": "sei...addr..."
  }
}
```

<table><thead><tr><th width="159">Key</th><th width="186">Type</th><th>Description</th></tr></thead><tbody><tr><td>pyth_contract</td><td>String</td><td>The pyth contract address</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

## QueryMsg

All query messages are described below. A custom struct is defined for each query response.

### QueryPrice

Returns the price of the asset.

```rust
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
    #[returns(PriceResponse)]
    QueryPrice { asset: String },
}
```

```
{
  "query_price": {
    "asset": "factory/sei1h3ukufh4lhacftdf6kyxzum4p86rcnel35v4jk/usdt"
  }
}
```

<table><thead><tr><th width="170">Key</th><th width="179">Type</th><th>Description</th></tr></thead><tbody><tr><td>asset</td><td>string</td><td>The address of the asset</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### PriceResponse&#x20;

```rust
#[cw_serde]
pub struct PriceResponse {
    pub asset: String,
    pub emv_price: Decimal256,
    pub emv_price_raw: i64,
    pub price: Decimal256,
    pub price_raw: i64,
    pub last_updated_base: u64,
    pub last_updated_quote: u64,
}
```

```json
{
  "price_response": {
    "asset": "factory/sei1h3ukufh4lhacftdf6kyxzum4p86rcnel35v4jk/usdt",
    "emv_price": "1.00000000",
    "emv_price_raw": 100000000,
    "price": "1.00000000",
    "price_raw": 100000000,
    "last_updated_base": 1634160000,
    "last_updated_quote": 1634160000
  }
}
```

<table><thead><tr><th width="209">Key</th><th width="115">Type</th><th>Description</th></tr></thead><tbody><tr><td>asset</td><td>string</td><td>The address of the asset</td></tr><tr><td>emv_price</td><td>decimal</td><td>The emv price of the asset in the base currency</td></tr><tr><td>emv_price_raw</td><td>i64</td><td>The emv price of the asset in the base currency, multiplied by 10^8</td></tr><tr><td>price</td><td>decimal</td><td>The price of the asset in the quote currency</td></tr><tr><td>price_raw</td><td>i64</td><td>The price of the asset in the quote currency, multiplied by 10^8</td></tr><tr><td>last_updated_base</td><td>u64</td><td>The timestamp of the last update of the price of the asset in the base currency</td></tr><tr><td>last_updated_quote</td><td>u64</td><td>The timestamp of the last update of the price of the asset in the quote currency</td></tr></tbody></table>

### QueryPrices&#x20;

Returns the prices of the assets.

```rust
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
    #[returns(Vec < PriceResponse >)]
    QueryPrices { assets: Vec<String> },
}
```

```json
{
  "query_prices": {
    "assets": [
      "factory/sei1h3ukufh4lhacftdf6kyxzum4p86rcnel35v4jk/usdt",
      "factory/sei1h3ukufh4lhacftdf6kyxzum4p86rcnel35v4jk/eth"
    ]
  }
}
```

<table><thead><tr><th width="165">Key</th><th width="165">Type</th><th>Description</th></tr></thead><tbody><tr><td>assets</td><td>Vec&#x3C;String></td><td>The list of asset addresses</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### QueryConfig&#x20;

Returns information about global config.

```rust
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
    #[returns(ConfigResponse)]
    QueryConfig {},
}
```

```json
{
  "query_config": {}
}
```

### ConfigResponse&#x20;

```rust
#[cw_serde]
pub struct PythFeederConfigResponse {
    pub price_feed_id: PriceIdentifier,
    pub price_feed_symbol: String,
    pub price_feed_decimal: u32,
    pub price_feed_age: u64,
    pub check_feed_age: bool,
    pub is_valid: bool,
}
```

```json
{
  "config_response": {
    "price_feed_id": "fff...",
    "price_feed_symbol": "USDT",
    "price_feed_decimal": 6,
    "price_feed_age": 1634160000,
    "check_feed_age": true,
    "is_valid": true
  }
}
```

### QueryPythFeederConfig

Returns the pyth feeder config.

```rust
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
    #[returns(PythFeederConfigResponse)]
    QueryPythFeederConfig { asset: String },
}
```

```
{
  "query_pyth_feeder_config": {
    "asset": "factory/sei1h3ukufh4lhacftdf6kyxzum4p86rcnel35v4jk/usdt"
  }
}
```

<table><thead><tr><th width="158">Key</th><th width="144">Type</th><th>Description</th></tr></thead><tbody><tr><td>asset</td><td>string</td><td>The address of the asset</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### PythFeederConfigResponse&#x20;

```rust
#[cw_serde]
pub struct PythFeederConfigResponse {
    pub price_feed_id: PriceIdentifier,
    pub price_feed_symbol: String,
    pub price_feed_decimal: u32,
    pub price_feed_age: u64,
    pub check_feed_age: bool,
    pub is_valid: bool,
}
```

```json
{
  "pyth_feeder_config_response": {
    "price_feed_id": "fff...",
    "price_feed_symbol": "USDT",
    "price_feed_decimal": 6,
    "price_feed_age": 1634160000,
    "check_feed_age": true,
    "is_valid": true
  }
}
```

<table><thead><tr><th width="210">Key</th><th width="128">Type</th><th>Description</th></tr></thead><tbody><tr><td>price_feed_id</td><td>string</td><td>The price feed id</td></tr><tr><td>price_feed_symbol</td><td>string</td><td>The price feed symbol</td></tr><tr><td>price_feed_decimal</td><td>u32</td><td>The price feed decimal</td></tr><tr><td>price_feed_age</td><td>u64</td><td>The price feed age</td></tr><tr><td>check_feed_age</td><td>bool</td><td>Whether to check the price feed age</td></tr><tr><td>is_valid</td><td>bool</td><td>Whether the config is valid</td></tr></tbody></table>

### QueryExchangeRateByAssetLabel&#x20;

Returns the exchange rate of the asset label.

```rust
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
    #[returns(Decimal256)]
    QueryExchangeRateByAssetLabel { base_label: String, quote_label: String },
}
```

```
{
  "query_exchange_rate_by_asset_label": {
    "base_label": "USDT",
    "quote_label": "ETH"
  }
}
```

<table><thead><tr><th width="185">Key</th><th width="177">Type</th><th>Description</th></tr></thead><tbody><tr><td>base_label</td><td>String</td><td>The base label</td></tr><tr><td>quote_label</td><td>String</td><td>The quote label</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>


# Swap Extension

AddrEncapsulate astroport for easy use by Kryptonite.

## Config

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct Config {
    pub owner: Addr,
    pub new_owner: Option<Addr>,
}
```

<table><thead><tr><th width="185">Key</th><th width="204">Type</th><th>Description</th></tr></thead><tbody><tr><td>owner</td><td>Addr</td><td>The address of the contract's owner</td></tr><tr><td>new_owner*</td><td>Addr</td><td>The address of the contract's new owner</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

\* = optional

## InitMsg

```rust
#[cw_serde]
pub struct InstantiateMsg {
    pub owner: Addr,
}
```

```json
{
  "owner": "sei13xy3940qrar0k82k7fzhjpqaxj0h0tep7cpuxz"
}
```

<table><thead><tr><th width="185">Key</th><th width="204">Type</th><th>Description</th></tr></thead><tbody><tr><td>owner</td><td>Addr</td><td>The address of the contract's owner</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

## ExecuteMsg

### UpdatePairConfig&#x20;

Updates swap pair config , pair address find from astorport.

```rust
#[cw_serde]
pub enum ExecuteMsg {
    UpdatePairConfig {
        asset_infos: [AssetInfo; 2],
        pair_address: Addr,
        max_spread: Option<Decimal>,
        to: Option<Addr>,
    },
}
```

```
{
  "update_pair_config": {
    "asset_infos": [
      {
        "native_token": {
          "denom": "usei"
        }
      },
      {
        "native_token": {
          "denom": "factory/sei1h3ukufh4lhacftdf6kyxzum4p86rcnel35v4jk/usdt"
        }
      }
    ],
    "pair_address": "sei1pqcgdn5vmf3g9ncs98vtxkydc6su0f9rk3uk73s5ku2xhthr6avswrwnrx"
  }
}
```

<table><thead><tr><th width="175">Key</th><th width="151">Type</th><th>Description</th></tr></thead><tbody><tr><td>asset_infos</td><td>Pair</td><td>The asset infos of the pair</td></tr><tr><td>pair_address</td><td>Addr</td><td>The address of the pair contract</td></tr><tr><td>max_spread*</td><td>Decimal</td><td>The maximum spread of the pair</td></tr><tr><td>to*</td><td>Addr</td><td>The address of the contract to receive the swap fees. If not set, use self</td></tr></tbody></table>

\* = optional

### ChangeOwner

Change the contract `owner`.only can issued by current owner.

```rust
#[cw_serde]
pub enum ExecuteMsg {
    ChangeOwner {
        new_owner: Addr,
    },
}
```

```
{
  "change_owner": {
    "new_owner": "sei...addr..."
  }
}
```

<table><thead><tr><th width="174">Key</th><th width="156">Type</th><th>Description</th></tr></thead><tbody><tr><td>new_owner</td><td>Addr</td><td>The new owner of the contract</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### UpdatePairStatus

Update whether the trading pair pool is available, the default is available, the type is bool.

```rust
#[cw_serde]
pub enum ExecuteMsg {
    UpdatePairStatus {
        asset_infos: [AssetInfo; 2],
        is_disabled: bool,
    },
}
```

```json
{
  "update_pair_status": {
    "asset_infos": [
      {
        "native_token": {
          "denom": "usei"
        }
      },
      {
        "native_token": {
          "denom": "factory/sei1h3ukufh4lhacftdf6kyxzum4p86rcnel35v4jk/usdt"
        }
      }
    ],
    "is_disabled": false
  }
}
```

<table><thead><tr><th width="178">Key</th><th width="173">Type</th><th>Description</th></tr></thead><tbody><tr><td>asset_infos</td><td>Pair</td><td>Swap the asset pair</td></tr><tr><td>is_disabled</td><td>bool</td><td>The status of the pair</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### UpdatePairMaxSpread&#x20;

Set the maximum spread for a single pool, and use the default value of sparrow swap if it is not set by default

```
#[cw_serde]
pub enum ExecuteMsg {
    UpdatePairMaxSpread {
        asset_infos: [AssetInfo; 2],
        max_spread: Decimal,
    },
}
```

```
{
  "update_pair_max_spread": {
    "asset_infos": [
      {
        "native_token": {
          "denom": "usei"
        }
      },
      {
        "native_token": {
          "denom": "factory/sei1h3ukufh4lhacftdf6kyxzum4p86rcnel35v4jk/usdt"
        }
      }
    ],
    "max_spread": 123456
  }
}

```

<table><thead><tr><th width="190">Key</th><th width="205">Type</th><th>Description</th></tr></thead><tbody><tr><td>asset_infos</td><td>Pair</td><td>Swap the asset pair</td></tr><tr><td>max_spread</td><td>Decimal</td><td>The max spread of the pair</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### SetWhitelist&#x20;

To set those addresses you can call the SwapDenom method.

```
#[cw_serde]
pub enum ExecuteMsg {
    SetWhitelist {
        caller: Addr,
        is_whitelist: bool,
    },
}
```

```
{
  "set_whitelist": {
    "caller": "sei...addr...",
    "is_whitelist": true
  }
}
```

<table><thead><tr><th width="167">Key</th><th width="191">Type</th><th>Description</th></tr></thead><tbody><tr><td>caller</td><td>Addr</td><td>The address of the caller</td></tr><tr><td>is_whitelist</td><td>bool</td><td>The status of the pair</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### SwapDenom

Swap for assets of the specified denom type.

```rust
#[cw_serde]
pub enum ExecuteMsg {
    SwapDenom {
        from_coin: Coin,
        target_denom: String,
        to_address: Option<String>,
    },
}
```

```
{
  "swap_denom": {
    "from_coin": {
      "denom": "usei",
      "amount": "12300"
    },
    "target_denom": "factory/sei1h3ukufh4lhacftdf6kyxzum4p86rcnel35v4jk/usdt"
  }
}
```

<table><thead><tr><th width="173">Key</th><th width="178">Type</th><th>Description</th></tr></thead><tbody><tr><td>from_coin</td><td>Coin</td><td>The input asset type of the source</td></tr><tr><td>target_denom</td><td>String</td><td>The target asset type to swap to</td></tr><tr><td>to_address*</td><td>String</td><td>The destination address where the target asset is sent, defaulting to the address initiating the swap.</td></tr></tbody></table>

## QueryMsg

All query messages are described below. A custom struct is defined for each query response.

### QueryConfig

Returns information about global config.

```
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
    #[returns(ConfigResponse)]
    QueryConfig {},
}
```

```
{
  "query_config": {}
}
```

### ConfigResponse&#x20;

```rust
#[cw_serde]
pub struct ConfigResponse {
    pub owner: Addr,
}
```

```
{
  "owner": "sei...addr..."
}
```

<table><thead><tr><th width="165">Key</th><th width="178">Type</th><th>Description</th></tr></thead><tbody><tr><td>owner</td><td>Addr</td><td>The address of the contract's owner</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### QueryIsSwapWhitelist&#x20;

Returns whether the address is in the whitelist.

```rust
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
    #[returns(bool)]
    QueryIsSwapWhitelist {
        caller: Addr
    },
}
```

```
{
  "query_is_swap_whitelist": {
    "caller": "sei...addr..."
  }
}
```

<table><thead><tr><th width="178">Key</th><th width="182">Type</th><th>Description</th></tr></thead><tbody><tr><td>caller</td><td>Addr</td><td>The address of the caller</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

Return ture or false.

### QueryPairConfig&#x20;

Returns information about a specific swap pair config.

```rust
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
    #[returns(PairConfigResponse)]
    QueryPairConfig {
        asset_infos: [AssetInfo; 2]
    },
}
```

```json
{
  "query_pair_config": {
    "asset_infos": [
      {
        "native_token": {
          "denom": "usei"
        }
      },
      {
        "native_token": {
          "denom": "factory/sei1h3ukufh4lhacftdf6kyxzum4p86rcnel35v4jk/usdt"
        }
      }
    ]
  }
}
```

<table><thead><tr><th width="185">Key</th><th width="201">Type</th><th>Description</th></tr></thead><tbody><tr><td>asset_infos</td><td>Pair</td><td>Swap the asset pair</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### PairConfigResponse&#x20;

```rust
#[cw_serde]
pub struct PairConfigResponse {
    pub pair_address: Addr,
    pub is_disabled: bool,
    pub max_spread: Option<Decimal>,
    pub to: Option<Addr>,
}
```

```json
{
  "query_swap_info": {
    "asset_infos": [
      {
        "native_token": {
          "denom": "usei"
        }
      },
      {
        "native_token": {
          "denom": "factory/sei1h3ukufh4lhacftdf6kyxzum4p86rcnel35v4jk/usdt"
        }
      }
    ]
  }
}
```

<table><thead><tr><th width="172">Key</th><th width="205">Type</th><th>Description</th></tr></thead><tbody><tr><td>asset_infos</td><td>Pair</td><td>Swap the asset pair</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### QuerySwapInfo&#x20;

Returns information about a specific swap pair info.

```rust
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
    #[returns(SwapInfoResponse)]
    QuerySwapInfo {
        asset_infos: [AssetInfo; 2]
    },
}

```

```json
{
  "query_swap_info": {
    "asset_infos": [
      {
        "native_token": {
          "denom": "usei"
        }
      },
      {
        "native_token": {
          "denom": "factory/sei1h3ukufh4lhacftdf6kyxzum4p86rcnel35v4jk/usdt"
        }
      }
    ]
  }
}
```

### SwapInfoResponse&#x20;

```rust
#[cw_serde]
pub struct SwapInfoResponse {
    pub total_amount_in: Uint128,
    pub total_amount_out: Uint128,
}
```

```
{
  "total_amount_in": "123456",
  "total_amount_out": "123456"
}
```

<table><thead><tr><th width="204">Key</th><th width="196">Type</th><th>Description</th></tr></thead><tbody><tr><td>total_amount_in</td><td>Uint128</td><td>The total amount in of the pair</td></tr><tr><td>total_amount_out</td><td>Uint128</td><td>The total amount out of the pair</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### QuerySimulation

Returns information about a specific swap simulation.

```rust
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
    #[returns(SimulationResponse)]
    QuerySimulation {
        asset_infos: [AssetInfo; 2],
        offer_asset: Asset,
    },
}
```

```json
{
  "query_simulation": {
    "asset_infos": [
      {
        "native_token": {
          "denom": "usei"
        }
      },
      {
        "native_token": {
          "denom": "factory/sei1h3ukufh4lhacftdf6kyxzum4p86rcnel35v4jk/usdt"
        }
      }
    ],
    "offer_asset": {
      "info": {
        "native_token": {
          "denom": "usei"
        }
      },
      "amount": "123456"
    }
  }
}
```

<table><thead><tr><th width="174">Key</th><th width="201">Type</th><th>Description</th></tr></thead><tbody><tr><td>asset_infos</td><td>Pair</td><td>Swap the asset pair</td></tr><tr><td>offer_asset</td><td>Asset</td><td>the offer asset</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### SimulationResponse

```rust
/// This structure holds the parameters that are returned from a swap simulation response
#[cw_serde]
pub struct SimulationResponse {
    /// The amount of ask assets returned by the swap
    pub return_amount: Uint128,
    /// The spread used in the swap operation
    pub spread_amount: Uint128,
    /// The amount of fees charged by the transaction
    pub commission_amount: Uint128,
}
```

```
{
  "return_amount": "123456",
  "spread_amount": "123456",
  "commission_amount": "123456"
}
```

<table><thead><tr><th width="206">Key</th><th width="139">Type</th><th>Description</th></tr></thead><tbody><tr><td>return_amount</td><td>Uint128</td><td>The return amount of the swap</td></tr><tr><td>spread_amount</td><td>Uint128</td><td>The spread amount of the swap</td></tr><tr><td>commission_amount</td><td>Uint128</td><td>The commission amount of the swap</td></tr></tbody></table>

### QueryReverseSimulation&#x20;

Returns information about a specific reverse swap simulation

```rust
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
    #[returns(ReverseSimulationResponse)]
    QueryReverseSimulation {
        asset_infos: [AssetInfo; 2],
        ask_asset: Asset,
    },
}
```

```json
{
  "query_reverse_simulation": {
    "asset_infos": [
      {
        "native_token": {
          "denom": "usei"
        }
      },
      {
        "native_token": {
          "denom": "factory/sei1h3ukufh4lhacftdf6kyxzum4p86rcnel35v4jk/usdt"
        }
      }
    ],
    "ask_asset": {
      "info": {
        "native_token": {
          "denom": "usei"
        }
      },
      "amount": "123456"
    }
  }
}
```

<table><thead><tr><th width="169">Key</th><th width="173">Type</th><th>Description</th></tr></thead><tbody><tr><td>asset_infos</td><td>Pair</td><td>Swap the asset pair</td></tr><tr><td>ask_asset</td><td>Asset</td><td>The ask asset</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### ReverseSimulationResponse

```rust
/// This structure holds the parameters that are returned from a reverse swap simulation response.
#[cw_serde]
pub struct ReverseSimulationResponse {
    /// The amount of offer assets returned by the reverse swap
    pub offer_amount: Uint128,
    /// The spread used in the swap operation
    pub spread_amount: Uint128,
    /// The amount of fees charged by the transaction
    pub commission_amount: Uint128,
}
```

```
{
  "offer_amount": "123456",
  "spread_amount": "123456",
  "commission_amount": "123456"
}
```

<table><thead><tr><th width="204">Key</th><th width="158">Type</th><th>Description</th></tr></thead><tbody><tr><td>offer_amount</td><td>Uint128</td><td>The offer amount of the swap</td></tr><tr><td>spread_amount</td><td>Uint128</td><td>The spread amount of the swap</td></tr><tr><td>commission_amount</td><td>Uint128</td><td>The commission amount of the swap</td></tr></tbody></table>

### QueryCumulativePrices&#x20;

Returns information about a specific cumulative prices.

```rust
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
    #[returns(CumulativePricesResponse)]
    QueryCumulativePrices {
        asset_infos: [AssetInfo; 2],
    },
}
```

```
{
  "query_cumulative_prices": {
    "asset_infos": [
      {
        "native_token": {
          "denom": "usei"
        }
      },
      {
        "native_token": {
          "denom": "factory/sei1h3ukufh4lhacftdf6kyxzum4p86rcnel35v4jk/usdt"
        }
      }
    ]
  }
}
```

<table><thead><tr><th width="190">Key</th><th width="150">Type</th><th>Description</th></tr></thead><tbody><tr><td>asset_infos</td><td>Pair</td><td>Swap the asset pair</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### CumulativePricesResponse&#x20;

```rust
/// This structure is used to return a cumulative prices query response.
#[cw_serde]
pub struct CumulativePricesResponse {
    /// The two assets in the pool to query
    pub assets: [Asset; 2],
    /// The total amount of LP tokens currently issued
    pub total_share: Uint128,
    /// The last value for the token0 cumulative price
    pub price0_cumulative_last: Uint128,
    /// The last value for the token1 cumulative price
    pub price1_cumulative_last: Uint128,
}
```

```json
{
  "assets": [
    {
      "info": {
        "native_token": {
          "denom": "usei"
        }
      },
      "amount": "123456"
    },
    {
      "info": {
        "native_token": {
          "denom": "factory/sei1h3ukufh4lhacftdf6kyxzum4p86rcnel35v4jk/usdt"
        }
      },
      "amount": "123456"
    }
  ],
  "total_share": "123456",
  "price0_cumulative_last": "123456",
  "price1_cumulative_last": "123456"
}
```

<table><thead><tr><th width="238">Key</th><th width="188">Type</th><th>Description</th></tr></thead><tbody><tr><td>assets</td><td>Pair</td><td>Swap the asset pair</td></tr><tr><td>total_share</td><td>Uint128</td><td>The total share of the pair</td></tr><tr><td>price0_cumulative_last</td><td>Uint128</td><td>The price0 cumulative last of the pair</td></tr><tr><td>price1_cumulative_last</td><td>Uint128</td><td>The price1 cumulative last of the pair</td></tr></tbody></table>


# Staking Contracts

<table><thead><tr><th width="310">Contract Name</th><th>Address</th></tr></thead><tbody><tr><td>basset_sei_hub</td><td><a href="https://www.seiscan.app/pacific-1/accounts/sei1swe2fy3t49j2c2xl8l64ldjaqyr6khmaya60pl5kr4em2v2jp0ysa3xjum">sei1swe2fy3t49j2c2xl8l64ldjaqyr6khmaya60pl5kr4em2v2jp0ysa3xjum</a></td></tr><tr><td>basset_sei_reward</td><td><a href="https://www.seiscan.app/pacific-1/accounts/sei1z4ufkl7079c7sm26e978pf9hzw0mjcpd3vygehg0z5s3lwnjssks34ll90">sei1z4ufkl7079c7sm26e978pf9hzw0mjcpd3vygehg0z5s3lwnjssks34ll90</a></td></tr><tr><td>basset_sei_rewards_dispathcer</td><td><a href="https://www.seiscan.app/pacific-1/accounts/sei13nlndl7gnespwfzlkr8tpgqspnum2r6rfjt3vf8ewlhtfy2vxazsrlsfwa">sei13nlndl7gnespwfzlkr8tpgqspnum2r6rfjt3vf8ewlhtfy2vxazsrlsfwa</a></td></tr><tr><td>basset_sei_token_stsei</td><td><a href="https://www.seiscan.app/pacific-1/accounts/sei1ln7ntsqmxl8s502f83km9a475zyhcfhpj7v2fsm3pcmckdyys3tsktx9vk">sei1ln7ntsqmxl8s502f83km9a475zyhcfhpj7v2fsm3pcmckdyys3tsktx9vk</a></td></tr><tr><td>basset_sei_validators_registry</td><td><a href="https://www.seiscan.app/pacific-1/accounts/sei1ne3ssvk8gj7lvjprkyahk9k565pkvgqx09fur3qgpj85aaa3jrhqtev8hz">sei1ne3ssvk8gj7lvjprkyahk9k565pkvgqx09fur3qgpj85aaa3jrhqtev8hz</a></td></tr></tbody></table>

<br>


# SEILOR Token Contracts

<table><thead><tr><th width="203">Contract Name</th><th>Address</th></tr></thead><tbody><tr><td>seilor_token</td><td><a href="https://www.seiscan.app/pacific-1/accounts/sei10knxlv9e54z0xcywdhtycc63uf970aefeec73ycqwd75ep9nu45sh66m6a">sei10knxlv9e54z0xcywdhtycc63uf970aefeec73ycqwd75ep9nu45sh66m6a</a></td></tr><tr><td>veseilor_token</td><td><a href="https://www.seiscan.app/pacific-1/accounts/sei1u5h47cvux8hmecq0kcg3p8x6q59tjef4ry56863nmnys9s62z5qs4uc0jv">sei1u5h47cvux8hmecq0kcg3p8x6q59tjef4ry56863nmnys9s62z5qs4uc0jv</a></td></tr><tr><td>distribute</td><td><a href="https://www.seiscan.app/pacific-1/accounts/sei1aglzr0jmaus76ymg2wc9xgpxep2sdyctxn07l5mffny4l9x4374sl02a2n">sei1aglzr0jmaus76ymg2wc9xgpxep2sdyctxn07l5mffny4l9x4374sl02a2n</a></td></tr><tr><td>fund</td><td><a href="https://www.seiscan.app/pacific-1/accounts/sei1dkxhfdyn86c49k4aq8xe5yla7wcx72n2zkz9nn765w4pmj9kwajqkwxlq4">sei1dkxhfdyn86c49k4aq8xe5yla7wcx72n2zkz9nn765w4pmj9kwajqkwxlq4</a></td></tr><tr><td>boost</td><td><a href="https://www.seiscan.app/pacific-1/accounts/sei1yawtxvegg4y2d82wjvxh2tsqs254rlh55m62kl4r0vmq586p9h7swuxgjl">sei1yawtxvegg4y2d82wjvxh2tsqs254rlh55m62kl4r0vmq586p9h7swuxgjl</a></td></tr></tbody></table>


# Pool2 Farming

### Farming Reward

Users can provide liquidity to two pools on Astrosport and obtain LP Tokens for the respective pools. These LP Tokens can be staked in the SEILOR module of the platform to earn veSEILOR.

#### SEI/SEILOR POOL&#x20;

Reward duration: 30 days.

Total reward amount: 10,000,000 veSEILOR.

#### STSEI/SEIYAN POOL&#x20;

Reward duration: 30 days.

Total reward amount: 892,800 SEIYAN & 500,000 veSEILOR.

### Farming Contract Addresses

#### [SEI/SEILOR POOL](https://app.astroport.fi/pools/sei13pzdhenzugwa02tm975g2y5kllj26rf4x4ykpqtrfw2h4mcezmmqz06dfr/provide)

<table><thead><tr><th width="257">Name</th><th>Address</th></tr></thead><tbody><tr><td>lp_token</td><td><a href="https://www.seiscan.app/pacific-1/accounts/sei1cw59j944v9uvseq3jz67tft7p92yhnff0l52eek3d5qnxj908wpqz4vrr8">sei1cw59j944v9uvseq3jz67tft7p92yhnff0l52eek3d5qnxj908wpqz4vrr8</a></td></tr><tr><td>pool</td><td><a href="https://www.seiscan.app/pacific-1/accounts/sei13pzdhenzugwa02tm975g2y5kllj26rf4x4ykpqtrfw2h4mcezmmqz06dfr">sei13pzdhenzugwa02tm975g2y5kllj26rf4x4ykpqtrfw2h4mcezmmqz06dfr</a></td></tr></tbody></table>

#### [STSEI/SEIYAN POOL](https://app.astroport.fi/pools/sei1qgyrkxvnydcvtzj8w6e4n2p07pykxw4y25ntncz5a4puz6fd6e9slq6jgk/provide)

<table><thead><tr><th width="264">Name</th><th>Address</th></tr></thead><tbody><tr><td>stsei_token</td><td><a href="https://www.seiscan.app/pacific-1/accounts/sei1ln7ntsqmxl8s502f83km9a475zyhcfhpj7v2fsm3pcmckdyys3tsktx9vk">sei1ln7ntsqmxl8s502f83km9a475zyhcfhpj7v2fsm3pcmckdyys3tsktx9vk</a></td></tr><tr><td>seiyan_token</td><td><a href="https://www.seiscan.app/pacific-1/accounts/sei1hrndqntlvtmx2kepr0zsfgr7nzjptcc72cr4ppk4yav58vvy7v3s4er8ed">sei1hrndqntlvtmx2kepr0zsfgr7nzjptcc72cr4ppk4yav58vvy7v3s4er8ed</a></td></tr><tr><td>lp_token</td><td><a href="https://www.seiscan.app/pacific-1/accounts/sei1hxh76ty0fk9esq3qsvrhzz6fsvmh55j59xnduswn6dfnsyjs06vqcye8yf">sei1hxh76ty0fk9esq3qsvrhzz6fsvmh55j59xnduswn6dfnsyjs06vqcye8yf</a></td></tr><tr><td>pool</td><td><a href="https://www.seiscan.app/pacific-1/accounts/sei1qgyrkxvnydcvtzj8w6e4n2p07pykxw4y25ntncz5a4puz6fd6e9slq6jgk">sei1qgyrkxvnydcvtzj8w6e4n2p07pykxw4y25ntncz5a4puz6fd6e9slq6jgk</a></td></tr></tbody></table>


# Audit

Kryptonite has been fully audited by [Halborn Security](https://twitter.com/HalbornSecurity/status/1729503678095044804?s=20).\
\
[Announcement Tweet](https://x.com/HalbornSecurity/status/1729503678095044804?s=20)\
[Full Report](https://bit.ly/Halborn_Kryptonite)

<figure><img src="/files/WF5e3pPLjVnh7BAA5Z7b" alt=""><figcaption></figcaption></figure>


# Token Contracts

**SEILOR:** sei10knxlv9e54z0xcywdhtycc63uf970aefeec73ycqwd75ep9nu45sh66m6a

**SEILOR (BSC-BEP20):** 0xe29142e14e52bdfbb8108076f66f49661f10ec10

**veSEILOR:** sei1u5h47cvux8hmecq0kcg3p8x6q59tjef4ry56863nmnys9s62z5qs4uc0jv

**stSEI:** sei1ln7ntsqmxl8s502f83km9a475zyhcfhpj7v2fsm3pcmckdyys3tsktx9vk

**LP SEI/SEILOR:** sei1cw59j944v9uvseq3jz67tft7p92yhnff0l52eek3d5qnxj908wpqz4vrr8


# Exchanges

Where is SEILOR listed?

CEX's\
\
[ByBit](https://www.bybit.com/en/)\
[MEXC](https://www.mexc.com/)\
[Gate](https://www.gate.io/)\
[Coinone](https://coinone.co.kr/)\
[Crypto.com](https://crypto.com/us)\
\
DEX's\
\
[PancakeSwap](https://pancakeswap.finance/)\
[Astroport](https://astroport.fi/en)


# Socials + Links

**Kryptonite Homepage:** <https://kryptonite.finance/>\
**dApp:** <https://app.kryptonite.finance/>\
**Github:** TBA\
**Litepaper:** <https://www.kryptonite.finance/litepaper>\
**DefiLlama:** <https://defillama.com/protocol/kryptonite>

🤝 Social 🤝

**Twitter:** <https://twitter.com/Kryptonite_fi>\
**Discord:** <https://discord.gg/kryptonite-fi>\
**Telegram:** <https://t.me/kryptonitefi>\
**Galxe:** <https://galxe.com/kryptonite>\
**Zealy:** <https://zealy.io/c/kryptonite/questboard>


