dY/dX

dY/dX allows for short selling while the bZx protocol allows for both margin trading and short selling. That is, the bZx protocol allows for an individual to leverage their long or short position at a ratio restricted only by market forces.

dY/dX allows the lender to either act as their own oracle or to plug-in a third party solution. However, there is no protocol-level support for integration of oracles beyond alternate addresses being authorized to call the liquidation method by the lender. Most importantly, there is no oracle that must be challenged to protect against premature liquidations. When an order is generated, there is no oracle address nor any oracle fees for makers and takers that is prespecified. This would mean that a user of dY/dX would have trouble replicating the experience of using the bZxOracle.

dY/dX favors a different set of tradeoffs for borrowers and lenders. The section of the dY/dX whitepaper entitled “risks” gives an even-handed overview of the considerations. In contrast to centralized solutions, it can be potentially hazardous for lenders to loan out their money to short sellers using dY/dX in certain circumstances. This is because there is a negotiated “lock out period” wherein there is no mechanism for enforcing margin maintenance requirements. For as long as the lockout period persists, the lender is assuming complete counterparty risk.

Since the lockout period can be negotiated, lenders likely will only accept lockout periods that are negligibly short. Lenders are unlikely to give their money to a margin trader for any period while assuming full counterparty risk without it being reflected in the interest rate. If the equilibrium of the lockout period fell to zero, this would adversely affect the short seller acting as counterparty to the lender. If the lockout period is short, the short seller faces risk of liquidation at any time. dY/dX proposes a reputation system to mitigate the risk that a lender liquidates prematurely.

While bZx is flexible enough to allow third party oracles to impose these constraints, we believe a trustless version of established, existing margin lending design already in use by major exchanges would best serve both borrowers and lenders. The bZxOracle prevents liquidation of margin trader positions, unless those positions have fallen below their margin maintenance requirements. This means that lenders can lend funds without worrying about assuming the counterparty risk of borrowers. Likewise, borrowers can borrow without worrying about the risk of premature liquidation.

UPDATE 7/9/2018: With the release of their second whitepaper, dYdX now has the capability to provide leveraged positions. Additionally, they have announced tokenized margin positions.

Edit 10/31/2018: We believe this section for dYdX is now somewhat outdated and will be shortly releasing a new assessment of the dYdX protocol.

Lendroid

Since both Lendroid and bZx are modeled on 0x and strive to bring decentralized margin lending to the blockchain, there are significant overlaps, especially at the protocol level.

Lendroid offers its own flagship oracle solution, and its solution initially bears great resemblance to the bZxOracle approach. Both systems leverage bounty hunters using off-chain computational power to monitor the health of margin positions. When designing the bZx oracle, it quickly became apparent that managing, valuing, and liquidating margin accounts on-chain would be an excessive gas expenditure without workarounds like TrueBit. We believe that any approach to decentralized margin lending will require significant leveraging of off-chain computational resources to monitor margin accounts.

The Lendroid system attempts to balance tradeoffs in favor of the lender wherever possible. While the bZxOracle collects fees on the interest collected by lenders and uses them to incentivize bounty hunters, Lendroid requires that borrowers stake LST tokens as a deposit that can be forfeited to bounty hunters should the account be authorized for liquidation. This tradeoff is favorable to lenders since they are able to keep a greater portion of the interest, but it is detrimental to borrowers since they are forced to shoulder an additional fee and point of friction. Whereas protocols like 0x allow the purchase of ZRX tokens to be abstracted away by relays, there is no way to abstract away the need for margin traders to stake LST tokens; borrowers must spend time and fees purchasing LST on the open market. Beyond adding a point of friction to the lending process, this directly exposes borrowers and indirectly exposes bounty hunters to the volatility of LST.

