Biweekly Report [1H September 2022]

( Disclaimer: The contents are subject to change without prior notice, and under no circumstances can it be used as evidence of legal responsibility for investment results. The information provided here does not constitute investment advice. If you have any questions, please contact the Stackswap team. )

Stackswap Biweekly Report

Hello, Stackswap Community.

In September, the Stackswap team is focusing on tech specs and best practice policies, and testing an MVP model of an Orderbook DEX in time for the update and release of the Stacks Hyperchains.

Although we have shared our plans for an Orderbook DEX in the previous biweekly report, we are excited to share more about our plans for the Orderbook DEX we are currently building out.

For background, a decentralized exchange (DEX) operates as a decentralized App (dApp), performing P2P transactions without using an intermediary or third party to carry out these transactions. A DEX makes transactions through smart contracts, which is what sets it apart from a centralized exchange (CEX). By employing blockchains and smart contracts, DEXs can provide users with trust and transparency, and achieve benefits such as cost savings and lost-cost transactions.

There are three main types of DEXs:

  1. Automated Market Makers (AMM)

2. Orderbook DEXs (on-chain, and off-chain books)

3. DEX Aggregators

AMMs

Currently, many DEX models are implemented following the form of AMMs, reflected on most platforms including Stackswap. AMMs can be classified according to the formulas constituting a pool, and each formula follows the below logic:

1. Constant Function Market Maker (CPMM)

Based on the x * y = k formula, the price of the two assets is formed according to the quantity (liquidity) of each asset.

A visualization of a constant product market maker; source: Dmitriy Berenzon

2. Constant Sum Market Maker (CSMM)

Transaction are made based on the formula x + y = k. However, if the external price of an asset is not 1:1, it is not sued because there is inherent risk that one side of the liquidity pool may have its value destroyed.

A visualization of a constant sum market maker; source: Dmitriy Berenzon

In addition, with the recent development of AMM-based liquidity, more advanced hybrid CFMMs have emerged. Several features and parameters have been introduced to achieve specific behaviors, such as adjusting risk exposure for liquidity providers or lower slippage for traders.

Curve AMM, for example, combines CPMM and CSMM to provide tighter liquidity to lower slippage during trades.

Source: Curve whitepaper‌‌

Orderbooks

Orderbooks are generally divided into 2 types: on-chain books, and off-chain books. Recently, projects with fast processing speeds, such as hybrid types using Layer-2 technology or tendermint-based POS consensus mechanisms are taking the lead in the market.

1. On-Chain Orderbook: The most decentralized option, but difficult to implement on most blockchains as each transaction must be done on the blockchain. In addition, there are disadvantages that transaction fees may eat into trades, or transactions may not be as smooth or quick as expected due to network conditions.

2. Off-Chain Orderbook: Users transact using peer-to-peer orderbooks, and trading activity takes place outside of the blockchain. This can save gas while speeding up trades, combining the advantages of traditional trading. An orderbook takes information for trading activity such as price, quantity, expiration date, and whether the order is for buying or selling. This trade is then executed P2P.

DEX Aggregators

Lastly, DEX Aggregators are a type of decentralized finance (DeFi) technology that allow traders to swap across multiple exchanges from a single interface, instead of visiting multiple DEXs to monitor liquidity and trading price impact.

DEX aggregators pool liquidity across multiple DEXs, allowing users to achieve higher token swap rates than on a single DEX. When done correctly, DEX aggregators can optimize slippage, swap fees, and token prices, giving users better rates and lower risk of transaction failure.

The initial model of the orderbook DEX built by Stackswap is currently under testing, by implementing an off-chain matching engine. We are working on improvements with various possibilities and scenarios in mind so we can seamlessly execute according to the specifications and architecture of the much-anticipated Stacks Hyperchains.

At the same time, we are holding internal discussions about the technical verification and collaboration direction with partners about the possibility of a permissionless fully on-chain orderbook DEX, and whether it is scalable using our cross-chain functionality. Ultimately this would be the more fruitful goal, which also aligns closer to our team and project’s ideals. However, it is to be determined if it is possible to be created in a manner that would add value to the platform and users.

When our orderbook construction is complete, each model (AMM, orderbook) will have pros and cons compared to each other, so each option will be a functional option that Stacks-based projects and teams can select to be listed in. This will vary from project to project in the type of project, type of token, and relationship with their user base, and can help provide a more tailored product according to the project. We believe that this will contribute to the expansion of the entire Stacks ecosystem.

Progress Report

> Stackswap Dashboard (at block number 76,318)

  • Farming
Stackswap Farming
  • Staking
Stackswap Staking

> Stacks Accelerator Verified Tokens: 9

  • Stackswap (STSW)
  • Stacks (STX)
  • Arkadiko Token (DIKO)
  • Arkadiko Stablecoin (USDA)
  • Miamicoin (MIA) v1
  • Miamicoin (MIA) v1
  • Newyorkcity Coin (NYC) v2
  • Newyorkcity Coin (NYC) v2
  • Lucid Bitcoin (lBTC)

References

Automated Market Makers (AMMs) Explaind Chainlink

Introducing Uniswap V3

How Decentalized Exchanges Work: A Full Guide 2022

What is A Decentralised Exchange(DEX)? The Ultimate Guide For Beginners

Stackswap User Guide

Join Our Community

  • Use the Stackswap App
  • Follow the latest news & updates on Twitter
  • Join the discussion on Discord
  • Find all Stackswap links here

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Stackswap

Stackswap

The First Complete DEX leveraging the Bitcoin network