LogoLogo
  • Onboarding
    • 🀝Introduction
    • πŸ€–Meet Dexter
  • Fundamentals
    • πŸͺ™Yield-Generating Assets
    • πŸ’§Liquid-Staked Assets
  • Deep Dive
    • πŸŠβ€β™‚οΈPools
      • Stableswap
      • Weighted Pools
      • Metastable Pools
    • πŸ’ΈFees
    • πŸ’°Rewards
    • 🐸Tradooor Rebate Program
    • πŸ”“Instant LP Unbonding
  • Contracts
    • πŸ› οΈTechnical Architecture
    • πŸ“œContract List
    • πŸ”“Security
  • Guides
    • 🀝Connecting to Dexter
    • πŸ’°Managing Assets
    • πŸ”„Swapping Assets
    • πŸ’§Providing Liquidity
    • πŸͺ™Bonding/Unbonding Tokens
    • πŸ—³οΈClaiming Rewards
    • 🌊Creating New Pool
      • Ⓜ️Metastable Pool
      • πŸ‹οΈWeighted Pool
      • ⭐Stable Swap Pool
  • ✍️Blog
  • πŸ«‚Community
  • πŸ€–App
  • ⬇️Press & Brand Kit
Powered by GitBook
On this page
  • Vault
  • Keeper
  • Router
  • Multistaking
  • Stableswap Pool
  • Weighted Pool
  • LP Token
  1. Contracts

Technical Architecture

PreviousInstant LP UnbondingNextContract List

Last updated 2 years ago

Dexter'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 Dexter; it is a smart contract that holds and manages all tokens in each Dexter Pool. It is also the portal through which most Dexter operations (swaps/joins/exits) occur.

Keeper

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

Router

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

Multistaking

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

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. Dexter'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 dexter 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
Dexter Architecture Diagram