πŸ› οΈTechnical Architecture

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.

Code: https://github.com/dexter-zone/dexter_core/tree/main/contracts/vault

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.

Code: https://github.com/dexter-zone/dexter_core/tree/main/contracts/keeper

Router

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

Code: https://github.com/dexter-zone/dexter_core/tree/main/contracts/router

Multistaking

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

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 Anchor Staking Contract but differs in the sense that it supports multiple LP tokens and multiple rewards per LP token.

Code: https://github.com/dexter-zone/dexter_core/tree/main/contracts/multi_staking

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.

Code: https://github.com/dexter-zone/dexter_core/tree/main/contracts/pools/stable_pool

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.

Code: https://github.com/dexter-zone/dexter_core/tree/main/contracts/pools/weighted_pool

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: https://github.com/dexter-zone/dexter_core/tree/main/contracts/lp_token

Last updated