Understanding how UTxO are split when sending from an exchange

Hello everyone,

Today, I sent around 50 ADA from my account on some exchange to my personal wallet.

The transaction has 5 inputs and 2 outputs:

  • The 5 inputs represent a total of around 7000 ADA
  • The two outputs are 6950 ADA and the 50 ADA for me.

I was wondering why involving 7000 ADA in the transaction to only send me 50 ADA.

I heard that the more UTxO are involved in a transaction, the more fees:

  • Is it true?
  • if so, is it because the size of the transaction increases in bytes (a + b × size)?

Did the exchange defragmented their UTxO at my expense?

Thank you for your response!

The way transactions work in Cardano makes that the entire UTxO is used as an input in the transaction. For example, if you want to transfer 1 ADA but your address UTxO has 5000 ADA your entire UTxO will be spent in the transaction creating two outputs:

  • The first output (UTxO) will be related to the receiving address (1 ADA)
  • The second output will be related to your own address (4999 - fees)

Sometimes when doing some transaction (depending on the implementation) multiple outputs will be combined, using your example 4 of the 5 UTxO might have summed 49 ADA then you still need another UTxO containing the other missing ADA but with a total sum of ~6000.

The fees are per transaction and the number of outputs should not affect too much the fees, and I mean too much because the fees are calculated considering the size of the transaction metadata, however, it should not be noticeable in these cases.

1 Like

Exchanges commonly wait until thex have multiple withdrawal requests and then create single transaction to execute them all at once. This way they save on the transaction cost for themselves. Needless to say they charge you full fixed fee.
One of my withdrawals was a transaction with 50 outputs. so the exchange charged 49 users 1Ada each, but the the real network transaction fee was around 2,5Ada.

1 Like