Deposit collateral

The collateral serves as insurance for orders. By requiring Resolvers to deposit collateral, the system ensures there is an additional layer of security protecting Users' funds. If the Resolver fails to process a transaction correctly, liquidators will still execute the order due to the presence of collateral.

  1. Before the Resolver can begin processing transactions, the Resolver is required to deposit authorized ERC-20 stable tokens into the CollateralManager smart contract. It is deposited for a specific 'receive' chain.

  2. Once the CollateralManager receives the Resolver's collateral deposit, it updates its records. The CollateralManager maintains records of the total collateral amount it is holding and the amount of collateral not currently in use (known as the "unlocked" collateral amount).

  3. With each new deposit from the Resolver, the CollateralManager updates its records, increasing the total collateral amount by the new deposit's amount.

Both chains (collateral chain and receive chain) keep track of collateral usage:

  • locked counter in the receive chain: increased by collateral amount specified in the executed order. Order must not be executed if the locked amount exceeds the unlocked amount submitted in the order by the user and confirmed by their signature;

  • unlocked counter in the collateral chain: increased each time successful order execution is confirmed by Resolvers by providing corresponding proofs.

Last updated