-
Notifications
You must be signed in to change notification settings - Fork 42
Minimal price feed design #114
Comments
Price feed:
A pseudo-interface: interface PriceFeed {
function getPrice() external view returns (uint128);
function updatePrice(uint128 price) public;
} Resources: updatePriceMakerDAO implements two additional prerequisites on
#1 avoids the network's nodes from spuriously recomputing things for price changes of negligible magnitudes. #2 is more a mitigator from DoS attacks of feed providers. GovernanceEventually KEEP holders will govern a couple aspects of tBTC, including the price feed mechanics. The price feed underlies the entire cryptoeconomic proposition of tBTC and its malfunctioning is a systematic risk. MakerDAO has quite an effective risk team, evidenced by their preparation for black swans and the like. A couple concerns we should analyse:
|
Minimal design rationale
Future design rationale
|
I should add, that Maker uses uint128 representation for USD prices of 1 ETH. I'm going to trust their logic here, my assumption being that it's extremely unlikely that BTC and ETH's value will differ on an order of magnitude big enough to overflow (although ETH does have a different supply/issuance to BTC) |
We expect weis per satoshi elsewhere- @prestwich promised he'd eat his hat if we ever overflowed 😂 |
To be clear
We don't want this to be KEEP holders- there's a "somewhat free rider problem" where not all KEEP holders are aligned with the best interests of the tBTC system, so they shouldn't govern it. Instead, we'll mint a tBTC specific governance token that we'll use for stuff like this past v1. That said, the plan for now is just to mint and distribute it appropriately, and eventually turn over param tweaks and governance upgrades to the holders after v1 is on mainnet. |
Maker also implements a price expiration time ( |
Just did some research into the auth structure. In a system with so many moving parts, especially if they're smart contracts, I think using something that's both well-designed and explicit is essential. OpenZeppelin contracts have historically been of average quality. I did some brief exploration into MakerDAO's Dappsys libraries (see the branch comparison), which are top-notch and simple to use. They have a couple components: DSThing, DSAuth, DSProxy....that look very useful/powerful for our case. Especially the DSProxy which is good for atomic upgrades (cc: keep-network/keep-core#726) They look very good. I don't want to tread on anyone's feet, but auth obviously should be standardised across the entire system. Probably best to have a call this week and discuss. |
To summarise, based on the feedback from the access control RFC, we're going to standardise on some auth architecture/patterns but at a later date - the current milestone doesn't put this at high priority. Instead, the minimal design will incorporate a single trusted operator address. |
Price expiration seems like a good idea |
What does a first-release price trusted feed look like?
Document the simplest possible BTC/ETH price feed
The text was updated successfully, but these errors were encountered: