StreamSwap - Just another Launchpad?

    In mid of April 2023 a new project was launched on Osmosis. In this dashboard I will be taking a close look at this newcomer.

    db_img
    StreamSwap

    Straight Facts

    • StreamSwap aims to be a special kind of token launchpad
    • The StreamSwap contract was accepted by Osmosis governance with a huge 96% majority
    • After the proposal passed the contract was deployed to Osmosis on April 19th
    • The first token launch was StreamSwaps own token FLIX which took place on April 20th

    What makes StreamSwap unique?

    Existing launchpads often struggle from issues like:

    • All users participating in the launchpad effectively participate in a big TWAP order
    • As everyone is using the same steady "streaming" swap there is little to no potential of bad entries; price manipulation or MEV
    • It makes the process of launching a token easier; a stream is created; everyone who is interested deposits the token to buy with; after the stream ended everyone can withdraw the new token

    Wanna know more? Read this article introducing StreamSwap!

    Goal of this dashboard
    Methodology
    • Highlight key metrics for the first token launch on Streamswap
    • Provide accurate and reusable SQL that can be used for more in-depth analytics for token launches in the future
    • Figure out if launching a token on StreamSwap leads to a meaningful price discovery that leaves no one behind

    There are 2 major things to do:

    Decode relevant events

    Event can be found in the contracts source by searching for "action" The relevant events are:

    • subscribe & subscribe_pending
    • withdraw & withdraw_pending
    • exit_stream

    (The pending variants are for before the stream started)

    Calculate swaps & prices during streaming

    This is quite difficult as the price depends on the unspent amount of tokens in the pool which is constantly changing with deposits & withdrawals.

    I decided to sample every minute, sum up changes to the pool depth, then use the resulting depth to calculate the price and do the swap.

    This is realized in a recursive CTE, have fun understanding that bit of SQL😂

    Phases

    Stream Creation: Whoever wants to launch a token creates a stream specifying parameters like start;end - time; name; tokens offered; ...

    Bootstrap Phase: The stream has been created but no swaps are happening. Users can deposit and withdraw tokens.

    Streaming Phase: Tokens are being swapped steadily from the input to the output token. Deposits and withdrawals are still open, but tokens already spent can no longer be withdrawn.

    End Phase: Streaming is over, users can withdraw their bought tokens. Deposits are no longer possible.

    Phases chart 👇 by alessio9567

    Terminology
    db_img
    Loading...