Hyperion Docs
  • Home
  • Overview
    • Introduction
    • Contact
    • Glossary
    • Roadmap
  • Concepts
    • Concentrated Liquidity
    • Fees
    • Swap
    • Liquidity Mining
    • Range Order
    • Drips
  • Guides
    • FAQ
    • How to Swap
    • How to Create New Position
    • How to Add/Remove Liquidity
    • How to Create a New Pool
    • How to Place a Limit Order
  • Developer
    • Dev Overview
    • via SDK
      • Getting Started
      • Prerequisites
      • Features Available
        • Get pools
        • Get positions
        • Get ticks
        • Create pool
        • Add Liquidity
        • Remove Liquidity
        • Fee & Rewards
        • Swap
        • Types
    • via Contract
      • Get Started
      • Data structure
      • Features available
        • Create pool
        • Swap
        • Open position
        • Add liquidity
        • Remove liquidity
        • Collect fees
        • Collect rewards
    • via API
    • Contract ErrorCode
  • Security
    • Audits
  • Resource
    • Brand Asset
Powered by GitBook
On this page
  1. Developer
  2. via Contract
  3. Features available

Add liquidity

Function

For adding liquidity into position , use add_liquidity in pool_v3 module.

 public fun add_liquidity(
        user: &signer,
        position: Object<position_v3::Info>,
        liquidity_delta: u128,
        fa_a: FungibleAsset,
        fa_b: FungibleAsset
    ):(u64, u64, FungibleAsset, FungibleAsset) {
       ...
    }

liquidity_delta: liquidity amount desired to added into position

fa_a: token a fungible asset

fa_b: token b fungible asset

PreviousOpen positionNextRemove liquidity

Last updated 4 months ago