|Ethereum & Optimism
|Daniel Beal (@dbeal-eth)
This SIP proposes adding various improvements to the core system which will improve user and developer experience.
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.
getOracleManagermethods 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).
createAccount()method (which does not require a
requestedAccountIdparameter) 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.
lockedmethod in the
IMarketinterface will be renamed to
minimumCredit. 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.
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 priceparameter, which it will always return when processed with
block.timestampas the timestamp.
- The existing
createAccount()method will restrict usage of the upper half of values available for the account ID. The new
createAccount()method will use the next available value in the upper half of values, returning the ID used after creating the account.
lockedshould be renamed to
minimumCreditin all relevant locations in the codebase.
Relevant tests will be developed during implementation.
Copyright and related rights waived via CC0.