Become A Partner

Are you a developer and interested in becoming a partner? This page covers everything you need to know about building on WaxDAO's token farms.

Getting A Partner Discount

If you plan on launching your own token farm platform using our service, the first thing you should do is reach out to @MikeD_Crypto on Telegram. Let us know about your project, and tell us which WAX address you will be using to create your farms.

After we add you as a partner, any farms created by your WAX address will receive a discount.

Listing Your Token As A Payment Method

By default, our contract accepts WAX for farm payments (250 WAX per farm, before any discounts are applied).

We are open to listing high quality tokens of partner projects, and also adding additional discounts when users pay with those tokens. Between the partner discount and the token discount, farm creation can be discounted pretty heavily.

As far as listing partner tokens, there is a due diligence process. We won't just add any random token as a payment method, and may require additional information.

Furthermore, tokens received as farm payment may either be paired against another token for liquidity, or possibly sold. So please keep this in mind.

Getting The Current Farm Price

Unless a farm is paid for in WAX (which is always a static price), farm prices are calculated in real time, based on the TWAP price of the payment token on Alcor. Up to 30 minutes of TWAP data is used, if available. Meaning, the farm price is based on the average token price over the past 30 minutes.

We have created an action on our contract that makes it very simple for you to fetch, and display the current price on your front end.

In this example, pretend you are Alcor, and your LSW token is accepted as a payment method. Note that we've set this up to take in, and return a vector - so you can get a price list for multiple tokens.

const { ContractKit } = require("@wharfkit/contract")
const { APIClient } = require("@wharfkit/antelope")

const contractKit = new ContractKit({
  client: new APIClient({ url: "https://api.waxdaobp.io" })
});

const LSW = {sym: "8,LSW", contract: "lsw.alcor"}

const getFarmPrices = async () => {

    try { 

      const contract = await contractKit.load("tf.waxdao")

      const result = await contract.readonly('getfarmprice', {
            partner: "alcor",
            payment_tokens: [LSW]
      })                          

      console.log(`Price: ${String(result)}`)
      return String(result)
       
    } catch (e) {
      console.log(`error fetching farm prices: ${e}`);
    }
};

getFarmPrices();

This example uses Wharfkit, but you can use whichever library you prefer.

Creating A Farm

The farm creation process requires 3 steps:

  • Sending the payment

  • Calling the createfarm action

  • Calling the addreward action

If you are a partner and wanting to have a discount applied, it's probably ideal if you have an intermediate contract where you accept the payment from a user, along with the necessary farm data, and then your contract can create the farm.

To make this process as easy as possible for you, we have developed this contract so you don't need to. All you need to do is deploy it, and add the eosio.code permission to it.

The intermediate contract can be found at the following URL.

And instructions for adding the eosio.code permission can be located in our development handbook.

Instructions for setting the contract up are in the README.md file of the Github repo linked above.

Last updated