Submitted by ladboy233
Across the codebase, the minAmonutLD and amountLD is set to equal value:
However, minAmonutLD served as a slippage control on layerzero v2 side, and 0% slippage is not always possible. The cross-chain transaction will always reverted in too strict slippage contract and block asset transfer.
https://github.com/LayerZero-Labs/LayerZero-v2/blob/142846c3d6d51e3c2a0852c41b4c2b63fcda5a0a/oapp/contracts/oft/OFTCore.sol#L345
Let user input a percentage and compute minAmountLD based on a percentage of slippage user is willing to take risk of.
Token-Transfer
cryptotechmaker (Tapioca) confirmed, but disagreed with severity and commented:
