{"repo":"AndreAugusto11/XChainWatcher","free":true,"listed":false,"github":"https://github.com/AndreAugusto11/XChainWatcher","clone":"git clone https://github.com/AndreAugusto11/XChainWatcher.git","description":"Code and data for paper **XChainWatcher: Identifying Anomalies in Cross-Chain Bridges**","language":"Jupyter Notebook","stars":12,"topics":["analysis","blockchain","cross-chain","datalog","tokens"],"license":"MIT","category":"blockchain-web3","readme_excerpt":"XChainWatcher XChainWatcher is a pluggable monitoring and detection mechanism for cross-chain bridges, powered by a cross-chain model. It uses the Souffle Datalog engine to identify deviations from expected behavior defined in terms of cross-chain rules. Here's an example of a basic cross-chain transaction rule: This rule defines a valid cross-chain transaction where an asset is locked on one chain and minted on another, with appropriate time constraints. Key Features 1. Monitoring of cross-chain transactions 2. Detection of attacks and unintended behavior in cross-chain bridges 3. Analysis of transaction data from multiple blockchains 4. Pluggable design for integration with various cross-chain bridges Key Findings Our analysis using XChainWatcher has revealed: Successful identification of transactions leading to losses of $611M and $190M USD in the Ronin and Nomad bridges, respectively. Discovery of 37 cross-chain transactions that these bridges should not have accepted. Identification of over $7.8M locked on one chain but never released on Ethereum. Detection of $200K lost due to inadequate interaction with bridges. See the full paper for details. These findings demonstrate the critical need for robust monitoring and analysis tools in the cross-chain bridge ecosystem. Project structure Requirements python 3.11: (tested with python 3.11.5) Virtualenv Souffle R (to create and visualize figures). To install required R packages, run sudo Rscript -e 'install.packages(c(\"ggplot2","default_branch":null,"files":null,"tree":[],"storefront":"/r/AndreAugusto11","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/AndreAugusto11/XChainWatcher/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}