What it does
On chain order book with 0x settlement. 0x’s primary use case is to provide exchanges with the flexibility of hosting their own off chain order book and matching engine. This approach, employed by ‘relayers’ is semi-decentralized, having a centrally hosted matching server but with on-chain decentralized settlement. Relayers can be non custodial without necessarily compromising speed or cost of transactions. However, we believe there are strong use cases where a fully decentralized approach is desired. Blocked Exchanges: in some countries governments have begun to ban cryptocurrency trading on exchanges. Relayers can be blocked by ISPs as they are centrally hosted, an ethereum contract however is much more censorship resistant and permanently exists on the network, an unstoppable relayer. Security Tokens / Tokens under regulatory pressure: with regulations still forming around digital assets, it may be the case that some popular tokens become categorized as security tokens and therefore not legal to trade under certain jurisdictions. In this case relayers would be forced to comply. An on chain relayer would be immune to such regulation. Small cap tokens: A small cap token may not want to spend energy marketing to exchanges and paying for listings, with an on chain relayer a company can list indefinitely and provide a place where their token can always be listed.
How I built it
Challenges we ran into
So it doesn’t work yet. The challenge of lack of solidity documentation on the 0x side made us really have to do a deep dive into the code of the logic. We also spent a fair amount of time working on a delegate solution for approving token transfers, placing orders and sending it to the 0x contract all in one function call…only to give up on that after it proved unfruitful. Overall though it looks great
Accomplishments that I'm proud of
There’s some really cool logic in there and I think with a few more days/ some sleep we could have a working prototype.
What I learned
I feel like a 0x guru now, and I’ve never ran into more stack too deep errors in my life