IP Guide
A guide for IPs incentivizing CCDM enabled IAMs
Last updated
A guide for IPs incentivizing CCDM enabled IAMs
Last updated
IPs using CCDM for their cross-chain deposit campaigns should follow this guide: delineating the setup process and IP's responsibilities for each CCDM component. Before reading this guide, make sure that you have thoroughly read the section.
CCDM Requirements -
A deposit asset which meets the criteria required in the page.
After completing a deposit into your protocol/DApp your smart contract must return a receipt token which represents the position. These receipt tokens are distributed among the CCDM depositors on the origin chain to return ownership of the positions to the users. Certain protocols which do not feature a receipt token may opt to deploy a helper wrapper contract which deposits into their protocol and returns a receipt token. These receipt tokens do not need to be fully featured, but must allow passing ownership of the position by transferring the token.
Recipe Market Hub - Create a .
- Set the parameters of your deposit campaign
Your deposit campaign on the destination chain will be identified by the market hash of the market you created in step 1.
The owner of the must set you as the owner of the Deposit campaign before you can set and modify the campaign parameters.
Initialize your Campaign by calling this function:
_sourceMarketHash
The market hash of the market you created in step 1.
_unlockTimestamp
The ABSOLUTE timestamp that all deposits in your campaign will be locked until.
At this timestamp, all deposits for your campaign will be withdrawable.
Note: This value can only be set ONCE.
_receiptToken
This is the ERC20 token that your protocol/DApp will return (as a receipt of the depositor's position) upon executing the deposit recipe.
_depositRecipe
This is the that will deposit the tokens into your protocol/DApp and return the receipt tokens to the Weiroll Wallet executing the deposit recipe.
The deposit script must also enforce that the Weiroll Wallet executing the recipe gives maximum allowance to the Deposit Executor to spend the receipt tokens.
If you need to modify the receipt token or deposit recipe for some reason, you can call these functions respectively:
Receipt Tokens can only be modified until the first deposit recipe is executed for a campaign. Every time the receipt token is set, the will need verify it before the deposit recipe can be executed.
Deposit Recipes can be set as many times as necessary but should be done so with caution. Every time the recipe is set, the will need verify it before it can be executed.
- once the has turned on for your market.
If your Royco market intakes , you will need to set minimum amounts for each constituent redeemed. Set these with caution, as impermanent loss will become permanent.
- Once your bridged deposits have been received by the deposit executor, for the Weiroll Wallet that they belong to:
Repeat steps 4 and 5 until all deposits have been bridged and deposited into your protocol/DApp.