sygma-sdk icon indicating copy to clipboard operation
sygma-sdk copied to clipboard

Using the SDK when trying to send a value higher than the balance is allowed

Open LyonSsS opened this issue 1 year ago • 1 comments

Context: While using the SDK https://github.com/sygmaprotocol/sygma-sdk/blob/main/examples/evm-to-evm-fungible-transfer/src/transfer.ts to transfer Fungible token EVM to EVM, of a token that is also the FEE, for a value that is > actual balance, it is allowed.

STR:

  1. Have a wallet on source with 1000 sygUSDC.
  2. Use the SDK to transfer 1500 sygUSDC to another compatible destination.

Expectancy: The TX should be discarded from the beginning as the the transfer value of 1500 is higher than the actual balance.

Actual: The TX is emitted and fails after partial execution. https://sepolia.etherscan.io/tx/0x25a6b39ae8ac84b945c3695212199f37c602ebf37d48ca1bf26bbfca84ac16cd

LyonSsS avatar Feb 06 '24 13:02 LyonSsS