Submitted by Infect3d, also found by klau5, XDZIBECX, falconhoof, Evo, ilchovski, LinKenji, foxb868, and nonseodion
One of the conditions for updating oracle prices in Ditto is when an action related to shorts is executed.
This is important because, in the event of high volatility, shorts must be closed out before bad debt occurs in the protocol.
While liquidations does update the oracle before processing the short, this is not the case for redemptions.
Redemptions, as liquidations, play a central role in Ditto. By allowing users to redeem shorts with poor collateralization for a 1:1 exchange rate of the asset, Ditto is able to maintain a stable peg for its pegged asset.
For this reason, it is important to reduce the pricing delay for the redeems, as much as for the liquidations.
If the cached price is not reflective of the current market price, the protocol may either overvalue or undervalue the collateral backing shorts. The usage of cached prices in the proposeRedemption function, as opposed to real-time or recently updated prices will affect the effectiveness of the redemption process in maintaining the assets peg in periods of high volatility.
Do not use cached price for redemptions, but rather an updated price through LibOracle::getSavedOrSpotOraclePrice, for example.
Oracle
raymondfam (lookout) commented:
ditto-eth (DittoETH) confirmed
