SIP-344: Collateral Delegation Caps

Author
StatusDraft
TypeGovernance
NetworkEthereum & Optimism
ImplementorTBD
ReleaseTBD
Created2023-10-09

Simple Summary

The SIP proposes an SCCP-configurable parameter that sets a nominal, maximum amount of each type of collateral that can be delegated to all pools across a deployment.

Motivation

SIP-333 adds the ability for a pool owner to limit the amount of collateral delegated to a pool as collateralLimitD18. Regardless of the decisions of particular pool owners, governance may desire a limit on the total amount of a particular type of collateral that can be added to pools in aggregate. For instance, if a new type of collateral is introduced to the system that is perceived as risky, in addition to high collateralization ratios, the total amount of this collateral that could be used to issue derivatives against could be limited via SCCP.

Specification

Overview

Implementation of this SIP entails adding maxTotalDelegationD18 to CollateralConfiguration, having an increase of delegated collateral revert if it will cause this value to be exceeded, caching the total amount of delegated collateral after delegateCollateral is called, and the addition of a function to manually update these cached values.

Rationale

Though the additional reads and writes to implement this SIP will result in additional gas cost to the delegateCollateral function, this will incur a flat amount regardless of the number of collateral types added (or amounts of collateral). Further, this will incur no additional gas costs to markets or their participants.

This could alternatively be implemented to limit the amounts deposited rather than delegated. The intent of this SIP as written is to limit the stablecoin (and other derivatives) exposure to the collateral’s value, so it does not limit the amount of collateral deposited into the protocol and just associated with the depositor’s account.

Note that this limit is only enforced per deployment. If a deployment is connected to a deployment on another chain via stablecoin teleportation or pool synthesis, it would have no effect on this behavior.

Technical Specification

When a delegateCollateral call is being used to increase the amount of delegated collateral, the system should check if the addition will cause the total amount of this type of collateral delegated to exceed maxTotalDelegationD18 (as set by governance).

After every delegateCollateral call, a cached value of the total delegated amount of the collateral type must be updated.

A public updateCache function should be added, which loops over each collateral type in the configuration and updates the cached total amounts. It should be called once after the upgrade is executed. This is necessary to ensure the cached values for any deployments that predate this SIP can rely on an accurate value.

maxTotalDelegationD18 == 0 should be treated as unset, rather than a maximum delegation amount of 0. It may be desired to set maxTotalDelegationD18 for the stablecoin 1, for a similar effect as setting minDelegationD18 to the maximum integer value.

Test Case

Relevant tests will be developed during implementation.

Configurable Values (Via SCCP)

  • uint256 maxTotalDelegationD18 added to CollateralConfiguration

Copyright and related rights waived via CC0.