Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bZx #1

Open
KyleJKistner opened this issue Sep 10, 2018 · 0 comments
Open

bZx #1

KyleJKistner opened this issue Sep 10, 2018 · 0 comments

Comments

@KyleJKistner
Copy link

KyleJKistner commented Sep 10, 2018

dap: 1
project name: bZx
main site: bZx.network
author: @tomcbean @KyleJKistner
status: In Review
created: 2018-09-10

Simple Summary

Decentralized margin trading on the Ethereum blockchain.

Abstract

bZx is built on Ethereum and integrated with the 0x protocol. It is the first fully decentralized, peer-to-peer margin funding and trading protocol. It is not itself an exchange, but a protocol that can be integrated into the current exchange infrastructure. Exchanges and relays are incentivized by fees denominated in the BZRX protocol token (BZRX) to offer decentralized margin lending and margin trading services. Assets are valued and liquidated via competing oracle providers. By decoupling the valuation and liquidation of assets from the protocol, the oracle marketplace approach allows competition to drive the oracle provider fee to its marginal cost while encouraging experimentation and flexibility. bZx has seeded the oracle layer of the protocol with a world-class liquidation system that can settle positions within the span of a block, making it the only oracle capable of safely guarding assets in this volatile cryptocurrency ecosystem.

Resources

bzx.network
github.com/bzxnetwork

Motivation

bZx was intended to create a practical way of engaging in margin loans and margin trading without having to rely on the centralized exchange ecosystem. The protocol was inspired by the 0x project and its hybrid on-chain/off-chain approach to orderbooks and settlement. When we created the protocol, we realized that the greatest challenge facing a margin protocol would be designing the margin calling mechanism to safeguard lender funds and that while we wanted to create an open-ended protocol, that would not be enough; we realized would have to seed the protocol with a sophisticated margin calling mechanism.

Specification

https://bzx.network/pdfs/bZx_white_paper.pdf

https://medium.com/@b0xNet/bzx-announces-mainnet-launch-releases-zk-labs-security-audit-and-unveils-upcoming-relay-a690cc6c7bf1

Rationale

The base layer protocol with an escrow contract that can disburse interest was straightforward and trivial. The choice of on-chain settlement and off-chain orderbooks was made according to the same rationale that 0x gave. We wanted to bring shorting to the 0x ecosystem, so it made sense to pattern our orderbooks and settlement after them. The area in which we considered the most design options was in the margin calling area, which was by far the most technically demanding and development intensive part of the project. At first we considered simply letting lenders call in loans. This would have been easy from a development perspective but it suffers many downsides and makes risk management uncertain for traders. Another system we considered involved oracles such as Oracalize, but we rejected this approach for numerous reasons including the fact that it centralized the system. We considered auction systems, such as the case with Lendroid and dYdX, but we realized that this would make settlement time extremely long and expose lenders to too much market volatility. In the end we decided secure, decentralized on-chain price feeds and on-chain liquidity would be the best route to secure margin traders.

Callgraph of our oracle:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant