SIP-320: Minimum Collateral Delegation Duration
Author | |
---|---|
Status | Implemented |
Type | Governance |
Network | Ethereum & Optimism |
Implementor | Noah Litvin (@noahlitvin) |
Release | TBD |
Proposal | Loading status... |
Created | 2023-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 alastDelegationTime
mapping of an account ID to a timestamp. - Add
setMarketMinDelegateTime(uint128 marketId, uint minDelegateTime)
to theIMarketManager
interface that allows a market to associate aminDelegateTime
with the market. Revert if this value is greater thansetMarketMinDelegateTime_max
. - When
setPoolConfiguration
is called, it takes the maximum of all theminDelegateTime
value for all of the markets its backing and it reverts ifblock.timestamp
minus this value is greater than thelastConfigurationTime
. - When
delegateCollateral
is called, it takes the maximum of all theminDelegateTime
value for all of the markets its pool is backing and it reverts ifblock.timestamp
minus this value is greater than thelastDelegationTime
. - After the
setPoolConfiguration
anddelegateCollateral
function is called (in all cases),lastConfigurationTime
andlastDelegationTime
are updated to beblock.timestamp
, respectively.
Test Cases
Relevant tests will be developed during implementation.
Configurable Values (Via SCCP)
setMarketMinDelegateTime_max
(uint32) - Markets cannot set aminDelegateTime
to a value greater than this. This can be updated with thesetConfig
function.
Copyright
Copyright and related rights waived via CC0.