Submitted by t0x1c
Chainlink aggregators have a built-in circuit breaker if the price of an asset goes outside of a predetermined price band. The result is that if an asset experiences a huge drop in value (i.e. LUNA crash) the price of the oracle will continue to return the minPrice instead of the actual price of the asset. This would allow user to continue borrowing with the asset but at the wrong price. This is exactly what happened to Venus on BSC when LUNA imploded. However, the protocol misses to implement such a check.
Link to code:
Add logic along the lines of:
Min and max prices can be gathered using one of these ways.
hvasconcelos (BakerFi) confirmed
ickas (BakerFi) commented:
