Skip to content

Commit 820b0f3

Browse files
committed
comments
Signed-off-by: Ihor Farion <ihor@umaproject.org>
1 parent a1e4f65 commit 820b0f3

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

contracts/periphery/mintburn/sponsored-oft/DstOFTHandler.sol

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,11 @@ contract DstOFTHandler is BaseModuleHandler, ILayerZeroComposer, ArbitraryEVMFlo
157157
}
158158
$.usedNonces[quoteNonce] = true;
159159

160+
// Amount received from `lzReceive` on destination. May be different from the amount the user originally sent (if the OFT takes a fee in the bridged token)
160161
uint256 amountLD = OFTComposeMsgCodec.amountLD(_message);
161-
// We trust the src keyword to record the real send amount.
162-
// This is safe because the source contract validates the signature of the quote.
162+
163+
// We trust src periphery to encode the correct amount. This is safe because src periphery pulls the amount it
164+
// encodes here from the user. Decimal conversion is done on src side as well, so no coversions are needed here
163165
uint256 amountSentLD = composeMsg._getAmountLD();
164166

165167
uint256 extraFeesIncurred = 0;

contracts/periphery/mintburn/sponsored-oft/SponsoredOFTSrcPeriphery.sol

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ contract SponsoredOFTSrcPeriphery is Ownable {
3030
/// @notice Source endpoint id
3131
uint32 public immutable SRC_EID;
3232

33+
/// @notice Trusted mapping of dst decimal difference with src decimals for TOKEN
3334
mapping(uint32 dstEid => int8 decimalDiff) public dstEidToDecimalsDiff;
3435

3536
/// @custom:storage-location erc7201:SponsoredOFTSrcPeriphery.main

0 commit comments

Comments
 (0)