LogoLogo
  • Persistence Hub
    • πŸ‘“Overview
    • 🌐Persistence Ecosystem
  • Begin & Explore
    • πŸ”Wallet Setup
    • πŸ““Getting Your Persistence Address
    • πŸ’°Acquiring $XPRT Tokens
  • Products
    • 🦾Persistence DEX (V1)
      • πŸ“˜Introduction
      • πŸ“–Guides
        • πŸ‘¨β€πŸ’ΌManaging Assets
        • πŸ’±Trading Assets
        • 🚰Providing Liquidity
        • ⛓️Bonding/Unbonding Tokens
        • πŸŽ‰Claiming Rewards
        • πŸ—οΈCreating New Pool
          • πŸŒ€Metastable Pool
          • βš–οΈWeighted Pool
          • 🧊Stable Swap Pool
      • πŸŠβ€β™‚οΈPools
      • ⚑Instant LP Unbonding
      • 🎁Tradooor Rebate Program
      • πŸ’°Fees
      • πŸ†Rewards
      • βš™οΈTechnical Architecture
    • Bitcoin Cross-Chain Swaps (V2)
      • 🌟Introduction
      • πŸ“šFundamentals
        • πŸ’±BTCfi
        • πŸŒ‰Bitcoin Layer 2s
        • Interoperability for BTCfi
        • πŸ’‘Intents for Blockchain Interoperability
      • πŸ”€Traditional Bridges vs. Intent-Based Swaps
      • βš™οΈProduct Mechanism
  • πŸ’‚Security
    • πŸ“–Audits
  • Participate & Explore
    • $XPRT Token
      • πŸ›’Acquire
      • πŸ“ˆStake
      • πŸ›οΈGovernance
    • πŸ–₯️Alternative Frontends
      • πŸ”ƒHosting IPFS Versions with Pinata
      • πŸ€–IPFS Automation
    • πŸ’ΌWallets
    • πŸ”Explorers
    • πŸ’ΈGrants
  • Persistence Core-1 Chain
    • 🟒Running Nodes
      • Run a Local Node
      • Run a Testnet Node
      • Run a Mainnet Node
      • Node operations
        • State Sync
        • Run in the background
        • Cosmovisor upgrades
        • Manual upgrades
      • Seed & Peers
    • Public Infrastructure
      • Persistence Testnet
      • Endpoints
      • Snapshots & Archival Nodes
      • Faucets
      • Chain Registry
    • πŸ›‘οΈValidators
      • Validate on Testnet
      • Validate on Mainnet
      • Validator Communication
    • πŸ“‘Relayers
      • IBC Channels
      • IBC Relayers
      • Relay on Mainnet
      • Relay on Testnet
    • πŸ«—Liquid Staking Module
      • For Validators
    • πŸ“„Smart Contracts
      • Overview
      • Uploading a Contract
    • πŸ‘¨β€πŸ’»Developer Tools
      • Persistence JS
      • Persistence SDK
    • βš’οΈCommunity Tools
  • Community & Support
    • πŸ‡ΉπŸ‡°Foundation Delegations
      • ➑️Round 1 - Closed
      • ➑️Round 2 - Closed
      • ⭐Bonus Delegation
      • ➑️Round 3 - Delegation Period Over
    • β­•Coin-type Migration from 750 to 118
      • Persistence Wallet
      • Keplr Wallet
      • Ledger Hardware Wallet
      • Cosmostation Wallet
      • Coin98 Super Wallet
      • Math Wallet
      • Leap Wallet
      • Citadel Wallet
    • 🌎Geofencing on Persistence
    • 😍Connect & Follow
Powered by GitBook
On this page
  • Vault
  • Keeper
  • Router
  • Multistaking
  • Stableswap Pool
  • Weighted Pool
  • LP Token

Was this helpful?

Edit on GitHub
  1. Products
  2. Persistence DEX (V1)

Technical Architecture

PreviousRewardsNextBitcoin Cross-Chain Swaps (V2)

Last updated 11 months ago

Was this helpful?

Persistence DEX's base is made up of the following contracts:

  • Vault

  • Keeper

  • Router

  • Multistaking

  • Stableswap Pool

  • Weighted Pool

  • LP Token

Vault

The Vault is the core of Persistence DEX; it is a smart contract that holds and manages all tokens in each Persistence DEX Pool. It is also the portal through which most Persistence DEX operations (swaps/joins/exits) occur.

Contract
Address

Vault

persistence1k8re7jwz6rnnwrktnejdwkwnncte7ek7gt29gvnl3sdrg9mtnqkstujtpg

Keeper

The Keeper contract accounts for all the protocol fees collected by the Persistence DEX Vault. The fee charged during swaps by the Persistence DEX Vault is transferred to the keeper contract.

Contract
Address

Keeper

persistence1sthrn5ep8ls5vzz8f9gp89khhmedahhdqd244dh9uqzk3hx2pzrsvpslsg

Router

A router contract is a helper contract that facilitates multi-hop swaps via Persistence DEX pools.

Contract
Address

Router

persistence132xmxm33vwjlur2pszl4hu9r32lqmqagvunnuc5hq4htps7rr3kqsf4dsk

Multistaking

Persistence DEX allows projects/teams to incentivize liquidity by rewarding liquidity providers in multiple tokens.

Contract
Address

Multistaking

persistence1ery8l6jquynn9a4cz2pff6khg8c68f7urt33l5n9dng2cwzz4c4qs72n0q

Stableswap Pool

The Stable Pool contract implements the curve’s stableswap invariant for up to 5 assets in the pool and implements compute calculations on Liquidity provision/withdrawal and swaps. In addition, it also supports liquid staking derivatives by the use of a scaling factor.

Weighted Pool

The Weighted Pool contract is based on a particular N-dimensional surface which defines a cost function for the exchange of any pair of tokens held in a Pool which was introduced by Balancer. Persistence DEX's weighted pool accepts a maximum of 8 tokens and the weights cannot be updated once the pool has been initialized.

LP Token

The LP token contract is the standard cw-20 token contract used for LP tokens minted when liquidity is provided to the Persistence DEX pools.

Code:

Code:

Code:

The Multistaking contract is used to provide incentives to LPs of the protocol. Incentivizers can propose rewards for a particular LP token for a given period of time, and LPs can bond their LP tokens with the multistaking contract to earn those rewards during the reward’s schedule. The implementation is similar to the but differs in the sense that it supports multiple LP tokens and multiple rewards per LP token.

Code:

Code:

Code:

Code:

🦾
βš™οΈ
https://github.com/dexter-zone/dexter_core/tree/main/contracts/vault
https://github.com/dexter-zone/dexter_core/tree/main/contracts/keeper
https://github.com/dexter-zone/dexter_core/tree/main/contracts/router
Anchor Staking Contract
https://github.com/dexter-zone/dexter_core/tree/main/contracts/multi_staking
https://github.com/dexter-zone/dexter_core/tree/main/contracts/pools/stable_pool
https://github.com/dexter-zone/dexter_core/tree/main/contracts/pools/weighted_pool
https://github.com/dexter-zone/dexter_core/tree/main/contracts/lp_token