CCDM Recipe IAMs

An overview of CCDM enabled Royco Markets

Enabling a Recipe IAM to work with CCDM is simple: the deposit and withdrawal recipes for the market must deposit and withdraw into/from the Deposit Locker respectively. The process for creating a Recipe IAM and negotiating the incentives for your campaign remains the same.

Note: The input tokens for CCDM enabled markets must abide to these guidelines.

Merkle Deposit Recipe IAMs

Merkle deposit Recipe IAMs can merklize and bridge 8 million+ individual deposits per CCDM bridge transaction. Every CCDM bridge sends the merkle root along with the sum of all deposits in the merkle tree to the destination chain, where prorated withdrawals are facilitated by providing a merkle proof, demonstrating that a deposit was made by the claimant. Withdrawals are not enabled by default on the source chain, but in the rare case that they are needed, the Deposit Locker Owner can eternally halt all deposits and bridges for the market and enable withdrawals. Due to the nature of source chain withdrawals for these types of markets, they are best suited as Upfront or Arrear Recipe IAMs.

Deposit Recipe

  1. Call amount() on the WeirollWalletHelper contract to get the AP's fill/deposit amount of input tokens.

  2. Call approve() on the market's input token to allow the Deposit Locker to spend the amount returned in step one.

  3. Call merkleDeposit() on the Deposit Locker.

Withdrawal Recipe

  1. Call merkleWithdraw() on the Deposit Locker.

Individual Deposit Recipe IAMs

Individual deposit Recipe IAMs can bridge up to 300 depositors per CCDM bridge transaction. Every CCDM bridge sends and caches each depositor's deposit information (depositor address and total deposit amount) on the destination chain, allowing for prorated withdrawals without the need for a merkle proof. Withdrawals are enabled by default on the source chain, making these markets optimal as Forfeitable Recipe IAMs.

Deposit Recipe

  1. Call amount() on the WeirollWalletHelper contract to get the AP's fill/deposit amount of input tokens.

  2. Call approve() on the market's input token to allow the Deposit Locker to spend the amount returned in step one.

  3. Call deposit() on the Deposit Locker.

Withdrawal Recipe

  1. Call withdraw() on the Deposit Locker.

Last updated