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
lastConfigurationTimetimestamp associated with the pool and alastDelegationTimemapping of an account ID to a timestamp. - Add
setMarketMinDelegateTime(uint128 marketId, uint minDelegateTime)to theIMarketManagerinterface that allows a market to associate aminDelegateTimewith the market. Revert if this value is greater thansetMarketMinDelegateTime_max. - When
setPoolConfigurationis called, it takes the maximum of all theminDelegateTimevalue for all of the markets its backing and it reverts ifblock.timestampminus this value is greater than thelastConfigurationTime. - When
delegateCollateralis called, it takes the maximum of all theminDelegateTimevalue for all of the markets its pool is backing and it reverts ifblock.timestampminus this value is greater than thelastDelegationTime. - After the
setPoolConfigurationanddelegateCollateralfunction is called (in all cases),lastConfigurationTimeandlastDelegationTimeare updated to beblock.timestamp, respectively.
Test Cases
Relevant tests will be developed during implementation.
Configurable Values (Via SCCP)
setMarketMinDelegateTime_max(uint32) - Markets cannot set aminDelegateTimeto a value greater than this. This can be updated with thesetConfigfunction.
Copyright
Copyright and related rights waived via CC0.