This project is a cross chain fraud detection and automatic control.


This project uses cross-chain interaction to allow users to freeze and unfreeze the transfer of their tokens across all supported EVM chains from the website. The source chain notices an unusual activity (for the sake of our demo, infinite approvals), then triggers a freeze function automatically from the source chain to all supported chains on our site.
On the front end, users receive alerts on the website and can enable freeze/unfreeze with the click of a button. If unusual activity is detected, we notify the user. However, we freeze automatically to ensure more funds are not lost pending the user's response.
This project uses Espresso behind the scenes to enable message passing across chains and Hyperlane infra to connect chains more easily.
We use Figma to design the front end and the backend is built using NodeJS and Typescript. The smart contract is written in Solidity and the deployment tool is Foundry.
When unusual activity (infinite approvals, large withdrawal, multiple failed tx attempts etc) is detected, the freezeTokenAndRemoteMultiple or the freezeTokenAndRemote function is called on just one chain; the choice of which to call depends on how many chains the user wants to activate protection for. Once called, the pause function, callable on USDC and most standard ERC20 tokens, is called immediately on all the destination chains. Once called from the source chain, this message is passed to all contracts having the freeze function enabled by the user, automatically freezing transfers across all approved chains. Contracts are granted a role across all chain contracts to automatically pause transfers once this unusual activity is detected. However, users can freeze and unfreeze using the front end of the website.
This pause is integrated as a button in the website. So, users receive alerts and can freeze and unfreeze transfers across all chains registered.

