Excess fees refunded by endpoint will be stuck in SolConnector as it has no function to transfer them out
Summary
Excess fees refunded by endpoint will be stuck in SolConnector as it has no function to transfer them out
OappSenderUpgradeable::_quote gives an estimate of the fees to sucessfully transmit a message from the src chain to the dst chain. If there is an excess of fees once finally executed, the excess is refunded to the _refundAddress which is configured as address(this).
Root Cause
_lzSend with _refundAddress is address(this): link
_lzSend implementation showing fees will be refunded: link
Silly Amber Shell
Medium
Excess fees refunded by endpoint will be stuck in
SolConnector
as it has no function to transfer them outSummary
Excess fees refunded by endpoint will be stuck in
SolConnector
as it has no function to transfer them outOappSenderUpgradeable::_quote
gives an estimate of the fees to sucessfully transmit a message from the src chain to the dst chain. If there is an excess offees
once finally executed, the excess is refunded to the_refundAddress
which is configured asaddress(this)
.Root Cause
_lzSend
with_refundAddress
isaddress(this)
: link_lzSend
implementation showing fees will be refunded: link_quote
is an estimateInternal pre-conditions
SolConnector
send the quoted_msgFee
External pre-conditions
Attack Path
SolConnector::withdraw
uses the LayerZeroquote
function to estimate the_msgFee
address(this)
Impact
PoC
No response
Mitigation
Add a mechanism to be able to withdraw the fees