Comment on page
Spot - Detailed Documentation
The ABM Protocol's liaison between the Oracles and Core Contracts
Spotliaison between the
oraclesand the core contracts. It functions as an interface contract and only stores the current
- All mathematical operations will revert on overflow or underflow
- All methods execute in constant time
ilka given collateral type
ilk.pipthe contract which holds the current price of a given
ilk.matthe liquidation ratio for a given
vatthe core of the mcd system
parvalue of dotBTC in the reference asset (e.g. $60000 per dotBTC )
- Only authorized users can update any variables in contract
pokeis the only non-authenticated function in
spot. The function takes in a
ilkto be "poked".
- 2.When calculating the
paris crucial to this calculation as it defines the relationship between dotBTC and 1 unit of value in the price. The
valis then divided by the
par(to get a ratio of
dotBTC) and then the resulting value is divided by the
ilk.mat. This gives us the current
spotprice for the given
fileis then called after calculating the
spot. This updates the
vatwith the current liquidation price of the
ilkwhich the function was called for.
The methods in the
spotterare relatively basic compared to most other portions of
dss. There is not much room for user error in the single unauthed method
poke. If an incorrect
bytes32is supplied the call will fail.
Any module that is authed against the
spothas full root access, and can, therefore, add and remove which
ilkscan be "poked". While not completely breaking the system, this could cause considerable risk.
A bug in
spotwould most likely result in the prices for collaterals not being updated anymore. In this case, the system would need to authorize a new
spotwhich would then be able to update the prices. Overall this is not a catastrophic failure as this would only pause all price fluctuation for some period.
spotrelies upon a set of trusted oracles to provide price data. Should these price feeds fail, it would become possible for unbacked dotBTC to be minted, or safe Vaults could be unfairly liquidated.
pokeis not called frequently enough, the
spotprice will become stale. This could arise for a few reasons including tragedy of the commons or miner collusion and could lead to negative outcomes such as inappropriate liquidations, or the prevention of liquidations that should be possible.