@@ -289,8 +289,11 @@ export class EvalQueue extends ProcessingQueue<EvalOrder, SubmitOrder> {
289
289
this . chainId
290
290
) ;
291
291
292
- const securedDeliveryReward = deliveryReward
293
- + ( maxAckLoss * this . profitabilityFactorBigInt ) / DECIMAL_BASE_BIG_INT ;
292
+ const adjustedDevlieryReward = deliveryReward * DECIMAL_BASE_BIG_INT
293
+ / this . profitabilityFactorBigInt ;
294
+
295
+ const securedDeliveryReward = adjustedDevlieryReward + maxAckLoss ;
296
+
294
297
const securedDeliveryFiatReward = await this . getGasCostFiatPrice (
295
298
securedDeliveryReward ,
296
299
bounty . fromChainId
@@ -302,8 +305,7 @@ export class EvalQueue extends ProcessingQueue<EvalOrder, SubmitOrder> {
302
305
) / DECIMAL_BASE ;
303
306
const deliveryFiatReward = securedDeliveryFiatReward / securedRewardFactor ;
304
307
305
- const securedDeliveryFiatProfit = securedDeliveryFiatReward
306
- - deliveryFiatCost * this . evaluationConfig . profitabilityFactor ;
308
+ const securedDeliveryFiatProfit = securedDeliveryFiatReward - deliveryFiatCost ;
307
309
const securedDeliveryRelativeProfit = securedDeliveryFiatProfit / deliveryFiatCost ;
308
310
309
311
const relayDelivery = (
@@ -368,8 +370,10 @@ export class EvalQueue extends ProcessingQueue<EvalOrder, SubmitOrder> {
368
370
bounty . priceOfAckGas
369
371
) ;
370
372
371
- const ackProfit = ackReward
372
- - ( ackCost * this . profitabilityFactorBigInt ) / DECIMAL_BASE_BIG_INT ; // ! In source chain gas value
373
+ const adjustedAckReward = ackReward * DECIMAL_BASE_BIG_INT
374
+ / this . profitabilityFactorBigInt ;
375
+
376
+ const ackProfit = adjustedAckReward - ackCost ; // ! In source chain gas value
373
377
const ackFiatProfit = await this . getGasCostFiatPrice ( ackProfit , this . chainId ) ;
374
378
const ackRelativeProfit = Number ( ackProfit ) / Number ( ackCost ) ;
375
379
0 commit comments