Proxy Contract Deployment

Deploying a Proxy Contract

DEX.AG can handle the initial setup and deployment of Proxy Contracts for platforms that would like access to DEX.AG's trade aggregation feature.
To get started, fill out our Proxy Application form.
We perform the following steps when deploying a new Proxy Contract:
  1. 1.
    First, we gather the required information to deploy the Proxy Contract from the interested platform. This includes the platform's name, the total collection amount they wish to collect on trades, and a beneficiary address where the amounts will be sent to.
  2. 2.
    Next, we deploy a Proxy Contract with the platform's requested parameters. After the contract has been deployed, we transfer the Proxy Contract ownership to the platform. From this point onward, DEX.AG has no further control over the platform's Proxy Contract with the exception of setting the address where DEX.AG's share of the collection amounts are sent.
  3. 3.
    Finally, we send the platform their Proxy Contract address which they can use in DEX.AG API calls to get their trade data.
Once your platform's Proxy Contract is deployed, check our contract settings page to customize your platform collection amount and beneficiary address which receives collection amounts.

How to Deploy a Proxy Contract

  1. 1.
    Clone the Github repo located here.
  2. 2.
    This project requires npm and Truffle so make sure that both are installed and accessible on the machine you are using and that you are familiar with how to use them.
  3. 3.
    Run npm install to install required modules
  4. 4.
    Add a .secret file containing your wallet's 12 word mnemonic phrase to the root of the directory. This will be the account that deploys the contract and will also be set as the Proxy Contract's Owner. Proxy Contract Ownership can be transferred at a later date using the Owner Setting. As with all mnemonic phrases, we recommend you back up this phrase in a secure location just in case.
  5. 5.
    Add a .infura file containing your Infura endpoint to the root of the directory if you are using Infura, alternatively you can use other Ethereum entry points by configuring this in truffle-config.js.
  6. 6.
    If you want to set a fee on your contract, modify the values in migrations/3_deploy_collection.js to set the fee and the collection beneficiary as well as the dexagvariable. The contract will split collection amounts 80/20 between the beneficiary and dexag addresses, you can set the dexag field to the same address as the beneficiary to collect all fees.
  7. 7.
    Now, from the root directory run truffle migrate --network mainnet --f 3. This will begin the deployment process and will deploy your Proxy Contract. To deploy a contract that does not take any fees, run truffle migrate --network mainnet --f 2 which will deploy a contract that doesn't collect a fee.
Last modified 2yr ago