The most important and number 1 priority of a DEX is always the security of users’ funds, in other words we want Permissionless Withdrawal.
The Validium model allows users to withdraw directly from the smart contract without going through the operator. In this case, users need to provide a Merkle proof to the verifier contract showing an account's inclusion in the state root. If the proof is accepted, the user can call the main contract's withdrawal function to exit their funds from the smart contract.
Illustration of MES Protocol's Merkle Tree Design
In case all operators of MES protocol go offline, users will still be able to withdraw their assets from the platform by submitting the following to the smart contract:
- 1.Merkle Proof (derived from the sibling data)
- 2.The latest Merkle Root
- 3.The Leaf (user address and balance to claim)
By doing so the chain will be able to verify that the user is providing a valid transaction, in other words the user is proving the fund claimed in custody is true and thus be able to proceed with the withdrawal.