Open sujithsomraaj opened 5 months ago
@maxklenk
What do you think about this? For sure such a check would make sense. But that applies to all facets with destination calls and so far we have been going well without this check.
I personally would vote to not implement it.
I would not "hardcode" the receiver contracts in the facet that makes it quite hard to manage and keep things in sync.
Agreed. Closing this issue. @ezynda3 FYI
also make sure the off-chain processor of transactions has this check btw.
Context: StargateFacetV2.sol#L50, StargateFacetV2.sol#L73
Description: The functions
swapAndStartBridgeTokensViaStargate
andstartBridgeTokensViaStargate
allow the user to specify the receiver address of the stargate bridging through the_stargateData
param.The function has validations to ensure that if the
_bridgeData.hasDestinationCall
flag is enabled, then thecomposing.length
should also be greater than zero. However, it is best to ensure that theto
address is the ReceiverStargateV2 address from where the destination call is made.Recommendation: Consider adding the above-mentioned validation to avoid any unforeseen issues due to API failures.
LI.FI:
Researcher: