Documentation
SocialsStatisticsLaunch App
  • Welcome to Mars Protocol
  • Getting Started
    • How to set up a Wallet
    • Connect your wallet
    • Using a Credit Account
  • Credit Accounts
  • Perpetual Futures (Perps)
    • Perps Vault (Counterparty Vault)
    • Funding Rate Mechanism
    • Price Impact
    • Open Interest Caps
    • Vault Solvency Protection
    • Health Factor
    • Liquidations
  • Spot & Margin Trading
  • Lending & Borrowing
  • Leveraged Yield Farming
  • High Leverage Strategies
  • Managed Vaults
    • Creating a Vault
      • How to Resume Vault Creation
    • Managing a Vault
    • Depositing into Vault
  • Risk Methodology
    • Asset Listing
    • Protocol Risk Framework
    • Perps Risk Framework
      • Maximum Leverage & LTVs
      • SkewScale
      • Open Interest Caps
      • Maximum Funding Velocity
      • Mitigating Risks of Static Parameters
    • Deposit Caps Risk Framework
  • Governance
    • MARS Token
  • Smart Contracts
    • Address Provider
    • Account NFT
    • Credit Manager
    • Health
    • Incentives
    • Oracle
    • Params
    • Red Bank
    • Rewards Collector
    • Swapper
    • Zapper
    • Perps
  • Brand kit
    • The Mars Brand
  • Legal
    • Mars FUD Bible
    • Terms of Service
    • Privacy Policy
    • Cookie Policy
Powered by GitBook
On this page
  • Deployments
  • Types
  • Queries
  • Methods
Edit on GitHub
Export as PDF
  1. Smart Contracts

Incentives

The Incentives Contract handles additional incentives. It offers the capability to incentivise markets permissionlessly by third parties. Incentive assets have to be whitelisted to be applied.

Last updated 1 month ago

Deployments

Neutron:

Osmosis:


Types

The types of the Incentives Contract can be found .

For reference on the Queries and Methods:

Base Types
type Addr = string
type Decimal = string
type Uint128 = string
Coin Types
interface Coin {
  amount: Uint128
  denom: string
  [k: string]: unknown
}

Queries

active_emissions

Return active emissions for a specific market by denom.

Query message
{
    active_emissions: {
        denom: string
        kind: 'red_bank' | 'perp_vault'
    } 
}
Return output
{
    data: [
        {
              denom: string
              emission_rate: Uint128
        },
        ...
    ]   
}

config

Query message
{
    config: {}    
}
Return output
{
    data: {
        address_provider: Addr
        epoch_duration: number
        max_whitelisted_denoms: number
        owner?: string | null
        proposed_new_owner?: string | null
        whitelist_count: number
    }
}

emission

Query message
{
    emission: {
        denom: string
        incentive_denom: string
        kind: 'red_bank' | 'perp_vault'
        timestamp: number
    } 
}
Return output
{
    data: {
        emission_rate: Uint128
        epoch_start: number
    }
}

emissions

Query message
{
    emissions: {
        denom: string
        incentive_denom: string
        kind: 'red_bank' | 'perp_vault'
        limit?: number | null
        start_after_timestamp?: number | null
    }
}
Return output
{
    data: [
        {
            emission_rate: Uint128
            epoch_start: number
        },
        ...
    ]   
}

incentive_state

Query message
{
    incentive_state: {
        denom: string
        incentive_denom: string
        kind: 'red_bank' | 'perp_vault'
    }
}
Return output
{
    data: {
          denom: string
          incentive_denom: string
          index: Decimal
          kind: 'red_bank' | 'perp_vault'
          last_updated: number
    }
}

incentive_states

Query message
{
    incentive_states: {
        limit?: number | null
        start_after_denom?: string | null
        start_after_incentive_denom?: string | null
        start_after_kind?: 'red_bank' | 'perp_vault' | null
    }
}
Return output
{
    data: [
        {
            denom: string
            incentive_denom: string
            index: Decimal
            kind: 'red_bank' | 'perp_vault'
            last_updated: number
        },
        ...   
    ]
}

staked_astro_lp_position

Query message
{
    staked_astro_lp_position: {
        account_id: string
        lp_denom: string
    }
}
Return output
{
    data: {
          lp_coin: Coin
          rewards: Coin[]
    }
}

staked_astro_lp_positions

Query message
{
    staked_astro_lp_positions: {
        account_id: string
        limit?: number | null
        start_after?: string | null
    }
}
Return output
{
    data: {
        data: [
            {
                lp_coin: Coin
                rewards: Coin[]
            },
            ...
        ]
        metadata: {
            has_more: boolean
        }
    }
}

staked_astro_lp_rewards

Query message
{
    staked_astro_lp_rewards: {
        account_id: string
        lp_denom: string
    }
}
Return output
{
    data: {
        data: [
            [string, Coin[]],
            ...
        ]
        metadata: {
            has_more: boolean
        }
    }
}

user_unclaimed_rewards

Query message
{
    user_unclaimed_rewards: {
        account_id?: string | null
        limit?: number | null
        start_after_denom?: string | null
        start_after_incentive_denom?: string | null
        start_after_kind?: 'red_bank' | 'perp_vault' | null
        user: string
    }
}
Return output
{
    data: Coin[]
}

whitelist

Query message
{
    whitelist: {}
}
Return output
{
    data: [
        {
            denom: string
            min_emission_rate: Uint128
        },
        ...   
    ]
}

Methods

balance_change

Execution message
{
    balance_change: {
        account_id?: string | null
        denom: string
        kind: 'red_bank' | 'perp_vault'
        total_amount: Uint128
        user_addr: Addr
        user_amount: Uint128
    }
}

claim_rewards

Execution message
{
    claim_rewards: {
        account_id?: string | null
        limit?: number | null
        start_after_denom?: string | null
        start_after_incentive_denom?: string | null
        start_after_kind?: 'red_bank' | 'perp_vault' | null
    }
}

claim_staked_astro_lp_rewards

Execution message
{
    claim_staked_astro_lp_rewards: {
        account_id: string
        lp_denom: string
    }    
}

set_asset_incentive

Execution message
{
    set_asset_incentive: {
        denom: string
        duration: number
        emission_per_second: Uint128
        incentive_denom: string
        kind: 'red_bank' | 'perp_vault'
        start_time: number
    }
}

stake_astro_lp

Execution message
{
    stake_astro_lp: {
        account_id: string
        lp_coin: Coin
    }
}

unstake_astro_lp

Execution message
{
    unstake_astro_lp: {
        account_id: string
        lp_coin: ActionCoin
    }
}
neutron1aszpdh35zsaz0yj80mz7f5dtl9zq5jfl8hgm094y0j0vsychfekqxhzd39
osmo1nkahswfr8shg8rlxqwup0vgahp0dk4x8w6tkv3rra8rratnut36sk22vrm
here