Challenge System
Last updated
Last updated
The challenge process is a critical security mechanism in the Mach protocol, ensuring the integrity and safety of cross-chain transactions, by addressing discrepancies between different blockchains. This serves as a safeguard against errors, fraud, or any inconsistencies that might arise during the transaction process.
When a proposed match is made, the protocol processes it optimistically, meaning it proceeds before the transaction is fully settled on both chains. This approach requires an extra layer of security to address any issues that may arise.
The challenge system, powered by LayerZero, automatically monitors transactions for discrepancies.
If an issue is detected, the system locks all processes and immediately initiates a challenge.
During a challenge, funds are temporarily frozen to prevent any further actions until the issue is resolved.
A LayerZero transaction arrives on the other chain to verify the existence of the order, checking if the challenged order is present and valid on the destination chain.
Once the verification is complete and the challenge is resolved, the funds are either released or reallocated based on the outcome.
If the order is validated, the frozen funds are made available again, finalizing the challenge process
If the order is not validated, the frozen funds are reallocated and returned, ensuring the user is made whole
Despite the length of the process, this entire sequence happens rapidly — addressing and resolving competencies in tight succession. This robust challenge process provides an extra layer of security, ensuring that users are always protected from potential risks.
For a more in-depth understanding for developers, refer to Challenge Process