StreamSwap allows stakeholders, known as Streamers and Subscribers, to create and participate in streams. Streamers initiate a stream by locking a fixed amount of tokens (Token 1 or T1), which are intended to be exchanged for an accepted token (Token 2 or T2) over a fixed time period. Once a stream is established, T1 cannot be added or removed until the end of the streaming phase.
The initial launch of StreamSwap was used for the launch and price discovery of the $FLIX token. FLIX was the T1 token and OSMO was T2. However, the protocol has since expanded to include $ATOM as an additional T2 token for the $FLIX stream.
Mechanism and Phases
The functioning of StreamSwap is divided into two distinct phases: the Bootstrapping Phase and the Streaming Phase.
During the Bootstrapping Phase, which takes place between the creation of a stream and its start time, Subscribers can deposit or withdraw their T2 tokens at any time. No swapping of tokens occurs during this phase. Instead, Subscribers receive shares for depositing T2 and have shares deducted when withdrawing T2 tokens.
The Streaming Phase commences at the stream’s start time and continues until its end time. Subscribers can deposit or withdraw T2 tokens throughout this phase. The token swaps occur linearly over the entire duration of the stream. T1 is streamed to the Subscribers, and T2 is streamed to the Streamer who initially locked T1. At the end of the Streaming Phase, the process of price discovery takes place.
Price discovery in StreamSwap is a method of determining the final price of locked T1 tokens based on the total amount of T2 tokens received by the end of the stream. The Stream Average Price (SP) is calculated as the total T2 received by the Streamer divided by the total T1 streamed by the Streamer.
In addition, an Individual Subscriber Average Purchase Price (AP) is computed, which represents the total amount of T2 spent by a Subscriber divided by the total redeemable T1 by that Subscriber. This helps Subscribers assess their individual performance in the StreamSwap.
Both T1 and T2 tokens can be redeemed at the end of the stream. Subscribers can redeem T1 based on their accumulation throughout the Streaming Phase. Total shares are in proportion with T2, based on the time at which they subscribed to the stream.
Interface and Usage
StreamSwap’s primary interface is a web application, accessible on desktop and mobile devices. Mobile access is supported through various wallets, such as Keplr Wallet, Cosmostation, and Leap Cosmos. The StreamSwap application enables users to track key metrics related to their streams and subscriptions, including total tokens locked for streaming, remaining tokens, spent tokens, shares, and the current and average price of the streamed token.