The greatest point of divergence between Lendroid and the bZx network beyond the separation of the protocol and oracle layers is the liquidation mechanism used by the respective flagship oracles. For Lendroid, when a bounty hunter notices an account under margin maintenance, a call is made to the Lendroid smart contract and an “auction” is started for a period of three minutes. During this period, bounty hunters and the margin trader are expected to bid on the open positions as well as collateral. The “wranglers” (bounty hunters) take over the open positions and potentially take part of the collateral. They are also responsible for paying back the lender. Unfortunately, at a certain point, borrowers can sustain such heavy losses that bounty hunters are no longer incentivized to participate in the auction due to the burden of paying the lender back in full. In these times the Lendroid model expects the lender to step in and act as the bounty hunter of last resort. While it might at first seem reassuring to lenders that bounty hunters will pay the lender in full, the system only works when it wouldn’t have been necessary. When lenders are most in need, wranglers are nowhere to be seen.

When lenders are most in need, wranglers are nowhere to be seen.

The existence of a three minute auction can pose problems for lenders that at first are not easily foreseen. During the three minute auction window, bounty hunters are exposed to the volatility of the assets in the bankrupt margin account. This could result in situations where it might falsely appear that it would be profitable for a bounty hunter to liquidate a position and retrieve a reward. This can cause unpredictable consequences for the system, including failed liquidations of even reasonably collateralized bankrupt margin accounts. We believe that in an optimal system, bounty hunters do not have to expose themselves to the volatility of bankrupt margin account holdings.

There are compound issues with the Lendroid oracle when the market makes significant movements. In the cryptocurrency markets, this can be frequent. Since the price of the LST token, like almost all tokens, will likely be highly correlated with the overall cryptocurrency market, the value staked is likely to fluctuate with the market. Unfortunately, this can lead to systematic mispricing of bounty hunter services. As mentioned previously, bounty hunters are indirectly exposed to the volatility of LST. The efficient market price for bounty hunters is equal to the marginal cost of providing the service. In the case of bounty hunting, the marginal cost will be slightly above the gas cost of calling the contract. Consequently, when LST is rising along with the market, bounty hunters are systematically overcompensated, leading to deadweight loss. Due to the race condition imposed on collecting the bounty, most of this surplus is harvested by the miners. When LST is falling along with the market, this can cause the bounty hunter to stop being incentivized to liquidate at all, breaking the system. Since this is far from an edge case, the importance of a lender acting as the steward of the margin accounts to which they are exposed becomes paramount.

Using a volatile token as the compensation for bounty hunters is not optimal design, though it at first appears to be helpful in bringing value to the network via its staking model. Since the marginal cost of bounty hunter services can be accounted for primarily by the cost of gas on the Ethereum network, it is important that bounty hunter compensation is dynamic. The bounty must respond to the conditions of the network; it is not adequate that the market sets a price at the commencement of the loan. The problem is twofold: the use of a token correlated with the market to compensate bounty hunters creates new failure conditions for the system, and even if the price of LST was stable, a static bounty would have poor success with a moving target like bounty hunter compensation.

Lastly, it is not entirely clear that the Lendroid system is bolstered by the existence of their bounty hunters. Since bounty hunters are not incentivized in the critical situation where a position becomes undercollateralized, lenders must act as their own bounty hunters at all times. We make a strong distinction between an oracle that requires the lenders to monitor the position at all times and one that does not. Lenders are already sufficiently incentivized to liquidate a position under margin maintenance if they’re a counterparty to that position. If lenders are sufficiently incentivized to call the liquidate function to protect their own assets, the staking of a token as payment for bounty hunters as proposed by Lendroid is an additional point of unnecessary friction.

We contacted Vignesh Sundaresan, Project Lead at Lendroid before publishing this assessment. Vignesh told us frankly that the criticisms in the article are valid. However, he has added that he has been aware of these flaws in the Lendroid system for quite some time and is working to overcome them. We believe that the people at Lendroid, despite the flaws in their published system, are strong technologists. There is a great deal of respect and admiration for Vignesh and the team at Lendroid here at bZx. We hope in the future to use our development budgets to merge overlapping research projects such as cross-chain lending.

There is a lot more to the bZx project than what is contained in our first whitepaper. We seek to be at the nexus of the disintermediation of the financial system. We aim to replace brokers, banks, and clearinghouses with smart contracts.

More details will follow in our next article entitled Phase II: iTokens.