2

Will that transaction function as if the signer sent it? I am assuming this is how limit orders for dapps such as Cowswap work.

For example (assuming this is true): wallet A signs a Uniswap transaction to swap tokenA for tokenB. Wallet B executes that transaction, whos wallet will recieve tokenB and pay for tokenA?

6
  • 1
    You can sign a transaction using one account (Wallet A) and then use the signed transaction to execute it from another account (Wallet B). The signed transaction contains the necessary data and authorization to perform the specified action, and it will function as if the original signer (Wallet A) sent it. TokenB will be sent to the destination wallet specified in the signed transaction, and the necessary amount of tokenA will be used as payment. Aug 26 at 6:33
  • Fairly clearly no, but can you clarify what you're Asking? Are you hoping to use the signature, or what? Are you hoping to execute the transaction on another account… which is not what you Asked? Are you hoping to execute a different transaction on another account? Aug 26 at 21:53
  • @RobbieGoodwin I'm trying to replicate the example I gave, execute transactions which have been signed. The accepted reply answers this is possible. I didn't realize it didn't have to be sent by an EOA, rather just the signed tx has to be sent through an RPC.
    – hear har
    Aug 27 at 0:23
  • @hearhar Thanks and I don't understand anything you just Posted. It might be vitally important and whatever you meant, 'I'm trying to replicate the example I gave, execute transactions which have been signed. The accepted reply answers this is possible. I didn't realize it didn't have to be sent by an EOA, rather just the signed tx has to be sent through an RPC…' simply does not work in English Aug 27 at 18:00
  • @RobbieGoodwin Sorry, I don't know how to put it more clearly. You seem to be the only one having issues comprehending what I asked
    – hear har
    Aug 27 at 22:13

1 Answer 1

3

If you build and sign a valid transaction transferring 1 Eth from your account A to another account B, this is exactly what the transaction will do, whoever submits it, and to whatever RPC it's being submitted.

If an external actor was attempting to take your transaction, replace the receiving address by an address of their own, then the transaction signature would not be valid anymore, and would be rejected by any node on the network.

To elaborate on your example, submitting a transaction to an RPC doesn't involve a wallet at all, it's just sending an RPC request containing the signed transaction. So the statement "wallet B sending a transaction signed by wallet A" does not make sense here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.