Skip to content

Potential overpayment in bridgeLayerZeroOFT #417

@iamkunal9

Description

@iamkunal9

I noticed that bridgeLayerZeroOFT in LayerZeroOFT.sol:21 uses selfbalance() as msg.value when calling the OFT contract:
call(gas(), oft, selfbalance(), ...)
But the integration test expects the exact quoted fee to be sent:
vm.expectCall(oft, fee, abi.encodeCall(IOFT.send, ...));
Is this intentional? If the BridgeSettler holds any residual ETH from previous actions, wouldn't the entire balance get sent as the fee instead of just the quoted amount?
Just want to understand if there's a guarantee that selfbalance() always equals messagingFee.nativeFee at call time, or if this might be an issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions