To ensure the security of all stakeholders of the network, Bifrost implements several lines of defense. Socket contracts and relayers play a major role.
All relayers must sign the message with their private key in every message handling. The Bifrost Network should accept messages of valid relayers by verifying the message signature.
- Every socket contract verifies the signed message to check whether or not the message is from valid relayers.
Relayers and socket contracts perform sanity checks for every Cross-Chain Communication (CCC) message at each stage.
- If an Ethereum transaction related to the CCC job is not executed for a long time, the network identifies the transaction and then runs a corresponding action, such as transaction rollback.
- The network is able to identify the message which falls under abnormal situations (e.g. transaction revert and transaction pending for a long time).