A key goal of OpenRelay is to provide a technology platform for people who want to build things that involve an element of trading. We see things like MakerDAO, which had to create OasisDEX because they needed a place to trade in order to facilitate the DAI system. We see projects like CryptoKitties and CryptoStrikers, both of which have implemented their own trading platforms out of a lack of readily available options. We want OpenRelay to be a platform that is so painless and flexible that it becomes a no-brainer to integrate with OpenRelay instead of building your own trading system.
As we’ve talked to other relayers, we’ve generally found that they think of affiliates as market makers — people with lots of tokens they can bring to the table in the form of liquidity for the relay. At OpenRelay we’re happy to work with market makers, but we think of affiliates first and foremost as developers building the next dApp that needs an order book.
Attracting developers is why we have a flexible fee structure; dApp developers can decide how to split the fees between maker and taker for their particular dApp. It’s also why we charge a flat fee; we want developers to build dApps that trade tokens we’ve never heard of without having to come up with a way to value the tokens being traded so we can charge fees as a percentage. It’s also why our affiliate program will give 80% of the fees to our affiliates; we want to make sure that using our service has more appeal than running your own order book.
How does it work?
Our affiliate registration happens through an Ethereum smart contract. All you have to do is go to affiliates.openrelay.xyz and fill in the following information:
- The name of your dApp
- An Ethereum address that will receive fees
When you submit that information, it will submit an Ethereum transaction to our registration contract. That’s it. You don’t have to provide us with any personal information. You don’t have to pay us to become an affiliate. We just need something to call your dApp, and someplace to send your fees.
The registration contract will create an affiliate contract and broadcast an event telling us about the newly registered affiliate. As soon as the transaction is confirmed, OpenRelay.xyz will start accepting orders for that affiliate contract. You’ll get a link to come back to your affiliate dashboard — keep track of this.
Any orders created with your dApp should list your affiliate contract address
in the feeRecipient field. When those orders get filled, the ZRX used to pay
the fees will be deposited into the affiliate contract. Each Affiliate contract
has a payout()
method. When somebody calls the payout()
method, the
affiliate contract will distribute the tokens to its stakeholders according to
their stake in the affiliate contract (that means 80% of the tokens will go to
you, 20% of the tokens will go to us).
The payout()
method can be called any time - there’s no minimum. We’ll
periodically review our affiliate contracts and trigger payouts when it makes
sense to do so (i.e. the gas costs of the payout are worth the tokens we’d
receive), but you’re welcome to trigger a payout any time you like.
A neat thing about this system is that OpenRelay never holds the tokens you get paid as fees. Fees go straight from the traders to the affiliate contract, and the affiliate contract will ensure that tokens it receives get divided up according to the distribution laid out when the contract was created.
A downside to this approach is that only the affiliate who created an order gets to collect fees. If an order is created by one affiliate, but filled through a different affiliate, only the affiliate that created the order will get to collect fees. We’re exploring some possibilities of how we might share the fees with the filling affiliate in 0x v2, but we don’t have anything concrete yet.
Let’s go!
Signing up as an OpenRelay.xyz affiliate only takes a couple of minutes and a little bit of ETH to cover the gas costs of registration. We don’t collect any personal information, and you get 80% of the fees for any orders you bring us. As a bonus, the first 100 affilate contracts each have 100 Embiggen waiting for them.
Hop over to affiliates.openrelay.xyz and get started today!