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