bZx — Margin, Decentralized
- Enables lending and borrowing for margin trading.
- Can be easily integrated into new and existing exchanges.
Benefits lenders, traders and DEX.
- Lenders will be able to loan their tokens for reasonable interest without risking or moving their assets
- Traders also able to margin trade without moving.
- Exchanges benefit from increased volume, better feature provision (lending and borrowing) and trading fees.
The bZx protocol uses an escrow contract and an oracle to provide margin lending. There are two main layers called Protocol layer and the Oracle layer.
Protocol layer:- The order object that makers create and takers present to the bZx contract.
- Escrow contract — Holding funds of lenders
- Smart contract — Logic for disbursement of interest.
Oracle layer:- Price feeds and on-chain liquidity. Bounty hunter monitors solvency of margin account. A gatekeeper that uses the DEX price feeds to allow only honest and accurate bounty hunters to initiate liquidations. A guarantee fund that pays out in the rare circumstance that a lender may lose money.
Alice is an ETH holder who wants to capitalize on her holdings by lending them to a margin trader, but she does not want to move her ETH onto a centralized exchange that could be hacked. Using bZx integrated relay, she issues a peer-to-peer loan. She can feel safe because her ETH is secured by smart contracts and never having to worry about losing money.
Bob is a trader who wants to open a long position with additional leverage on ECR20 tokens. Bob looks for the exchange, which has lowest interest rate so that minimizing the cost of utilizing leverage. Eventually, Bob settles on a decentralized exchange that integrated with bZx protocol in which interest rates are usually lower for non-custodial margin loans because lenders do not have to be compensated for the risk of the exchange being hacked.