SIP-321: Assorted Core System Improvements
Author | |
---|---|
Status | Implemented |
Type | Governance |
Network | Ethereum & Optimism |
Implementor | Daniel Beal (@dbeal-eth) |
Release | TBD |
Proposal | Loading status... |
Created | 2023-04-10 |
Simple Summary
This SIP proposes adding various improvements to the core system which will improve user and developer experience.
Motivation
Since development of markets and front-end applications has begun on the V3 core system, minor changes have been identified that will greatly improve the developer experience for integrators. This SIP summarizes these changes.
Rationale
- The
getUsdToken
andgetOracleManager
methods will allow integrators to fetch the address of the stablecoin and oracle manager systems being used by a particular deployment of the core system directly, rather than finding the appropriate addresses off-chain. - The Constant Node to the oracle manager will streamline the creation of test scenarios and also has production use cases (such as ensuring that a minimum price would be returned in combination with a reducer node).
- The
createAccount()
method (which does not require arequestedAccountId
parameter) automatically generates a valid account ID, creates the account, and returns the ID. This will simplify smart contract integrations which create accounts and remove the possibility of account creation failure due to the same account ID being requested in the same block. - The
locked
method in theIMarket
interface will be renamed tominimumCredit
. This should more clearly reflect that the value returned by this function represents the minimum credit capacity that the market expects from the pools providing it with liquidity. Although this is a breaking interface change, we know that no externally developed markets are in production due to SIP-310.
Technical Specification
getUsdToken()
will be added to the market manager module and return the relevant value from storage.getOracleManager()
will be added to the market manager module and return the relevant value from storage.- The Constant Node will take a
int256 price
parameter, which it will always return when processed withblock.timestamp
as the timestamp. - The existing
createAccount()
method will restrict usage of the upper half of values available for the account ID. The newcreateAccount()
method will use the next available value in the upper half of values, returning the ID used after creating the account. locked
should be renamed tominimumCredit
in all relevant locations in the codebase.
Test Cases
Relevant tests will be developed during implementation.
Configurable Values (Via SCCP)
N/A
Copyright
Copyright and related rights waived via CC0.