Skip to content

Commit

Permalink
cannot request slow fills in exclusivity window
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholaspai committed Feb 6, 2025
1 parent 22edf8c commit a8f61e0
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/relayer/Relayer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,11 @@ export class Relayer {
message: "Completed relayer maintenance.",
});
}

fillIsExclusive(deposit: Deposit): boolean {
const currentTime = this.clients.spokePoolClients[deposit.destinationChainId].getCurrentTime();
return deposit.exclusivityDeadline >= currentTime;
}

/**
* @description For a given deposit, apply relayer-specific filtering to determine whether it should be filled.
Expand Down Expand Up @@ -291,7 +296,7 @@ export class Relayer {
return false;
}

if (deposit.exclusivityDeadline >= currentTime && getAddress(deposit.exclusiveRelayer) !== this.relayerAddress) {
if (this.fillIsExclusive(deposit) && getAddress(deposit.exclusiveRelayer) !== this.relayerAddress) {
return false;
}

Expand Down Expand Up @@ -631,7 +636,7 @@ export class Relayer {

// If depositor is on the slow deposit list, then send a zero fill to initiate a slow relay and return early.
if (slowDepositors?.includes(depositor)) {
if (fillStatus === FillStatus.Unfilled) {
if (fillStatus === FillStatus.Unfilled && !this.fillIsExclusive(deposit)) {
this.logger.debug({
at: "Relayer::evaluateFill",
message: "Initiating slow fill for grey listed depositor",
Expand Down

0 comments on commit a8f61e0

Please sign in to comment.