Minting wispSui

The following section details how to mint wispSui with a list of supported LSDs and Sui.

Deposit

LSDfi::lsdfi::deposit

Module: lsdfi

public entry fun deposit<T>(
    pool_registry: &mut LSDFIPoolRegistry,
    aggregator: &Aggregator,
    lst: Coin<T>,
    clock: &Clock,
    ctx: &mut TxContext
)

Type parameters:

  • T: LST to deposit into the pool

Parameters:

  • pool_registry: mutable reference to the LSDFIPoolRegistry object

  • aggregator: reference to the Aggregator object in the WispLSDFIAggregator package

  • lst: LST coin of type T

  • clock: reference to the Clock object (address: `0x6``)

Use: Put lst into the pool and transfer back to the sender corresponding amount of wispSUI

LSDfi::lsdfi::deposit_non_entry

public fun deposit_non_entry<T>(
    pool_registry: &mut LSDFIPoolRegistry,
    aggregator: &Aggregator,
    lst: Coin<T>,
    clock: &Clock,
    ctx: &mut TxContext
): Coin<WISPSUI>

Same as deposit but returns a Coin of wispSUI type for further actions instead of transferring it to the sender.

LSDfi::lsdfi::deposit_mul_coin

public entry fun deposit_mul_coin<T>(
        pool_registry: &mut LSDFIPoolRegistry,
        aggregator: &Aggregator,
        lsts: vector<Coin<T>>,
        amount: u64,
        clock: &Clock,
        ctx: &mut TxContext
)

Same as deposit but uses multiple Coins; leftovers will be transferred back to the sender.

  • lsts: a vector of coins of type T

  • amount: the amount to add to the pool

Deposit SUI

LSDfi::lsdfi::deposit_SUI

public entry fun deposit_SUI(
    pool_registry: &mut LSDFIPoolRegistry,
    exchange_pool_registry: &mut PoolRegistry,
    aggregator: &Aggregator,
    sui: Coin<SUI>,
    clock: &Clock,
    ctx: &mut TxContext
)

Type parameters:

  • T: LST to deposit into pool

Parameters:

  • pool_registry: mutable reference to the LSDFIPoolRegistry object

  • exchange_pool_registry: mutable reference to the PoolRegistry object of WispSwap AMM contract

  • aggregator: reference to the Aggregator object in the WispLSDFIAggregator package

  • lst: LST coin of type T

  • clock: reference to Clock object (address: 0x6)

Use: Put sui into pool and transfer back to the sender the corresponding amount of wispSUI

LSDfi::lsdfi::deposit_SUI_non_entry

public fun deposit_SUI_non_entry(
        pool_registry: &mut LSDFIPoolRegistry,
        exchange_pool_registry: &mut PoolRegistry,
        aggregator: &Aggregator,
        sui: Coin<SUI>,
        clock: &Clock,
        ctx: &mut TxContext
): Coin<WISPSUI>

Same as deposit_SUI but return a Coin of wispSUI type for further actions instead of transferring it back to sender

LSDfi::lsdfi::deposit_SUI_mul_coin

public entry fun deposit_SUI_mul_coin(
    pool_registry: &mut LSDFIPoolRegistry,
    exchange_pool_registry: &mut PoolRegistry,
    aggregator: &Aggregator,
    suis: vector<Coin<SUI>>,
    amount: u64,
    clock: &Clock,
    ctx: &mut TxContext
)

Same as deposit_SUI_mul_coin but use multiple Coin objects, leftovers will be transferred back to sender

  • suis: vector of SUI coins

  • amount: amount to add into pool

Last updated