For latest GitBook, you can find it here: https://multi-message-aggregation.gitbook.io/multi-message-aggregation/
Multi-Message Aggregation (MMA) is an additive security module for cross-chain communication. It utilizes multiple Arbitrary Messaging Bridges (AMB) to send messages from one EVM chain to another EVM chain.
Instead of relying on a single AMB, MMA allows the message sender to relay the message through multiple AMBs. This way, even if one AMB is exploited, no malicious actions can be executed on the destination chain.
- Minimized feature sets: barebore implementation, low level of complexity.
- Configurable: during deployment, individual project can configure their own parameters to fit their specific use case and risk tolerance.
- Standardization: Implements EIP-5164 for all APIs on the sending and receiving end.
- Industry buyin: currently more than SIX bridge providers have their adapters for MMA.
Assume, we use 3 bridges to relay governance message from Ethereum mainnet to a destination chain. (This number can be changed during actual deployment or via a later governance vote.)
On the destination chain, if 2 of the 3 AMB agree with each other, we would consider the message.
The flow of the message and how it is transformed and relayed is detailed below:
- Uniswap Ethereum governance structure,
src
, approves to execute a messagemsg
on destination chaindst
. - Uniswap governance sends
msg
toMultiMessageSender
. MultiMessageSender
relaysmsg
to different adaptersadapter
.adapter
encodesmsg
into the corresponding formatted message,formatted_msg
, and sends it to the hardcoded AMB contractsAMB
.- Each
AMB
independently carriesformatted_msg
todst
. - On the destination chain, another set of
adapters
decodesformatted_msgs
into the originalmsg
. msg
is collected inside theMultiMessageReceiver
contract.- If 2 out of 3
msg
is the same, themsg
will be executed ondst
.
npm i
npx hardhat compile
We use Hardhat to test MultiMessageSender and MultiMessageReceiver contracts on simple behaviors.
npx hardhat test
Thank you for your interest in contributing to MMA! We welcome all contributions to make our project better!
Before you start contributing to the project, please make sure you have read and understood the project's Gitbook documentation. If you have any questions, drop Kydo a DM on Twitter.
If you find any bugs or issues with the project, please create a GitHub issue and include as much detail as possible.
If you want to contribute code to the project, please follow these guidelines:
- Fork the project repository and clone it to your local machine.
- Create a new branch for your changes.
- Make your changes and test them thoroughly.
- Ensure that your changes are well-documented.
- Create a pull request and explain your changes in detail.
- Code review
- All code changes will be reviewed by the project maintainers. The maintainers may ask for additional changes, and once the changes have been approved, they will be merged into the main branch.
All code changes must be thoroughly tested. Please ensure that your tests cover all new functionality and edge cases.
contracts
├── MessageStruct.sol
├── MultiMessageReceiver.sol
├── MultiMessageSender.sol
├── interfaces
│ ├── EIP5164
│ │ ├── ExecutorAware.sol
│ │ ├── MessageDispatcher.sol
│ │ ├── MessageExecutor.sol
│ │ └── SingleMessageDispatcher.sol
│ ├── IBridgeReceiverAdapter.sol
│ ├── IBridgeSenderAdapter.sol
│ └── IMultiMessageReceiver.sol
├── adapters
│ ├── Celer
│ ├── Hyperlane
│ ├── Telepathy
│ ├── Wormhole
│ ├── base
│ ├── debridge
│ └── router
└── mock
By contributing to the project, you agree that your contributions will be licensed under the project's LICENSE.