Stryke Docs
HomeGitHubSocials
  • ⚑Introducing Stryke
  • πŸ”Products Overview
    • Product Overview (CLAMM)
      • For Option Traders
      • For Liquidity Providers
  • 🌚Tokenomics
    • SYK Token
    • xSYK Token
    • Reward Gauges
    • Protocol Fees
  • πŸšΆβ€β™‚οΈUI Walkthroughs
    • CLAMM Walkthrough
      • Connect Wallet
      • Navigate Markets
      • Trade Options
      • Limit Exercise
      • Provide Liquidity
      • Reward Gauges
  • ⛓️Developers
    • Contracts
      • LP Management
        • Mint a Position
        • Burn a Position
        • Reserve Liquidity
        • Withdraw Reserved Liquidity
      • Trading
        • Mint Option
        • Exercise Option
    • APIs
      • xSYK
      • CLAMM
        • Trading
          • Purchase
          • Exercise
        • LP management
        • Option markets
        • Strikes chain
    • Deployed Addresses
      • CLAMM
      • Tokens & Others
      • Gauges
    • Bug Bounty Program
  • πŸ“šREFERENCES
    • Glossary
    • Audits
    • Partners
    • Media Kit
Powered by GitBook
LogoLogo

Β© 2024 Stryke

On this page

Was this helpful?

  1. Developers
  2. Contracts
  3. LP Management

Burn a Position

PreviousMint a PositionNextReserve Liquidity

Last updated 9 months ago

Was this helpful?

Burn an existing position using the specified handler.

function burnPosition(IHandler _handler, bytes calldata _burnPositionData)
    external
    onlyWhitelistedHandlers(_handler)
    nonReentrant
    returns (uint256 sharesBurned);

Parameters

Name
Type
Description

_handler

IHandler

The address of the handler to use.

_burnPositionData

bytes

The data required to burn the position.

Returns

Name
Type
Description

sharesBurned

uint256

The number of shares burned.

The `_burnPositionData` parameter has to be constructed the following way:

struct BurnPositionParams {
    IUniswapV3Pool pool;
    address hook;
    int24 tickLower;
    int24 tickUpper;
    uint128 shares;
}

bytes memory _burnPositionData = abi.encode(
    _params.pool,
    _params.hook,
    _params.tickLower,
    _params.tickUpper,
    _params.shares
);

// To decode:
BurnPositionParams memory decodedParams = abi.decode(encodedData, (BurnPositionParams));

BurnPositionParams Struct

Field Name
Type
Description

pool

IUniswapV3Pool

The Uniswap V3 pool contract

hook

address

The address of the hook contract

tickLower

int24

The lower tick of the position

tickUpper

int24

The upper tick of the position

shares

uint128

The amount of shares to burn

⛓️
Contract Git Source