Stackswap Litepaper

This document contains conceptual and technical documentation of the Stackswap protocol.

Background

Problems

  1. Bitcoin holders do not feel comfortable participating in Defi with their assets due to mainly centralized approaches.

  2. DEXs focusing on speculators have a difficult time creating lasting value.

  3. The Defi market being in its infancy leaves users with significant amount of risk.

Solutions by Stackswap

  1. Created the first fully-functional DEX and token launchpad on Bitocin, powered by the Stacks blockchain.

  2. Provides inherent support mechanism to help blockchain entrepreneurs listing their tokens on Stackswap to create lasting value.

  3. Introduced state-of-the-art AI market forecast algorithms to reduce risks for users.

Mission

DEX 2.0

The growth of the DEX market will also bring about many changes in supporting trading of assets by users. Trading options outside of instant swaps are limited, but more advanced trading options will have to be developed to be made available for users. These advanced trading options will likely encompass automatic profit-taking and stop-loss functions, making user participation more effective. In addition, it will lead to users achieving higher returns through products that can offer high-quality price prediction models and asset administration functions.

Second-generation DEXs will support the trading of derivatives such as futures and options, enabling various trading activities. Various hedging transactions such as insurance contracts will gradually be introduced as viable products. This new type of DEX, which will function as a comprehensive asset administration protocol, has a conceivable chance to become the second Uniswap.

Stackswap seeks to create balanced attention for all participants and stakeholders. By supporting early-stage entrepreneurs, non-profit organizations, sophisticated participants, in addition to speculators, we aim to create a positive feedback loop to increase the utility value of our platform over the long run. With the Stacks Accelerator fund and co-working space providers coupled with an online DEX, it is possible to create such a feedback loop.

Stackswap will add advanced trading functions to create better user support, with profit-taking and stop-loss functions already in development. Using the collective support of our Ph.D. qualified founding team, a price prediction model through an AI model will be introduced to support user decisions. The liquidity of the derivative market, where centralized exchanges (CEXs) are still the mainstay, is also expected to gradually shift to DEXs in the future. With that in mind, we are planning service integration with the goal of a DEX protocol that can successfully enable derivative transactions.

Open-source

Stackswap contributes strongly to the expansion of the Bitcoin and Stacks ecosystems through open-source codes with the first permissionless and secure DEX.

Concepts

Protocol Overview

How Stackswap Works

Stackswap is an automated market maker (AMM) protocol implemented on the Stacks Blockchain as a smart contract. Stackswap is inspired by AMM models like Uniswap, Sushiswap, Pancakeswap, and Curve Finance. Stackswap is a protocol aimed at decentralization, open-source, and censorship resistance. Stackswap depends on its creative approach to running protocols and constructing token economics. The STSW token is the native governance and utility token of the Stackswap platform.

Ecosystem Participants

Stackswap consists of two types of participants. Participants are liquidity providers and traders.

  • Liquidity Provider (LP): LPs supply liquidity to the protocol. LPs receive fees and governance tokens as rewards.

  • Trader: Traders are users who trade tokens in protocols. For each transaction, 0.3% of the transaction amount is paid as a fee for using the platform and LPs liquidity.

Core Concepts

Swap

Users can exchange Stacks protocol based tokens with each other through swap functions. X token is immediately exchanged for a Y token through the swap function. At this time, the exchange price is determined by the ratio between X and Y tokens in the liquidity pool. There is also an opportunity for arbitrage if token prices for tokens X and Y, and the exchange rate between X and Y tokens of the liquidity pool, differ in price from external channels.

Pool

The Liquidity Providers (LPs) provide token liquidity to the pool and allow our Swaps to function. LPs supply liquidity to pools and receive LP tokens issued with protocols in return. The LP token is a transferable token that is paid in proportion to the amount that contributes to the liquidity pool. The 0.3% transaction fee for transactions made by the protocol is used to be distributed to LPs in the pool and Stackswap protocol maintenance.

It is important to reiterate that a pool simply comprises of a set of autonomous smart contracts deployed on the Stacks blockchain, operated directly by users calling functions on it. This allows users to interact with other users and/or pool their own selected assets in a peer-to-peer manner. There is no further control by or interaction with the original entity which deployed the smart contract. This entity solely functions as a provider of technical tools for users, and is not offering any sort of securities product or regulated services.

Token Launchpad

The token launchpad allows non-programmers to quickly enter the Bitcoin blockchain ecosystem by providing an easy-to-use interface to create and list tokens. Not only can users create tokens, they can take advantage of PoXL mining and stacking user interfaces on Stackswap without a single line of code.

Projects and their teams can utilize the Stackswap DEX to leverage the DeFi ecosystem even without much technical prowess. They can find the resources they lack-- funding, experience, or personnel-- to kickstart their projects. With more time and as Stackswap creates more partnerships, these projects and teams can get matched with online and offline accelerators and funds.

Token Incentives

The liquidity provider receives the reward tokens based on the contribution to the liquidity supply provided. Reward tokens per block are allocated according to the weighted average liquidity value that considers the amount of time the token is held. The annual profit rate (APR) is calculated as:

