@@ -45,6 +45,7 @@ interface AcrossMessageHandler {
4545 * on the destination chain. Locked source chain tokens are later sent over the canonical token bridge to L1 HubPool.
4646 * Relayers are refunded with destination tokens out of this contract after another off-chain actor, a "data worker",
4747 * submits a proof that the relayer correctly submitted a relay on this SpokePool.
48+ * @custom:security-contact bugs@across.to
4849 */
4950abstract contract SpokePool is
5051 V3SpokePoolInterface ,
@@ -161,6 +162,11 @@ abstract contract SpokePool is
161162 "UpdateDepositDetails(uint32 depositId,uint256 originChainId,uint256 updatedOutputAmount,address updatedRecipient,bytes updatedMessage) "
162163 );
163164
165+ // Default chain Id used to signify that no repayment is requested, for example when executing a slow fill.
166+ uint256 public constant EMPTY_REPAYMENT_CHAIN_ID = 0 ;
167+ // Default address used to signify that no relayer should be credited with a refund, for example
168+ // when executing a slow fill.
169+ address public constant EMPTY_RELAYER = address (0 );
164170 // This is the magic value that signals to the off-chain validator
165171 // that this deposit can never expire. A deposit with this fill deadline should always be eligible for a
166172 // slow fill, meaning that its output token and input token must be "equivalent". Therefore, this value is only
@@ -215,18 +221,6 @@ abstract contract SpokePool is
215221 bytes message ,
216222 RelayExecutionInfo updatableRelayData
217223 );
218- /// @custom:audit FOLLOWING EVENT TO BE DEPRECATED
219- event RefundRequested (
220- address indexed relayer ,
221- address refundToken ,
222- uint256 amount ,
223- uint256 indexed originChainId ,
224- uint256 destinationChainId ,
225- int64 realizedLpFeePct ,
226- uint32 indexed depositId ,
227- uint256 fillBlock ,
228- uint256 previousIdenticalRequests
229- );
230224 event RelayedRootBundle (
231225 uint32 indexed rootBundleId ,
232226 bytes32 indexed relayerRefundRoot ,
@@ -552,7 +546,7 @@ abstract contract SpokePool is
552546 * @notice This function is intended for multisig depositors who can accept some LP fee uncertainty in order to lift
553547 * the quoteTimestamp buffer constraint.
554548 * @dev Re-orgs may produce invalid fills if the quoteTimestamp moves across a change in HubPool utilisation.
555- * @dev The existing function modifiers are already enforced by _deposit (), so no additional modifiers are imposed.
549+ * @dev The existing function modifiers are already enforced by deposit (), so no additional modifiers are imposed.
556550 * @param recipient Address to receive funds at on destination chain.
557551 * @param originToken Token to lock into this contract to initiate deposit.
558552 * @param amount Amount of tokens to deposit. Will be amount of tokens to receive less fees.
@@ -589,7 +583,7 @@ abstract contract SpokePool is
589583 * @notice This function is intended for multisig depositors who can accept some LP fee uncertainty in order to lift
590584 * the quoteTimestamp buffer constraint.
591585 * @dev Re-orgs may produce invalid fills if the quoteTimestamp moves across a change in HubPool utilisation.
592- * @dev The existing function modifiers are already enforced by _deposit (), so no additional modifiers are imposed.
586+ * @dev The existing function modifiers are already enforced by depositFor (), so no additional modifiers are imposed.
593587 * @param depositor Address who is credited for depositing funds on origin chain and can speed up the deposit.
594588 * @param recipient Address to receive funds at on destination chain.
595589 * @param originToken Token to lock into this contract to initiate deposit.
@@ -707,7 +701,7 @@ abstract contract SpokePool is
707701 * ERC20.
708702 * @param inputAmount The amount of input tokens to pull from the caller's account and lock into this contract.
709703 * This amount will be sent to the relayer on their repayment chain of choice as a refund following an optimistic
710- * challenge window in the HubPool, plus a system fee.
704+ * challenge window in the HubPool, less a system fee.
711705 * @param outputAmount The amount of output tokens that the relayer will send to the recipient on the destination.
712706 * @param destinationChainId The destination chain identifier. Must be enabled along with the input token
713707 * as a valid deposit route from this spoke pool or this transaction will revert.
@@ -1283,13 +1277,13 @@ abstract contract SpokePool is
12831277 updatedOutputAmount: slowFillLeaf.updatedOutputAmount,
12841278 updatedRecipient: relayData.recipient,
12851279 updatedMessage: relayData.message,
1286- repaymentChainId: 0 // Hardcoded to 0 for slow fills
1280+ repaymentChainId: EMPTY_REPAYMENT_CHAIN_ID // Repayment not relevant for slow fills.
12871281 });
12881282
12891283 _verifyV3SlowFill (relayExecution, rootBundleId, proof);
12901284
1291- // - 0x0 hardcoded as relayer for slow fill execution .
1292- _fillRelayV3 (relayExecution, address ( 0 ) , true );
1285+ // - No relayer to refund for slow fill executions .
1286+ _fillRelayV3 (relayExecution, EMPTY_RELAYER , true );
12931287 }
12941288
12951289 /**
0 commit comments