I made a transaction using cardano-cli built from rust github.
I added 2 utxos (1ADA + 3ADA) as inputs, a change address, and an output for 2 ADA to an address.
You can see it here:
sick_puppy: ./cardano-cli transaction status 64SFC1 input-total: 4.000000 output-total: 2.000000 actual-fee: 2000000 fee: 0.175245 tx-bytes: 452 --- staging_id: 64SFC1 magic: 5452414e53414354494f4e5f5631 protocol_magic: 764824073 transaction: inputs: - transaction_id: 49b6a2bb6b8c68c95701cc3034dfae080d35ed143ab7ddc255456b41c3dda231 index_in_transaction: 1 expected_value: 1000000 - transaction_id: 05e3cfa8681497daa671e91f614eebe4c257c4620c25ecccef8acddab91c7de6 index_in_transaction: 1 expected_value: 3000000 outputs: - address: DdzFFzCqrhspknv7Ph59BP8bVXQg5X7aYhERr755LJjunTLwZsBu9NGh6nMS3Ynf9GwktoFocxy5BwUMXxza8ZKDAaTsmFxkUBVJuahS amount: 2000000 changes: - address: Ae2tdPwUPEZ7ubYTmthXk5ns4N17crep1BNoJeD36CFrrfUk29bAAmsBP8T witnesses: - PkWitness: - f2e55906d8a7f60ccc0c0ac6bb3408f12dc130659ed75b9bb7c9c031a44948aaacf353e316a2d6273aa9c865f651c97fdc2c6abfe21f9e49b77912a44e1d9990 - def1ed8f21827032a81bbfb29bff1a84b35c7d50dca95efa990535d25876f368d28373031f59d3b567dff55768ab2bc96c61e015b14d062bf128f1c9f181240e - PkWitness: - 60a6e277a0201f329004443d914a0a8276eeaabf7ef37868e08fc31f55c187746e4319d2429e126fa5c90eb287e594e2fc54867ac6f056db6277f01f2f504a25 - eded3bf85350f41bcf1a5b785b46b4b8a2c2bf699f470bef366163e9e42063fadee5267fcb56777b3c1d992c0292afd54565cbd7000fbfce4fe3839630589401 finalized: false
You can see that the fee should be 0.175, it also says “actual fee” is 2. I was not sure what would happen, so I singed and sent the transaction to mainnet, which processed it.
As it says, the actual fee was 2. In other words, everything that did not go to the output address was considered a fee.
I would have thought, whatever was left after fee taken out, would be the “change” and would go to the change address. Yet it was not so…
So what is the point of the change address?
And how are we supposed to do it?