Register a New Ride

In order to register a new DeFi Pooling Ride, the Admin must do the following:

  1. Deploy and register a new token type for each Ride ticket.

  2. Set the type of Investment tokens in which users invest, and the type of Strategy tokens that users receive.

  3. Determine the price and slippage at which Investment tokens are exchanged for Strategy tokens. Users sign a limit order confirming their acceptance of these requirements when they join a Ride.

  4. Deploy a Pool Manager smart contract with the following functions:

    1. Mint and Sell Ride tickets

      Mint Ride ticket tokens, deposit them to StarkEx, and submit an on-chain limit order to sell them for Investment tokens.

    2. Configure price

      Set the price and slippage as previously determined.

    3. Ride departure

      Execute a specific on-chain strategy. Withdraw users' funds, that is, the agreed Investment tokens, from the StarkEx smart contract, and trade them in an on-chain DeFi contract for Strategy tokens.

      These are deposited back to StarkEx, and the Pool Manager submits an on-chain limit order to sell the Strategy tokens in exchange for users' Ride tickets. If the Strategy token price is too high and is out of the slippage range that users accepted, the departure fails, and the Ride ticket tokens are deposited back to StarkEx and sold back to the passengers.

    4. Ride cleanup

      Withdraw the Ride ticket tokens from StarkEx and burn them.

  5. Set the price and slippage for the strategy execution in the Pool Manager smart contract.

DeFi Pooling 2A