To enable the Ride, the Admin calls the Pool Manager smart contract to mint and sell ride tickets.
When a user joins a DeFi Pooling Ride, they sign three different limit orders in advance. The DeFi Pooling Operator stores these:
Buy X Ride tickets for X Investment tokens.
As per (1) in the diagram, this will allow Bob to invest X Investment tokens.
In the case that the Ride is canceled, the user buys back X Investment tokens by returning X Ride tickets.
In the case that the Ride arrives at the destination, the user buys Y Strategy tokens for X Ride tickets. The ratio between Y and X is set according to the price and slippage parameters that were configured in the Ride registration.
As per (2) in the diagram, this completes Bob’s signed limit orders.
The Admin activates the onboarding phase of the DeFi Pooling Operator. In this phase, it matches the user’s first limit order (to buy Ride tickets) to the on-chain limit order that is selling tickets. This order was submitted in advance by the Pool Manager smart contract in the registration phase.
As per (3) in the diagram, the relevant orders are matched.
Multiple other users join the Ride, where each may buy a different amount of uniformly-priced tickets.