During the DeFi Pooling flow, the user always has self custody of funds.
There are three different token types that the user owns during the flow:
Investment and Strategy tokens
These tokens have an on-chain value. They can be withdrawn at any time by using StarkEx self-custody mechanism using a Withdrawal transaction or the Full Withdrawal mechanism.
Ride ticket token
This token only has value within the DeFi Pooling StarkEx platform. Therefore, the Pool Manager smart contract provides a redeem function.
If the user has a Ride ticket token and the DeFi Pooling flow did not proceed to trade it, the user can withdraw it on-chain to redeem their share of funds from the Pool Manager smart contract. The redeemed tokens are:
a) the Strategy tokens – in the case that the strategy was executed
b) the original Investment tokens – in the case that the strategy was not executed.