User offboarding

Once the ride arrives at its destination, users can exchange their ride tickets for strategy tokens.

The admin informs the DeFi Pooling Operator when offboarding begins. In this phase, the Operator matches each user limit order against the Pool Manager limit order (Step 1 in diagram). There are two different scenarios here:

  1. If the on-chain trade succeeded, the user exchanges ride tickets for strategy tokens using the execution limit order (Step 2 in diagram).

  2. If the on-chain trade failed, the user exchanges the ride tickets for the original investment tokens using the cancellation limit order.

DeFi Pooling 5A

Once the settlements between the users and the Pool Manager are submitted to StarkEx, and the last state including them is approved on-chain, offboarding is complete.

The final step is for the admin to call the ride Cleanup function in the Pool Manager smart contract. This function withdraws the ride ticket tokens and "burns" them (Step 3 in diagram).