SIP-320: Minimum Collateral Delegation Duration

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

Simple Summary

This SIP proposes adding functionality that allows markets to control the time before which collateral delegation can be modified.

Motivation

Markets may implement logic where orders can be anticipated by potential liquidity providers, who may decide to provide liquidity just to capture the fees generated by a particular trade. For example, someone may choose to provide liquidity after noticing an asynchronous order commitment and then remove their liquidity directly after the trade has executed. This may also take the form of "JIT" (just in time) liquidity for synchronous/atomic trades, a well-known MEV strategy which provides essentially risk-free yield at the expense of passive LPs on AMMs like Uniswap.

By allowing market implementations to specify the time since delegation which must elapse before collateral delegation may be withdrawn, passive LPs can be protected (insofar as the LPs entering to capture fees from a particular trade will be forced to take on exposure to fluctuations in debt generated by the market afterwards as well).

Rationale

This functionality is intended to achieve a similar effect as the "burn lock" on the Synthetix V2 protocol. It is also similar to the market-locked collateral functionality already implemented in Synthetix V3.

Technical Specification

  • Add a lastConfigurationTime timestamp associated with the pool and a lastDelegationTime mapping of an account ID to a timestamp.
  • Add setMarketMinDelegateTime(uint128 marketId, uint minDelegateTime) to the IMarketManager interface that allows a market to associate a minDelegateTime with the market. Revert if this value is greater than setMarketMinDelegateTime_max.
  • When setPoolConfiguration is called, it takes the maximum of all the minDelegateTime value for all of the markets its backing and it reverts if block.timestamp minus this value is greater than the lastConfigurationTime.
  • When delegateCollateral is called, it takes the maximum of all the minDelegateTime value for all of the markets its pool is backing and it reverts if block.timestamp minus this value is greater than the lastDelegationTime.
  • After the setPoolConfiguration and delegateCollateral function is called (in all cases), lastConfigurationTime and lastDelegationTime are updated to be block.timestamp, respectively.

Test Cases

Relevant tests will be developed during implementation.

Configurable Values (Via SCCP)

  • setMarketMinDelegateTime_max (uint32) - Markets cannot set a minDelegateTime to a value greater than this. This can be updated with the setConfig function.

Copyright and related rights waived via CC0.