StellaSwap
  • 🖐️Intro
  • DEX CORE
    • StellaSwap V4
      • ⚡Concentrated Liquidity
      • Automated Earnings
      • Telegram Position Tracker
    • Cool Tools
    • 🌊Liquid Staking
      • Contracts
      • Audit
  • Tokenomics
    • STELLA Token
  • ❓How-To Guides
    • Liquidity Staking
      • Add Liquidity (Manual)
      • Add Liquidity (Auto)
      • Create Limit Orders
      • Create Community Pool
      • Migrate Liquidity From V2 to Pulsar
      • Manage Out of Range Position
    • Cross-Chain Swap
    • Wallet & Network
      • Create and Fund Polkadot .js Wallet
      • Create Metamask Wallet
      • Connect Metamask to Moonbeam
      • Token Address List for Manual Import
      • Moonbeam Block Explorer List
    • Native Transfer (XCM)
      • How to Get Phala (PHA.xc) Token On Moonbeam
      • How to Get Pendulum (xcPEN) Token On Moonbeam
      • How to Get ZTG Token On Moonbeam (xcZTG)
      • How to Get Bifrost (BNC) Token On Moonbeam
      • How to Get Bifrost Voucher FileCoin (xcvFIL) Token On Moonbeam
      • How to Send Polkadot (DOT) to Moonbeam
      • How to Get INTR & iBTC On Moonbeam
      • How to Get Centrifuge (CFG) Token On Moonbeam
      • How to Get Acala Dot (xcLDOT) Token on Moonbeam
      • How to Get Astar Token on Moonbeam
      • How to Get Native USDT (xcUSDT) On Moonbeam
      • How to Send USDT From Binance To Moonbeam
      • How to Send INTR & iBTC to Moonbeam (XCM)
  • Resources
    • Contract Addresses
    • General FAQ
    • Security
      • Audit
      • Bug Bounty
    • Team
  • Developers
    • Smart Contracts
    • Swap SDK
  • Dev Resource
    • API Reference
    • Pulsar V3 Contracts
    • Flashloan (V3)
  • 🌎Community
    • Blog
    • Discord
    • Github
    • Twitter
    • Reddit
Powered by GitBook
On this page
  1. Dev Resource

API Reference

Pulsar V3 utilizes Algebra's codebase and as such, the documentation is derived from Algebra.

Main Contracts

AlgebraFactory.sol

Deploys pools and data storages, manages ownership and dynamic fee configuration

AlgebraPool.sol

Main contract of pair with concentrated liquidity and and dynamic fee. It contains the logic of swaps, liquidity providing, flash loans. Allows you to swap deflationary tokens and has protection from “Just-In-Time” liquidity providing

AlgebraPoolDeployer.sol

A contract that constructs a pool must implement this to pass arguments to the pool. This is used to avoid having constructor arguments in the pool contract, which results in the init code hash of the pool being constant allowing the CREATE2 address of the pool to be cheaply computed on-chain

DataStorageOperator.sol

This contract is used for interacting with DataStorage library

AdaptiveFee.sol

Calculates fee based on combination of sigmoids

DataStorage.sol

DataStorage provides price, liquidity, volatility data useful for a wide variety of system designs. Mainly used to calculate dynamic fee. Instances of stored dataStorage data, "timepoints", are collected in the dataStorage array Timepoints are overwritten when the full length of the dataStorage array is populated. The most recent timepoint is available by passing 0 to getSingleTimepoint()

PriceMovementMath.sol

Library that used for computing the result of a swap

TickManager.sol

Library for managing tick processes and relevant calculations

TickTable.sol

Packed tick initialized state library. Stores a packed mapping of tick index to its initialized state. The mapping uses int16 for keys since ticks are represented as int24 and there are 256 (2^8) values per word

TokenDeltaMath.sol

TokenDeltaMath contains the math that uses square root of price as a Q64.96 and liquidity to compute deltas

PreviousSwap SDKNextPulsar V3 Contracts

Last updated 1 year ago