APR=(RewardPoolshare)/UserCapitalAPR = (Reward * Pool share) / User Capital
  • APR: value in percentage

  • Reward: block reward per year

  • Pool Share: percentage of total LP tokens in pool by user

  • User Capital: Capital (in LP tokens) pooled by user

Staking

STSW token stakers will be rewarded with the vSTSW token, which can be used as proof of staking and can only be used on the Stackswap platform vSTSW token holders can use their tokens as voting power, and will also be rewarded additional STSW tokens as staking rewards. Equal amounts of STSW staked will receive different amounts of voting power (vSTSW) depending on the stake period. Users who lock in their STSW tokens with a longer staking period will receive more vSTSW tokens as reward.

StakingPeriod=DailyBlocks30daysStakingPeriod = DailyBlocks * 30 days
  • Staking period: 1 month period (calculated as 30 days)

  • Daily blocks: 144 blocks per day

Users can stake their STSW to receive vSTSW tokens, which will be used as proof of staking (similar to LP tokens), and be non-transferrable outside the Stackswap platform. vSTSW token holders will also gain the right to create proposals, vote on important governance proposals, and receive additional STSW tokens as reward. For equal amounts of STSW staked, the longer stake periods will receive higher rewards in the form of vSTSW. The calculations for vSTSW returns for STSW staked are as follows:

Staking PeriodSTSW StakedvSTSW RewardedRewards Multiplier**

1 month

100

106

1.059

2 months

100

112

1.122

3 months

100

119

1.189

4 months

100

126

1.260

5 months

100

133

1.335

6 months

100

141

1.414

7 months

100

150

1.498

8 months

100

159

1.587

9 months

100

168

1.682

10 months

100

178

1.782

11 months

100

189

1.888

12 months

100

200

2.000

24 months

100

400

4.000

36 months

100

800

8.000

Multiplier=2n/12Multiplier = 2 ^ { n / 12}

**where n is the number of months staked, multiplier rounded to 3 decimal places

vSTSW Token

Voting rights are awarded in the form of vSTSW for each event of staking STSW tokens. The staking cannot be cancelled until the end of the staking contract period. At the end of the staking contract period, the user can reclaim their staked STSW to their wallet. In act of reclaiming their staked STSW, the user's vSTSW held will immediately be burned, along with the corresponding votoing rights. This triggers the cooldown operation, which prevents the user from staking their tokens for a period of 1 week. If the user does not reclaim their STSW tokens at the end of the staking contract period, they will retain their vSTSW in perpetuity until they decide to claim their STSW tokens.

Voting

To participate in governance voting, the user must stake their STSW tokens to the Stackswap protocol. When the user stakes their token in the operation described above, they will obtain vSTSW, which represents their right to vote. In essence, vSTSW represents tokenized voting power, but voting power is not granted directly to STSW.

Market Forecast

No form of 'weather forecasts' exist for the Defi market, yet there is a need for it due to the volatility users are exposed to. To enhance yield and lower risk, the protocol will provide its top-of-the-line prediction data to selected users. Stackswap's Dev team also leverages its expertise in AI by employing its proprietary AI-assisted algorithm to save decision-making time and reduce risks. Under the hood, our cutting-edge AI's filtering system rigorously analyzes the Defi market data in a way that cannot be accomplished with common AI methodologies such as deep learning, and can do it all in real time.

The problem with deep learning, for example, is that it is no methodology that responds well to fast-changing market conditions that are common in Defi. The team believes that there are many prevalent issues with the traditional statistical approach to participating in Defi, as such the lack of a powerful enough method to accurately predict outcomes to an adequate level. With years of research accumulated through Ph.D. programs and personal participation in Defi, the Stackswap team has confidence in being able to offer the best performing AI prediction algorithm in the world.

Advanced Topics

Token

1. Information

Token Name

Stackswap Token

Token Ticker

STSW

Initial Token Supply

1,000,000,000 STSW

Contract Address

SP1Z92MPDQEWZXW36VX71Q25HKF5K2EPCJ304F275.stsw-token-v4a

Description

The native cryptographically-secured fungible protocol token for the decentralized AMM, Token Launchpad, and AI market forecast protocol for Stackswap (ticker symbol STSW) is a transferable representation of attributed governance and utility functions specified in the protocol/code of Stackswap, and is designed to be used solely as an interoperable utility token thereon.

2. Usage of Token

Governance (voting)

STSW will allow holders to propose and vote on governance proposals to determine future features and/or parameters of Stackswap, the Token Launchpad or Market Forecast with voting weight calculated in proportion to the tokens staked.

The right to vote is restricted solely to voting on features of Stackswap. It does not entitle STSW holders to vote on the operation and management of Stackswap, its affiliates, or their assets or the disposition of such assets to token holders, or select the board of directors of these entities, or determine the development direction of these entities, nor does STSW constitute any equity interest in any of these entities or any collective investment scheme. The arrangement is not intended to be any form of joint venture or partnership.

Staking

