File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
contracts/oracle/wasm/src Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -324,8 +324,17 @@ impl PriceSourceChecked<Empty> for WasmPriceSourceChecked {
324
324
denom : & str ,
325
325
config : & Config ,
326
326
price_sources : & Map < & str , Self > ,
327
- kind : ActionKind ,
327
+ _kind : ActionKind ,
328
328
) -> ContractResult < Decimal > {
329
+ // Kind (Default or Liquidation) is used to differentiate between the two types of pricing in Pyth price source.
330
+ // Liquidation only check Staleness, while Default checks Staleness, Confidence and Deviation.
331
+ //
332
+ // Current Mars contracts on Neutron don't use kind and always checks only Staleness for Pyth (if we want to use this feature we
333
+ // have to migrate other Mars v2 contracts).
334
+ //
335
+ // It is safe to use Liquidation kind for all price sources simulating the current behavior on Neutron (only Staleness check).
336
+ let kind = ActionKind :: Liquidation ;
337
+
329
338
match self {
330
339
WasmPriceSource :: Fixed {
331
340
price,
You can’t perform that action at this time.
0 commit comments