I'm sending a token from account A to B. The account who issues transaction is C. Surprisingly, the transaction is valid and works fine. Why?
This means that I, being the transaction issuer, can make arbitrary account A give tokens to arbitrary account B? Does this not mean that I can literally steal tokens this way, given B is some other address of mine.
I'm pretty sure I'm missing some fundamental thing here.
The JSON RPC payload to depict the question is this:
{
"jsonrpc": "2.0",
"method": "eth_sendTransaction",
"params": [
{
"to": "0x5928ead021bd523e6d3531de920d78b7a02efa60",
"from": "0xef2b050377007e45ba43d9c2bf0d7acc2039c112",
"data": "0x23b872dd000000000000000000000000d8e05701eFf33acfDA0A8e24C04070347703c72C000000000000000000000000ad9c9b5085bec8e8013296dc12bd9cecad102356000000000000000000000000000000000000000000000000000000005a9187bf",
"gas": "0x3d0900",
"gasPrice": "0x51f4d5c00"
}
],
"id": 1
}
The transaction happened on a ropsten
network, and can be seen here: https://ropsten.etherscan.io/tx/0x3a1d9800565e93a7ff0e85958dcf49a9e7752d099f4b061598e8b73f1e453814
Here:
0x5928ead021bd523e6d3531de920d78b7a02efa60
– contract address,0xef2b050377007e45ba43d9c2bf0d7acc2039c112
– transaction issuer (the one who will pay the transaction fee),0xd8e05701eFf33acfDA0A8e24C04070347703c72C
– user A, actually, contract creator who holds all the tokens; the one whos tokens are being stolen,0xad9c9b5085bec8e8013296dc12bd9cecad102356
– user B, the one who is being gifted some tokens.
How come this transaction is valid?