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 After Failed Transaction
    • 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

Zapper

The Zapper contract serves as a wrapper to facilitate the provision and withdrawal of liquidity for the Mars Protocols Farm feature. It also handles estimations based on the data provided.

Last updated 25 days ago

Deployments

Neutron:

Osmosis:


Types

The types of the Zapper Contract can be found .

For reference on the Queries and Methods:

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

Queries

estimate_provide_liquidity

Estimates the amount of liquidity pool (LP) tokens that are returned after providing liquidity to a certain LP.

Query message
{
    estimate_provide_liquidity: {
        coins_in: Coin[]
        lp_token_out: string
    }
}
Return output
{
    data: Uint128
}

estimate_withdraw_liquidity

Query message
{
    estimate_withdraw_liquidity: {
        coin_in: Coin
    }
}
Return output
{
    data: Coin[]
}

Methods

callback

Execution message
{
    callback: {
        return_coin: {
            balance_before: Coin
            recipient: Addr
        }
    }
}

provide_liquidity

Execution message
{
    provide_liquidity: {
        lp_token_out: string
        minimum_receive: Uint128
        recipient?: string | null
    }
}

withdraw_liquidity

Execution message
{
    withdraw_liquidity: {
        minimum_receive: Coin[]
        recipient?: string | null
    }
}
neutron1dr0ckm3u2ztjuscmgqjr85lwyduphxkgl3tc02ac8zp54r05t5dqp5tgyq
osmo17qwvc70pzc9mudr8t02t3pl74hhqsgwnskl734p4hug3s8mkerdqzduf7c
here