Basic Flow


For a user to deposit funds into their vault, they need to call the “deposit on-chain function.

Deposit flow description:

  1. The User makes an on-chain contract call to deposits the funds into their vault.

  2. The Exchange verifies that users deposit on-chain.

  3. The Exchange sends the deposit transaction to the StarkEx service.

  4. The StarkEx generates a proof containing the deposit (along with other transactions) and sends it to the blockchain.

Privacy-Preserving Flow

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.