WispSwap whitepaper
  • ⏺️Overview
  • πŸŽ‡Launch & Enchated Pools
  • 🀝Business Enquiries
  • products
    • πŸ™ŒGetting Started
    • πŸ”„Token Swap
      • ↕️Concentrated Liquidity Market Maker
      • ⬆️Asymmetric Liquidity Market Maker
      • πŸ’§ Liquidity Pools
        • πŸ“ΌPool Types
        • πŸ’ΉZap
      • πŸ–ΌοΈspNFT
        • πŸ“°Properties
        • ⚑Yield farming
    • ⭐LSDfi
      • Overview
      • Background
        • LSTfi Challenges
        • Solutions with wispSUI
      • WispSUI
        • Risk mitigation
        • Basket composition
        • Basket rebalancing mechanism
      • vdAMM: Validator Decentralization Automated Market Maker
        • Overview
        • Fees structure
      • Integrating with wispSui
        • Developemt progress
        • Contract addresses
        • Minting wispSui
        • Swapping between LSTs
        • Other view functions
      • How to
        • Mint wispSUI with SUI
        • Mint wispSUI with LSTs
        • Swap between LSTs
        • Stake wispSUI
        • Withdraw wispSUI into LSTs
    • πŸ†Wisp-Prediction
      • 🀼Binary Option Prediction Market
      • πŸ–‡οΈCross-chain Prediction Protocol
      • ❔Wisp-Prediction FAQ
    • πŸ”ŒveWISP Plug-ins
      • 🀜Farm Boosting
      • πŸ”…Dividends Pool
      • ✍️Voting
    • πŸŒ‰Cross-Chain Bridge
  • Tokenomics
    • πŸ‘ΎWISP
    • πŸ‘½veWISP
    • πŸ’³Protocol earnings
    • πŸ”₯Deflation Mechanism
  • references
    • 🎯Roadmap
    • πŸ›‘οΈAudit
    • ♾️Official Links
    • πŸ—ƒοΈMedia Kit
    • ❔General FAQ
Powered by GitBook
On this page
  1. products
  2. LSDfi
  3. Integrating with wispSui

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

PreviousContract addressesNextSwapping between LSTs

Last updated 1 year ago

⭐