Skip to content

Commit d53bcab

Browse files
committed
readme
1 parent 6606c92 commit d53bcab

File tree

3 files changed

+18
-16
lines changed

3 files changed

+18
-16
lines changed

README.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,44 @@
11
# Cross-Chain Deposit Module
22

3-
The Cross-Chain Deposit Module (CDM) is a sophisticated system designed to facilitate cross-chain deposit campaigns for chains that want users to commit liquidity from the source chain into their protocols on the destination chain. It consists of two main components: the ```DepositLocker``` on the source chain and the ```DepositExecutor``` on the destination chain.
3+
The Cross-Chain Deposit Module (CDM) is a sophisticated system designed to facilitate cross-chain deposit campaigns for protocols that want users (APs) to commit liquidity from a source chain into protocols on a destination chain. It consists of two main components: the ```DepositLocker``` on the source chain and the ```DepositExecutor``` on the destination chain.
44

55
## Overview
66

7-
This module allows users to deposit funds on one chain and have those funds bridged and utilized on another chain according to market specific recipes. It leverages LayerZero for cross-chain communication and token bridging.
7+
This module allows users to deposit funds on one chain (source) and have those funds bridged and utilized on another chain (destination) according to market specific recipes. It leverages [LayerZero](https://layerzero.network) for cross-chain communication and token bridging. The system supports all tokens that abide to the [OFT](https://docs.layerzero.network/v2/home/token-standards/oft-standard) standard.
88

99
### Key Components
1010

1111
1. **[RecipeMarketHub](https://github.com/roycoprotocol/royco/blob/main/src/RecipeMarketHub.sol)**: A hub for all interactions between APs and IPs on Royco
1212
- Permissionless market creation, offer creation, and offer filling
13-
- Handles creation of Weiroll Wallets and automatic execution of deposit recipes for APs upon filling an offer
14-
- Allows APs to execute withdraw recipes to reclaim their funds as per the market's parameters
13+
- Creation of Weiroll Wallets and automatic execution of deposit recipes for APs upon filling an offer
14+
- Allows APs to execute withdrawal recipes to reclaim their funds as per the market's parameters
1515

1616
1. **[WeirollWallet](https://github.com/roycoprotocol/royco/blob/main/src/WeirollWallet.sol)**: Smart contract wallets used to execute recipes
17-
- Used on the source chain to deposit funds to bridge and withdraw funds (rage quit) to/from the DepositLocker
18-
- Used on the destination chain to hold a depositor's position, execute deposits upon bridging, and withdrawals after an absolute locktime
17+
- Used on the source chain to deposit funds for bridging and withdraw funds (rage quit) to/from the DepositLocker
18+
- Used on the destination chain to hold a depositor's position, execute destination deposit recipes upon bridging, and withdrawals after an absolute locktime
1919

20-
2. **[DepositLocker](https://github.com/roycoprotocol/chain-Deposit-module/blob/main/src/DepositLocker.sol)**: Deployed on the source chain
20+
2. **[DepositLocker](https://github.com/roycoprotocol/cross-chain-deposit-module/blob/main/src/DepositLocker.sol)**: Deployed on the source chain
2121
- Integrates with Royco's RecipeMarketHub to facilitate deposits and withdrawals
2222
- Accepts deposits from users' Weiroll Wallets upon an AP filling an offer in any Deposit market
2323
- Allows for withdrawals until deposits are bridged
24-
- Handles bridging funds to the destination chain in addition to composing destination execution logic via LayerZero
24+
- Handles bridging funds to the destination chain in addition to destination execution parameters via LayerZero
2525

26-
3. **[DepositExecutor](https://github.com/roycoprotocol/chain-Deposit-module/blob/main/src/DepositExecutor.sol)**: Deployed on the destination chain
27-
- Receives the bridged funds and composed payload via LayerZero and atomically creates Weiroll Wallets for all bridged depositors
28-
- Executes deposit scripts ONCE after bridge (either by the depositor or the owner of the Deposit campaign)
26+
3. **[DepositExecutor](https://github.com/roycoprotocol/cross-chain-deposit-module/blob/main/src/DepositExecutor.sol)**: Deployed on the destination chain
27+
- Receives the bridged funds and parameters via LayerZero and atomically creates Weiroll Wallets for all bridged depositors
28+
- Executes deposit scripts ONCE after bridge (either by the depositor or the owner of the cross-chain deposit campaign)
2929
- Allows the depositor to execute the withdrawal recipe after the absolute locktime has passed
3030

3131
## Key Features
3232

3333
- Integration with RecipeMarketHub for market management, offer creation and fulfillment, and Weiroll Wallet executions on the source chain
3434
- Bridging funds and a payload containing depositor information using LayerZero
35-
- Weiroll Wallets created for each depositor on the destination chain with the ability to deposit and withdraw assets as specified by the campaign's recipes
35+
- Weiroll Wallets created for each depositor on the destination chain with the ability to deposit and withdraw assets as specified by the campaign's destination recipes
3636

3737
## CPM Flow
38-
1. AP (depositor) fills an offer for a Deposit market in the RecipeMarketHub
38+
1. AP (depositor) fills an offer for a cross-chain deposit market in the RecipeMarketHub
3939
2. The RecipeMarketHub automatically creates a Weiroll Wallet for the user and deposits them into the DepositLocker
4040
3. Depositors can withdraw deposits anytime through the RecipeMarketHub before their deposits are bridged
4141
4. Once green light is given, anyone can bridge funds to the destination chain from the DepositLocker
42-
5. DepositExecutor receives bridged funds and creates Weiroll Wallets for each depositor based on data in composed payload
43-
6. Deposit recipes are executed on the destination chain
44-
7. Users can withdraw funds after the absolute unlock timestamp
42+
5. DepositExecutor receives bridged funds and creates Weiroll Wallets for each depositor as per the bridged execution parameters
43+
6. Destination deposit recipes are executed on the destination chain
44+
7. Users can withdraw funds through the DepositExecutor after the absolute unlock timestamp

src/DepositExecutor.sol

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { OFTComposeMsgCodec } from "src/libraries/OFTComposeMsgCodec.sol";
1111
import { ReentrancyGuardTransient } from "@openzeppelin/contracts/utils/ReentrancyGuardTransient.sol";
1212

1313
/// @title DepositExecutor
14+
/// @author Shivaansh Kapoor, Jack Cordrry
1415
/// @notice A singleton contract for receiving and deploying bridged deposits on the destination chain for all deposit campaigns.
1516
/// @notice This contract implements ILayerZeroComposer to act on compose messages sent from the source chain.
1617
contract DepositExecutor is ILayerZeroComposer, Ownable2Step, ReentrancyGuardTransient {

src/DepositLocker.sol

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { OptionsBuilder } from "src/libraries/OptionsBuilder.sol";
99
import { Ownable2Step, Ownable } from "@openzeppelin-contracts/contracts/access/Ownable2Step.sol";
1010

1111
/// @title DepositLocker
12+
/// @author Shivaansh Kapoor, Jack Cordrry
1213
/// @notice A singleton contract for managing deposits for the destination chain on the source chain.
1314
/// @notice Facilitates deposits, withdrawals, and bridging deposits for all deposit markets.
1415
contract DepositLocker is Ownable2Step, ReentrancyGuardTransient {

0 commit comments

Comments
 (0)