Product Feature

Exodus Mode

The Operator in the DeGate off-chain node is responsible for generating the zkBlocks and submitting the proofs to L1. If the operator is no longer able to perform its functions, all of the off-chain transactions that have not been submitted to L1 will become invalid. As part of ensuring the trustless handling of assets in DeGate, DeGate protocol has provided a contingency mode called Exodus Mode. This enables users the ability to withdraw their assets if DeGate's node fails to operate as intended.
Once the exodus mode is activated, it is irreversible and the DeGate's smart contract will reject receiving the new submission of zkBlocks. The smart contract's latest state will remain based on the last zkBlock before the activation of the exodus mode. This implies that all off-chain transactions (e.g. trades withdrawals, transfers) have halted. Asset withdrawal by each user is the only action that will be processed.

Exodus Mode Activation Process

The steps to enter into the exodus mode are as follows:
  1. 1.
    Initiating Force Withdrawal: Users can call the DeGate smart contract's forceWithdraw method.
  2. 2.
    Unprocessed Force Withdrawal: It is a forced withdrawal that is not processed by the DeGate node within a predefined duration. This duration is configurable in DeGate's smart contract.
  3. 3.
    Activate Exodus Mode: As long as there is any unprocessed force withdrawal, any users can call DeGate's smart contract notifyForcedRequestTooOld method to get DeGate protocol into the exodus mode.
If the DeGate node is honest, it will identify and process all force withdrawal requests within the predefined duration to avoid entering into the exodus mode. A force withdrawal can also be seen as a regular withdrawal but with several differences as listed below:
  • Force withdrawal requires the specification of a token. The requests will perform a full withdrawal amount based on the value of the token available balance in the merkle tree – DeGate node will cancel all existing open orders that deal with this token, and process the withdrawal accordingly.
  • Users will be required to pay the gas fees from their wallet for a forced withdrawal. Whereas for a regular withdrawal, gas fees are paid from their DeGate account.
  • After the force withdrawal request is executed successfully, users will need to perform another call to DeGate's smart contract withdrawFromApprovedWithdrawal method to receive the assets.
The entire force withdrawal process is depicted below:
A Successful Force Withdrawal Processed In-Time

Retrieving Funds in Exodus Mode

Once the exodus mode is activated, there are three scenarios where users will be able to retrieve the full amount of their assets.
  1. 1.
    DeGate Account Balances: Upon the calling of the withdrawFromMerkleTree method, a token's full account balance will be withdrawn based on the latest account state before the exodus mode is activated.
  2. 2.
    Unconfirmed Advanced Deposits: The asset balances that are deposited into the contract via the Advanced Deposit method but not in the DeGate account's balance can be withdrawn by calling the withdrawFromDepositRequest method.
  3. 3.
    Unconfirmed Standard Deposits: The asset balances that are deposited into the contract via the Standard Deposit method but not in the DeGate account's balance can be withdrawn by contacting the node operator to request a refund.
How can an ordinary user call and interact directly with the smart contract?
To perform both the forced withdrawal and balance withdrawal methods require the user to have some data which can be retrieved by the calldata from all submitBlock transactions made with DeGate smart contract. The steps to retrieve these data are covered in the design document. DeGate expects there will be third parties providing retrieval services to DeGate's calldata and users are free to engage these services to access the information they need. Some of these service providers may likely have products that have easy buttons to initiate forced withdrawals, activate the exodus mode, and perform asset retrieval.
Users do not have to be concerned about security when engaging third-party service providers as assets can only be withdrawn back into the user's wallet. That said, it is extremely important to note that users should not reveal the wallet and asset private keys.