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. )
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:
- Automated Market Makers (AMM)
2. Orderbook DEXs (on-chain, and off-chain books)
3. DEX Aggregators
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.
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.
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.
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.
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.
> Stackswap Dashboard (at block number 76,318)
> 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)
Stackswap User Guide
Join Our Community