For a user to deposit funds into their vault, they need to call the “
Deposit flow description:
The User makes an on-chain contract call to deposits the funds into their vault.
The Exchange verifies that users deposit on-chain.
The Exchange sends the deposit transaction to the StarkEx service.
The StarkEx generates a proof containing the deposit (along with other transactions) and sends it to the blockchain.
Part of the public input for the proof containing the deposit is the vault content. For applications that want to keep the users balances private, we modify the deposit flow. The user deposit the funds to a temporary vault and then transfer them off-chain to the trading vault. The following diagram demonstrates this flow.