diff --git a/README.md b/README.md index 1954c367..b87270db 100644 --- a/README.md +++ b/README.md @@ -191,7 +191,7 @@ The number of minutes used to calculate the scaling multiplier if a pending tran The maximum scaling multiplier used when the pending transaction lag exceeds the `scalingWindow`. -#### `deviationThresholdCoefficient` +#### `deviationThresholdCoefficient` _(optional)_ The global coefficient applied to all deviation checks. Used to differentiate alternate deployments. For example: @@ -199,6 +199,8 @@ The global coefficient applied to all deviation checks. Used to differentiate al "deviationThresholdCoefficient": 1, ``` +Defaults to `1`. + #### `dataFeedUpdateInterval` The interval specifying how often to run the data feed update loop. In seconds. diff --git a/src/config/schema.ts b/src/config/schema.ts index 5b838dfb..dccfdbeb 100644 --- a/src/config/schema.ts +++ b/src/config/schema.ts @@ -136,7 +136,7 @@ export const configSchema = z sponsorWalletMnemonic: z.string().refine((mnemonic) => ethers.utils.isValidMnemonic(mnemonic), 'Invalid mnemonic'), chains: chainsSchema, fetchInterval: z.number().positive(), // TODO: Rename to signedDataFetchInterval - deviationThresholdCoefficient: z.number(), + deviationThresholdCoefficient: z.number().positive().optional().default(1), // Explicitly agreed to make this optional. See: https://github.com/api3dao/airseeker-v2/pull/20#issuecomment-1750856113. }) .strict();