From 7431023c5733e77edcd674c5e16cd1c6b7b22cc9 Mon Sep 17 00:00:00 2001 From: kaleb Date: Mon, 22 Apr 2024 18:54:40 +0200 Subject: [PATCH] Update sip-378.md --- content/sips/sip-378.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/sips/sip-378.md b/content/sips/sip-378.md index 110ee9aa5..1033ebbb8 100644 --- a/content/sips/sip-378.md +++ b/content/sips/sip-378.md @@ -26,7 +26,7 @@ C) Allow for 0 fee perp trading -A) [`acceptablePriceExceeded`](https://github.com/Synthetixio/synthetix-v3/blob/3912d2f61dd6c7f7c29e750b7f116804027b0965/markets/perps-market/contracts/storage/AsyncOrder.sol#L302) is thrown whenever the limit price is worse than the users' `fillPrice` upon order commitment and settle. As per ERC-7421, integrators are required to push for a fresh price update when the staleness error is thrown (for write transactions). However, the concept of `acceptablePrice` might require fresh price to be include don commitment in order for the acceptablePrice to be relevant. Hence removing this check, on commitment is necessary in order to simplify the order execution pattern for integrators and decrease the gas cost associated with order execution. +A) [`acceptablePriceExceeded`](https://github.com/Synthetixio/synthetix-v3/blob/3912d2f61dd6c7f7c29e750b7f116804027b0965/markets/perps-market/contracts/storage/AsyncOrder.sol#L302) is thrown whenever the limit price is worse than the users' `fillPrice` upon order commitment and settle. As per ERC-7421, integrators are required to push for a fresh price update when the staleness error is thrown (for write transactions). However, the concept of `acceptablePrice` might require a fresh price to be include on commitment, in order for the acceptablePrice value to be relevant during times of volatility. Hence removing this check, on commitment is necessary in order to simplify the order execution pattern for integrators and decrease the gas cost associated with order execution. B) [SIP-354](https://sips.synthetix.io/sips/sip-354) introduced a requirement that all markets, in a given supermarket, are not in a stale state, upon order settlement. This cause issues, given that keepers are compensated for updating 1 price per order. Furthermore, when a user commits to an order, staleness is only checked against the position being altered. This SIP proposes incorporate a new staleness check requirement `INFINITE` which uses the last pushed price when [settleOrder](https://github.com/Synthetixio/synthetix-v3/blob/434b685c49db22ddc24cffa07a6b3fbfb8f0df17/markets/perps-market/contracts/modules/AsyncOrderSettlementPythModule.sol#L46) calls [requiredCredit](https://github.com/Synthetixio/synthetix-v3/blob/9b410c97cc1afee9c0c0c4ced5a1e652369bf36f/markets/perps-market/contracts/storage/PerpsMarket.sol#L431C77-L431C86). Note that all other calls to the `requiredCredit` function remain the same with respect to staleness tolerance.