Vyper Bytes #4: collateral management in Vyper OTC

Vyper Protocol
4 min readOct 27, 2022

Gm Snakes 🐍

In today’s edition of Vyper Bytes we provide a few insights into the workings and design rationale of collateral management within Vyper OTC (to read more about Vyper OTC check out this article).

How collateral works in Vyper OTC?

Currently, within Vyper OTC each contract is independent from other contracts, so that the collateral is completely segregated.

The collateral required for the contract to start is specified at contract creation, and the contract only starts if both sides have been correctly funded by the end of the deposit period. This approach is different than other platforms where collateral is margined across several positions and leveraged trading is made possible by borrowing excess collateral as long as the “health” of the account is above a certain limit.

In fact, we can roughly divide collateral treatment across DeFi in three main categories:

  • Full cross-collateral (Mango)
  • Isolated pools with cross-collateral (Solend)
  • Full collateral segregation (Vyper)

To make an example, in the below contract the deposited collateral is 10 USDC for each side. That amounts to a maximum gain and loss for the Long and Short of 10 USDC, and can have an impact in how the contract should be priced (read more here).

This approach comes with clear trade-offs, but we believe the pros far outweigh the cons.

The good

A key advantage of Vyper is the flexibility of our infrastructure, which allows us to quickly deploy new payoffs and onboard collateral. In particular, collateral onboarding is extremely quick given there is no systemic risk for the protocol. This is very different from other protocols, where new collateral has to go through an extensive due diligence, to assess factors such as liquidity, oracle manipulability, and optimal LTV. With Vyper instead we can accept virtually any collateral without worrying about the platform going bankrupt, since the risk remains limited to a specific contract.

Another key consideration is in terms of the infrastructure required to have proper cross-collateral, namely liquidators. Liquidators work generally well (with some risky exceptions!), when the liquidated assets are easy to sell, thus making running a liquidator virtually risk-free. So the ideal assets for a functioning liquidator system are liquid and easy to trade, which in practice means spot and (some) perps. Already with options the picture starts changing, since liquidity is fragmented across strikes and expiries and positions are not exactly fungible. This is why platforms like Deribit have sophisticated liquidations mechanisms plus an insurance fund.

The types of contracts traded on Vyper are also by nature bespoke and customized, with payoffs and collateral on potentially long-tailed assets, not easy to liquidate on the open market. Again, our extreme isolated margin allows us to quickly list new payoffs without spending significant time and resources in building out a reliable liquidator system.

Finally, a general rule we have observed is that building on-chain margining is extremely risky and the chances of even small mistakes resulting in protocol exploit are very real, as we recently saw across Solana with even battle-tested protocols. Adding cross-collateral introduces a number of attack vectors which need to be carefully managed, both at the smart-contract level and from a pure protocol economics point of view.

Just how having a protocol being built for a specific type of derivative is a big waste of time (and why we believe Vyper can innovate in how derivatives are traded on-chain), a new margin system being re-built each time by every protocol is also incredibly wasteful. Rather, it seems much more scalable if some protocols focus on building out reliable on-chain margining which others can integrate with, while freeing up time to focus on the protocol key innovation areas.

The bad

The trade-off of the above is a clear diminished capital efficiency, since collateral is locked within a contract until expiry. This not only limits efficiency across collaterals, but also doesn’t currently allow the netting across positions.

A further limit is a result of the collateral provided in full upfront, which translates in a max loss and max gain on every contract, although this limit is known before entering into the contract.

Here is a summary comparing how margining is treated across different systems:

While we strongly believe our solution has many advantages, we also understand that capital efficiency and risk netting can be limited by the full collateral segregation. On the bright side, we have several improvements to the existing system in the works, so stay tuned! 🐍



Vyper Protocol

A DeFi primitive allowing users to create, trade, and settle any kind of on-chain derivatives 🐍 vyperprotocol.io