Comment on page
Collateral unlock process
This sequence of actions illustrates how the Flash Trade system confirms the successful processing of orders. It involves verifying the successful transfer of the order asset, adjusting the collateral status, and confirming the successful processing of the order.
- 1.Verify that the transfer took place:
- 1.The Resolver confirms the order has been filled with the CollateralManager.
- 2.CollateralManager verifies the "AssetSend" event with the help of LightClient, which signals that the order asset has been sent successfully.
- 3.If the "AssetSend" event is not verified, CollateralManager reverts the transaction.
- 2.Unlock collateral:
- 1.If the "AssetSend" event is verified, CollateralManager adds the order collateral amount to the unlocked collateral. The unlocked collateral is the amount of collateral that is not currently in use.
- 2.CollateralManager sets the nonce bit to 1, effectively invalidating the nonce. A nonce is a number used once, and in this context, it is used to ensure each transaction is processed only once.
- 3.CollateralManager emits an "OrderSendConfirm" event, signaling that the order asset has been sent and the process has been confirmed successfully.