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.

Deployments

Neutron: neutron1dr0ckm3u2ztjuscmgqjr85lwyduphxkgl3tc02ac8zp54r05t5dqp5tgyq

Osmosis: osmo17qwvc70pzc9mudr8t02t3pl74hhqsgwnskl734p4hug3s8mkerdqzduf7c


Types

The types of the Zapper Contract can be found here.

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

Last updated