STIP Sandbox: How it Works, Technical Guide

July 11, 2019 STO

As we first started working on the development of STIP, our main goal was to create an automated solution to simplify fundraising for both issuers and investors. In our previous articles, we have already described the potential benefits of the platform, legal structuring of STO, and the basic concept of back-office automatization behind STIP. In this article, we want to focus on the technology behind of our platform and tell you more about how exactly blockchain is used to make all STO processes transparent.

Waves Explorer

Waves Explorer allows you to find all the necessary information presented in a user-friendly way, using transaction Id or Waves Address. There are two major sections that illustrate the processes behind STIP:

  1. “Address Data” allows users to check data stored on the account. This data changes through transactions and can not be altered by anyone.
  2. “Address Script” window allows users to check the script deployed on the Account. The script can be displayed in a decompiled form allowing to follow the logic embedded in it.

Our platform uses the technology of Waves blockchain. All important steps, including security token issuance, carrying out a token sale, investing and withdrawing funds are reflected in the decentralized network.

We would like to take you through each of the steps and show how exactly you can find all the data on the blockchain.

Issuing a Security = Issuing Tokens

Leaving all the legal processes behind, let's skip right to the process of token issuance.

An issuer finalizes all the parameters of the token sale through the interface of our platform. Issuer chooses key parameters of a token sale: the total amount of tokens to be issued, name of a token, and description.

Afterwards, the exact amount of tokens is issued on the account that will later be used for a token sale (The total amount of tokens issued can be higher than the amount of tokens offered for a token sale).

All security tokens issued on STIP are in fact “tokenized securities” meaning that they are issued in full compliance with securities regulations in the jurisdiction chosen by an issuer.  According to these laws, tokenized securities can be bought by identified investors only. That is why we embed the script in every token that allows token transferring to the whitelisted users only.

You can check out the script in its decompiled form for each token issued on our platform separately using Waves Explorer. Follow this link to check the asset script for one of the projects issued on STIP Sandbox — Deponent.

Token Sale = Decentralized application

Our platform uses Waves Smart Accounts technology to create simple applications that run in a decentralized environment. All rules of these applications are determined in the script which is created using parameters chosen by the issuer.

When a user presses “Start campaign” our platform creates the script. This script is deployed on a new account with tokens issued during the first step. The script disables any further setScript transactions which means that no one will ever change the rules of the token sale.

Script logic and parameters can also be checked through Waves Explorer. Just search for the designated dApp (using account address), go to the Script section and choose to see the decompiled version of the script.

Pay attention to the parameters — all of them can be easily checked. You will also be able to once again see all whitelisted accounts.

As for the logic of the script — it is quite simple and only contains two callable functions: deposit() and withdraw(). We will take a closer look at them when talking about further steps.

One last thing you can do with the dApp — look at its data. If the script has just been deployed, it will contain no data objects. The script of the app will update it’s data every time when each function is successfully called.

Whitelist

All users are added to STIP whitelist using data transactions, along with that they are indicated in the special account: 3N7yaGaFS8BvgRrc9trhNy7v5H4qCcxW3Fp that belongs to Tokenomica and we have the right to change account status at any time. All these changes are reflected in the blockchain and can be checked in the “Data” tab of the account.

Follow the link to see all STIP users in Waves Explorer.

Issuers are added even before token issuance. We make the data transaction for an issuer during the first login through Waves Keeper. Investors are added right before the first investment is made.

When the full version of STIP goes live in August, the process will alter and the account will only be added after the user undergoes the KYC process.

Investing in Securities = Calling a dApp Function

When an investor gets whitelisted,  the deposit() function of any token sale becomes available.

The callable function deposit() is initiated using the invokeScript transaction. The only parameter: Waves amount must be set in advance.

And then the dApp decides whether to accept the deposit. Some important conditions should be met in order for deposit to be successful:

  • The blockchain height must be between startBlock and endBlock (which are used to estimate the time of the token sale);
  • The HardCap must not be reached;
  • The investor must be in STIP whitelist.

If the transaction is considered successful, the dApp also updates its Data allowing all users to see which address called the function and how much Waves were deposited.

Withdrawing Securities = Calling a dApp Function

Withdrawing funds is allowed by the script only after the token sale is over, which happens due to one of the reasons:

  • HardCap was reached;
  • Blockchain hight reached EndBlock;

The withdrawal function does not require any inputs. It can be called to withdraw funds by the issuer or by the investor. The logic of the script will determine who the initiating address belongs to and the number of assets to be transferred to the account.

One of the important conditions for the token sale to be successful is the number of Waves gathered reaching the SoftCap. Depending on this condition the script behaves differently:

  • If the SoftCap was reached, all investors get tokens that represent securities, Issuer receives Waves gathered and unsold аssets.
  • If the SoftCap wasn’t reached, investors get their Waves back and Issuer gets nothing.

We've created a simple structure showing the behavior of the script depending on the main conditions.

All successful withdrawal operations are written to the data of the dApp as well, allowing anyone to check that the funds have been withdrawn correctly.

When аssets are distributed among Investors further transferring is only allowed to whitelisted users only — the asset script makes sure the condition is met.

Don’t miss a chance to test STIP Sandbox and win WAVES tokens. If you have any suggestions on how we can improve the final product or need any help launching your STO, feel free to contact us in our Telegram chat. Best of luck!