  Financial speculators often seek to increase their potential gains with
leverage. Debt is a popular form of leverage, and with over 39.88B USD of total
value locked (TVL), the Decentralized Finance (DeFi) lending markets are
thriving. Debts, however, entail the risks of liquidation, the process of
selling the debt collateral at a discount to liquidators. Nevertheless, few
quantitative insights are known about the existing liquidation mechanisms.
  In this paper, to the best of our knowledge, we are the first to study the
breadth of the borrowing and lending markets of the Ethereum DeFi ecosystem. We
focus on Aave, Compound, MakerDAO, and dYdX, which collectively represent over
85% of the lending market on Ethereum. Given extensive liquidation data
measurements and insights, we systematize the prevalent liquidation mechanisms
and are the first to provide a methodology to compare them objectively. We find
that the existing liquidation designs well incentivize liquidators but sell
excessive amounts of discounted collateral at the borrowers' expenses. We
measure various risks that liquidation participants are exposed to and quantify
the instabilities of existing lending protocols. Moreover, we propose an
optimal strategy that allows liquidators to increase their liquidation profit,
which may aggravate the loss of borrowers.