Users may stake their token and earn the right to vote (vSTSW), and receive additional STSW tokens as a reward for creating proposals, voting, and contributing to the platform.

Token Launchpad

Once the circulation of STSW reaches maturity, STSW must be used to gain access to the Token Launchpad. As the native platform currency, it would also be used to purchase native tokens issued by projects on the Token Launchpad.

Provide Liquidity

Users can contribute to the protocol by providing their liquidity in the form of STSW.

Market Forecast

Selected users will be able to receive the AI market forecast feed by holding a minimum of STSW that will be determined.

3. Initial Allocation

Amount%

Total

1,000,000,000

100.0

Community

600,000,000

60.0

Ecosystem Allocation

100,000,000

10.0

Strategic Partner

70,000,000

7.0

Team

50,000,000

5.0

Reserve

140,000,000

14.0

Operation

35,000,000

3.5

Marketing

5,000,000

0.5

4. STSW Mining Program

  • Community Token Distribution 60% of the initial supply (1bn STSW) is allocated to the community to incentivize participation and adoption.

  • LP Reward 70% of Community tokens will allocated to LP Holders as a reward. For Stackswap to perform its core function of a liquidity protocol, users need to be incentivized to contribute their liquidity for transactions, and so the liquidity provider receives STSW rewards based on their contribution to the liquidity supply. By distributing STSW in this manner, it ensures that the governance token will be distributed primarily to key network contributors and allow them to have a say in protocol parameters.

  • Staking 30% of Community tokens will be allocated to the Staking pool. STSW token stakers will be rewarded with vSTSW tokens. vSTSW token holders can use their tokens as voting power, and will also be rewarded additional STSW tokens for their participation in voting.

  • Daily Mining Volume: 136,986 STSW

  • Block Mining Volume: 951 STSW

  • Halving Event Every 4 years after the STSW Mining Program begins, the mining volume per block will be havled. The user token incentives for the pool will be decided depending on the price of the token. The Community Token Distribution will follow the STSW Mining Program, with 60% of initial supply distributed over the period of the distribution schedule. In the future, when our AI engines are developed, they will be introduced so that an AI-driven autonomus DAO can partially and organically adjust the STSW mining quantities.

YearMining Volume (Block)Mining Volume (Daily)Mining Volume (Annual)Total Volume (Accumulated)

1

951

136,986

50,000,000

50,000,000

2

951

136,986

50,000,000

100,000,000

3

951

136,986

50,000,000

150,000,000

4

951

136,986

50,000,000

200,000,000

5

476

68,493

25,000,000

225,000,000

6

476

68,493

25,000,000

250,000,000

7

476

68,493

25,000,000

275,000,000

8

476

68,493

25,000,000

300,000,000

9

238

34,247

12,500,000

312,500,000

10

238

34,247

12,500,000

325,000,000

11

238

34,247

12,500,000

337,500,000

12

238

34,247

12,500,000

350,000,000

13+

Pro rata

Pro rata

Pro rata

Pro rata

Economics

Overview of Token Economy

Fee

AMM Transaction Fee

There is a 0.3% commission fee for transactions from the transactions that traders make. For example, when a trader exchanges Token X for Token Y, the protocol will charge the trader 0.3% of Token X as a brokerage fee.

Fees will be distributed to LP holders and the Stackswap platform. 0.25% of the transaction fees are distributed to the liquidity providers of the pool who had provided market making services, and the remaining 0.05% is distributed to Stackswap to be used to incentivize users to participate in various beneficial activities.

Security

We have conducted an internal and external code audit to ensure more stable operation of the Stackswap protocol.

Roadmap

User Guides

User Guide

External User Documentation: Software Requirements Specification for Stackswap (IEEE)

Disclaimer

Stackswap is a decentralized protocol that users can use to create and access liquidity in a peer-to-peer manner, trade SIP-010 compliant tokens, and launch tokenized projects. The Stackswap protocol is made of free, public, open-source or source-available software including a set of smart contracts that are deployed on the Stacks blockchain. Your use of the Stackswap protocol involves various risks, including, but not limited to, losses while digital assets are being supplied to the Stackswap protocol and losses due to the fluctuation of prices of tokens in a trading pair or liquidity pool. Before using the Stackswap protocol, you should review the relevant documentation to make sure you understand how the Stackswap protocol and the relevant smart contracts work and assess the related risks on your own accord. You are responsible for doing your own diligence to understand the fees and risks that are present.

The Stackswap Protocol is provided “as is”, at your own risk, and without warranties of any kind. Although Stackswap developed much of the initial code for the Stackswap protocol, it does not provide, own, or control the Stackswap protocol, which is run by smart contracts deployed on the Stacks blockchain. Upgrade and modifications to the protocol are being managed in a community-driven way by holders of the STSW governance token. No developer or entity involved in creating the Stackswap protocol will be liable for any claims or damages whatsoever associated with your use, inability to use, or your interaction with other users of, the Stackswap protocol, including any direct, indirect, incidental, special, exemplary, punitive or consequential damages, or loss of profits, cryptocurrencies, tokens, or anything else of value.

Last updated