Skip to content

Commit d8abc74

Browse files
committed
add comments for caller passing msg.value for LZ fee
1 parent 184ac33 commit d8abc74

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

contracts/periphery/counterfactual/CounterfactualDepositOFT.sol

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@ contract CounterfactualDepositOFT is CounterfactualDepositBase {
8080

8181
/**
8282
* @notice Executes a deposit via SponsoredOFT
83+
* @dev The caller must supply msg.value to cover the LayerZero native messaging fee.
84+
* This fee is paid by the caller, not from the user's deposited tokens—so the
85+
* executor's incentive (executionFee) must cover both the origin tx gas cost
86+
* and the LayerZero fee.
8387
* @param params Route parameters (verified against stored hash)
8488
* @param amount Gross amount of token (includes executionFee)
8589
* @param executionFeeRecipient Address that receives the execution fee
@@ -129,6 +133,7 @@ contract CounterfactualDepositOFT is CounterfactualDepositBase {
129133
})
130134
});
131135

136+
// Forward caller-supplied msg.value to cover LayerZero native messaging fee.
132137
ISponsoredOFTSrcPeriphery(oftSrcPeriphery).deposit{ value: msg.value }(quote, signature);
133138

134139
emit CounterfactualDepositExecuted(

0 commit comments

Comments
 (0)