Verify a Market
A list of markets is maintained here: https://github.com/roycoprotocol/royco-sdk/tree/4bc60dc835c5b3ca620fb226464c31cb9ccfcfa1/sdk/constants/market-map
Baseline Requirments for All Market Verifications:
Name/Description of the Market must match the onchain actions of the Market.
User must be able to deposit (ie. $5)
User must be able to withdraw or simulate withdraw (ie. $5)
Deposit and withdrawal flow must not result in the user losing any funds e.g. from slippage
Requirements for Vault Market Verification:
When wrapping a vault for use in a Royco Vault Market, it must be confirmed that the underlying vault is a vanilla 4626 deployment with no bespoke functionalities that alter or impede the core 4626 functionalities. To be specific, the following requirements must hold:
asset()
function doesn’t revertdeposit()
function doesn’t revertconvertToAssets()
function doesn’t revertWorking
previewDeposit()
function with accurate return valueERC20 functionality intact
withdraw()
function must return exactlyquantity
token to the withdrawer immediatelyWorking
maxWithdraw()
function with accurate return value
Requirements for Recipe Market Verification:
Markets using Enso shortcuts must execute the following steps:
Enso shortcut is created, simulated and reviewed by Enso team + relevant parties
IP creates the Royco Recipe Market, all relevant parties review input asset + timelock
Automated RecipeVerifier (see below) is ran, reviewed by all relevant parties
For markets onboarded on-call:
Recipe is built and reviewed on call
IP creates the Royco Recipe Market, all relevant parties review input asset + timelock
Automated RecipeVerifier (see below) is ran, reviewed by all relevant parties
For self-serve markets:
Recipe is built and screenshotted by market creator
Screenshot of the recipe builder is sent to Royco team
IP creates the Royco Recipe Market, all relevant parties review input asset + timelock
Automated RecipeVerifier (see below) is ran, reviewed by all relevant parties
Requirements for Vault Allocation Eligibility:
For a Royco market to be eligible for a Royco Vault to deposit into it, there are further requirements
Entering and exiting the market does not involve swapping into any assets that are not 1:1 with the vault deposit token.
Vault can securely support (ie has a DecoderAndSanitizer) entering into the deposit asset of the market and exiting the withdrawal asset of the market into the vault's deposit token.
The market must be able to facilitate large movements in and out on the scale of the vault's size.
After a new market has been whitelisted for vault entry, there is a delay before to allow vault depositors to ragequit if they oppose the new market.
Automated Recipe IAM Testing:
In order, to ensure that your Recipe IAM's deposit and withdrawal recipes are working as expected, follow these steps to visualize and validate the flow of your recipes.
Make Royco your working directory:
cd royco
Navigate to
test/verification/RecipeVerifier.t.sol
in a code editor.Update the setUp function to match your market's market hash, network (RPC URL), and the network's RecipeMarketHub address
Run:
forge test --mc RecipeVerifier -vvv
Analyze the logs to ensure that the recipes are working as expected.
Last updated