Stream Trade User Guide
March 31st, 2022

Introducing Stream Trade

Trading on decentralized exchanges (DEX), users are usually faced with one ultimate issue: it is almost impossible to buy a large number of tokens without causing price spikes, resulting in unfavorable rates. The price slippage originates from the commonly used xyk liquidity model and is worst when the liquidity in the trading pool is small.

Stream Trade is developed and operated by the WanLend team. The idea behind Stream Trade is that instead of buying or selling all tokens at once, we design a system that continuously buys or sells smaller amounts of tokens at given time intervals. For example, Bob wants to buy $100,000 WAN using wanUSDT. If he buys at once, he can only get $90,000 WAN due to the price slippage. Alternatively, he can use Stream Trade to buy $100 WAN each time for 1000 times, and over the course of 4 days. All of this will happen automatically without Bob’s intervention.

Stream Trade Operation Steps

Stream Trade URL:

1) Choose the trade direction

Let’s take selling wanUSDT and buying WAN as an example.

Find the crypto wanUSDT which you want to sell in the Crypto column, and find the corresponding trade direction wanUSDT -> WAN in the Stream Direction column.

2) Deposit coins/tokens

Click Deposit in the wanUSDT row.

Enter the deposit amount and click Deposit. Contract Approval is required for the first operation. In this example, we deposited 1000wanUSDT.

Note: what you approve here is the crypto type and the amount of this crypto you want to sell. But the actual amount you finally sell will be set in the following steps. The crypto to sell and the crypto to buy is the one-to-many relationship.

3) Buy the target crypto with the deposited crypto

In the wanUSDT->WAN row, click Start.

Enter the partial or full amount of the deposited crypto to buy your target crypto. In this example, 600wanUSDT out of 1000wanUSDT is decided to buy WAN, and the remaining 400wanUSDT can be used to buy WAND or other coins/tokens.

Click Next.

Set the stream trade timespan, that is, how long it will take to complete the purchase of WAN with the 600wanUSDT.

The Quick Choose row is the commonly used timespan offered by Stream Trade, and the Customize row is the trade timespan that you customize by yourself.

In Stream Trade, the smart contract will be triggered to purchase by every five minutes. Therefore, according to the amount of your deposited coins/tokens and the trade timespan, you can calculate the amount of deposited coins/tokens to be sold per 5 minutes.

Choose the timespan and click Next.

Stream Trade will calculate the number of WAND or WASP tokens to be collateralized in accordance with the amount of your deposits. The collateralized WAND or WASP is used to activate the stream trade function. The total values of the WASP or WAND to be locked is around 1% (the minimun threshold is 10 USD of WAND as collateral) of the values of your deposited crypto.

In this example, about 10wanUSDT worth of WASP or WAND needs to be locked as collateral, that is, 2930WAND in total. In other words, the 2390WAND is corresponding to the 600wanUSDT you sell, so if you partially/fully withdraw those 600wanUSDT, it will cause the insufficiency of your deposits, unless you stop the trading in advance. If your deposit gets zero but the trading still goes on, your collateral will be slashed .

Your deposits will be not taken away in Stream Trade. You can redeem your deposits back any time if you do not want to continue the trade.

Click Start. Approve is required for the first time.

After start, you can see that the amount of your deposited coins/tokens is decreasing in the My Deposits column; the amount in the Paid column is the number of coins/tokens that have been sold; in the Time Left column, it is the remaining time you set for the whole timespan.

You can click Stop to terminate the trade any time in advance. In order to ensure the safety of funds, you are not allowed to restart the same trade pair once you click Stop within 5 minutes.

In My Deposits column, you can see that the amount of the purchased coins/tokens in your My Deposits is increasing. Click Withdraw to withdraw the purchased coins/tokens at any time. In this example, the purchased crypto is WAN.

4) View History Records

On the top right of the Stream Trade page, there is an History button. Click History, you can select a trade pair to view the historical transaction records.

Benefits of Using Stream Trade

Less price slippage. Trading happens continuously over a pre-determined time period, so there will be much more time for the liquidity pool/s in the trading route to rebalance to more stable prices. The users will experience the benefit of less slippage & price impact, which can be quite detrimental when the desired trading amount is very large and/or the liquidity available in the trading route pool/s is small.

Automatic dollar-cost averaging. Crypto assets are highly volatile. It is really difficult to time the market for trading, i.e., buy at the bottom and sell at the top. Hence, practicing dollar-cost averaging strategies for buying and selling assets can be advantageous. With Stream Trade, users can set stream sell orders for when they predict that the price is peaking, and set stream buy orders for when the price is predicted to have bottomed-out.

Workflow of Stream Trade

The Stream Trade workflow is shown in Figure 1. Users will use the Stream Trade UI to deposit or withdraw funds from the smart contracts. Those funds will be used to automatically buy or sell in WanSwap according to the users’ settings. All the buy/sell events are automatically triggered by an Agent, which receives periodic instructions from a cloud Scheduler.

Figure 1. The Stream Trade workflow.
Figure 1. The Stream Trade workflow.

Stream Trade is also highly flexible. The users can set different timespan and different asset pairs, as shown in Figure 2.

Usage of WAND in Stream Trade

The WAND or WASP tokens in Stream Trade are used as collateralization to enable the trade function. Users need to lock WAND or WASP tokens that are proportional to their specified Stream Trade fund amounts to activate the function. Upon trading termination either at finishing time or manual disruption by the users themselves, the WAND or WASP tokens will be returned to the users’ wallets.

About Trade Pair in the Future

The team will add more popular stream trade pairs in the future according to the community’s feedback.

Arweave TX
Ethereum Address
Content Digest