📬
Celer Inter-chain Messaging (IM)
  • Developer
    • Celer IM Overview
      • Inter-chain App Use Cases
    • Architecture Walkthrough
      • Celer IM Design Patterns
      • End-to-End Workflow
      • Fee Mechanism
      • CELR Token Utility
    • Development Guide
      • Contract Framework
      • Contract Examples
        • Hello World
        • Hello World with Token Transfer
        • In-Order Delivery
        • Batch Transfer
        • Cross-Chain Swap
        • NFT Bridge
      • dApp Safeguard
      • Message Executor
        • Integration Guide
        • Integration Guide: Advanced
      • Query IM Tx Status
    • Contract Addresses & RPC Info
  • Audit Reports
Powered by GitBook
On this page
  • App Guardian
  • Delayed Message Execution
  1. Developer
  2. Development Guide

dApp Safeguard

PreviousNFT BridgeNextMessage Executor

Last updated 2 years ago

App Guardian

is run by the dApp community to ensure their application security.

The app guardian monitors the emitted from the MessageBus contracts on the destination chains, and uses the srcChainId and srcTxHash fields in the event to look for the matched from the MessageBus contracts on the source chains. If it fails to find a matched event on the source chain, it will try to or execute any dApp-specific logic if added.

Note that Celer IM is already secured by the Celer State Guardian Network (SGN), which is a proven secure decentralized platform that has processed a of cross-chain asset transfers and tons of cross-chain messages without any security incident. This app guardian is for dApp communities who do not fully trust Celer SGN and want further safety guarantees even if Celer IM is compromised.

Delayed Message Execution

Message dApps that require extra safeguards can choose to integrate the app contract with the , which allows configured delayed message execution.

Integration with the adapter is simple: 1) deploy a separate adapter contract for your dApp; 2) set the to restrict who can send messages to the dApp; and 3) enforce your dApp message receiver function to only accept from this adapter.

For each delayed message, the (detailed in the next section) will wait for the delay period to pass and then automatically which trigger calls to the receiver dApp contract.

The described above keeps monitoring and verifying the messages as soon as they enter the delayed queue, and will pause the adapter contract immediately if any invalid message is detected during the delay period, so that no invalid message will be executed in the receiver dApp contract.

Celer IM app guardian
message Executed events
Message events
pause the message receiver (dApp) contracts
large volume
MessageReceiverAdapter
allowed senders
external calls
message executor
execute the delayed messages
app guardian