๐ŸŽชMarkets

Anyone can launch Mimicry Markets using this simple guide.

1. Request Access

At this time your wallet must be approved in order to launch a new market on Mimicry. Please apply for approval here and then ping the team on Discord in the mimicry-markets channel.

2. Create a New Data Feed

a) Refer to the contracts reference for the address of the OpenMarketsOracle contract on Polygon Mumbai.

b) From there you'll need to call the createDataFeed() function the contract, passing the data feed nickname and a list of one or more allowed scribes.

c) Inspect the logs after the createDataFeed() transaction is successful in order to find the dataFeedId. The ID will be used later when setting up the W3F.

3. Create an Automated Task in Gelato

a) Visit this page in the Gelato W3F application and connect your wallet. You can also reach this page by clicking the New Task button on the dapp homepage.

b) You'll need to start off by pasting the IPFS CID of your W3F. We recommend using the Mashup function that we've officially published and maintain. Please see the Contracts Reference for the latest CID of the function you'd like to use.

c) Each W3F schema is different, but assuming you're using one of our officially supported functions, you'll need to add the following parameters:

Pro Tips: See the enums in the Off-Chain Reporting Oracle repository for a complete list of supported chainIds, consensus methods, currencies, metrics, and providers.

And all arrays of strings must be formatted as follows: ["value","value"]

  • oracleAddress See the contracts reference for the appropriate OpenMarketsOracle contract.

  • dataFeedId Paste the dataFeedId that you previously created in step 2.c. above.

  • nftCollections This field accepts a comma-separated array of one or more NFT collections pointers, in the following format: ["chainId:contractAddress","chainId:contractAddress"]

  • tokens This field operates the same way as nftCollections, expect that it expects contract address of ERC-20 tokens.

  • currency Expects a currency string, like usd.

  • metric Expects a metric string, like market-cap.

  • providers Expects an array of strings, where each provider is used to query market data about NFTs, tokens, etc.

  • consenusMethod Expects string that includes a filter and a methodology, formatted as filter:methodology. Ultimately this defines how to distill down to a single number when various providers disagree on the metric related to an NFT collection, token, etc. In nearly all cases we recommend using meanAverageDeviation:mean.

  • deviation Expects a number between 0 โ€“ 10,000, where 10,000 equals 100%. This parameter instructs the data feed to write a tick on-chain anytime the new value returned by the provider APIs changes by more than the deviation threshold. We generally recommend using a value of 25 to represent a deviation threshold of 0.25%.

  • heartbeat Expects a number greater than 0, where the number is the amount of seconds to wait between on-chain ticks before writing a new value. Generally we recommend setting this value to 3600 to represent one hour.

4. Set Environment Variables

API keys must be set for each provider. The easiest way to do this is to clone the Mimicry Off-Chain Reporting Oracle repository, setup your local .env file, and run the command , as described in the Secrets section of the repository README.

5. Fund Your Task

The last step is to fund your Gelato W3F account so there is ample money available for gas. We generally recommend funding approximately $1,000 per task per year, which assumes an average of $0.078 per transaction, and 35 transactions per day.

Last updated