SIP-308: Market-provided Collateral (V3)

Author
StatusImplemented
TypeGovernance
NetworkEthereum & Optimism
ImplementorNoah Litvin (@noahlitvin)
ReleaseTBD
ProposalLoading status...
Created2022-10-03

Simple Summary

This SIP proposes adding functionality that allows markets to increase their credit in the system by depositing collateral directly in the protocol.

Abstract

Markets will be able to deposit and withdraw accept collateral types, as permitted by SCCP. The value of this collateral will be effectively credited to their PnL. This decreases a market’s total balance of debt and increases the amount of withdrawable stablecoins for the market by the value of this collateral.

Motivation

For increased scalability, markets should be able issue debt in exchange for collateral 1:1 under specific circumstances. For example, this functionality will allow spot markets to implement wrappers (as in SIP-182) and perpetual futures markets to implement a delta-neutral snxUSD issuer (as in SIP-256).

Technical Specification

Overview

Implementation entails adding functions that markets may call to deposit and withdraw collateral, adding SCCP-configurable values to limit the amount of depositable collateral on a per-market basis, and updating the debt and credit calculations pertaining to markets accordingly.

Rationale

It is necessary to cap the amount of deposited collateral because, in an extreme circumstance, the amount of market-provided collateral could greatly exceed the amount of collateral deposited to stakers. Market-provided collateral cannot be liquidated, so in the case of a drastic deviation between collateral value and outstanding debt, the stablecoin's collateralization could be jeopardized.

Technical Specification

For implementation, we can add a MarketCollateral module. This will include a depositMarketCollateral() and withdrawMarketCollateral() function.

SCCPs will be able to configure a maximum amount of each collateral type per market with a configureMaximumMarketCollateral() function. This maximum should default to 0. depositMarketCollateral() should revert if the total amount of collateral provided by a given market exceeds this value.

The _totalBalance of a given market should be reduced by the value of the collateral that it has deposited. The getWithdrawableUsd value should increase by this amount.

Test Cases

Relevant tests will be developed during implementation.

Configurable Values (Via SCCP)

Copyright and related rights waived via CC0.