0

Hi I'm trying to get some clarity as to what the difference is between what was

  1. Transferred
  2. Sent
  3. Received

Shouldn't what's transferred and received be the same? Transferred means the amount that was sent after costs, no?

Also, what how would I calculate the difference between what was Sent and what was Transferred? Is that just Sent amount - (gas used * gas price)?

Here is a concrete example: https://etherscan.io/tx/0xbcdd4b6f28b10a61d5279bd017f555a4edcb233374fbe9e67df1ba3e38ff749a

Would this be correct?:

  1. Transferred: 6.0099999 ETH
  2. Sent: 6.0099999 ETH + (21000 gwei * 0.000000009 Ether)
  3. Received: 6.0099999 ETH
2
  • Transaction/gas fee charged on top of amount being transferred. – Yogesh - EtherAuthority.io Jan 21 '19 at 16:47
  • Would you be able to use my example and list out the different amounts using your equation? – bigpotato Jan 21 '19 at 16:51
1

Few points to understand..

(1) gas cost charged to sender additional to the amount transferred.

(2) gas cost is multiplication of gas limit (21000 in your example) and gas price (9 gwie in your example)

More about gas: https://kb.myetherwallet.com/gas/what-is-gas-ethereum.html

1

Transferred amount and Sent amount are essentially equivalent terms, denoting the amount of ether which has been moved out of a source address (the difference is related to a technical aspect of solidity; see more details at the bottom of this answer).

Received amount is a term denoting the amount of ether which has been moved into a target address.

When an amount of X ether is moved out of a source address with S ether into a target address with T ether, the address which has initiated this transaction will end up paying the gas cost.

In some cases, it is indeed the source address, in which case you should observe that:

  • The balance of the source address is slightly smaller than S - X
  • The balance of the target address is equal to T + X

But in other cases, it may well be some other address.

A typical example is when the source address is that of a contract which provides a function which allows to move ether out of this contract and into a target address.

In this case, you should observe that:

  • The balance of the source address is equal to S - X
  • The balance of the target address is equal to T + X
  • The balance of the address which has initiated the transaction is slightly less than it was before

Here are a few more details about the technical difference between transfer and send...

In Solidity, a contract can move n wei-ether to some address x, using either one of the following options:

  • x.transfer(n) - which will revert if the contract's balance is less than n wei-ether, or if x is the address of some contract which implements a payable fallback function, and that function reverts (for whatever reason); in all other cases it will complete successfully
  • x.send(n) - which will return false if the contract's balance is less than n wei-ether, or if x is the address of some contract which implements a payable fallback function, and that function reverts (for whatever reason); in all other cases it will return true

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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