1

In Week06, there was an implementation of adjusting an unbalanced transaction in the plutus script. Can someone explain what an unbalanced transaction really is? And how does it actually work when we say adjusting an unbalanced transaction? How do we basically identify that a transaction is unbalanced?

Thank you!

1 Answer 1

3

A transaction consumes a set of funds (so called UTxOs) and produces a set. Additionally, it can burn or mint native tokens. An unbalanced transaction is a transaction where the sum of fees and funds produced are not equal to the sum of input funds, minted tokens, and burned tokens.

The balancing takes care of this and adds necessary funds in the inputs and outputs to get to the equality.

2
  • Thanks! Oh so this is basically what Lars initially mentioned that the sums of the amounts that are used as inputs, should equal the amounts of the output? Adjustment then is basically the distribution of funds in order for those numbers to add up? Commented Mar 7, 2022 at 9:50
  • Balancing consists of two parts: i) adding additional inputs ii) distributing excess funds to outputs. Often both parts are needed but in some cases i) or ii) can also be needed alone.
    – Jey
    Commented Mar 7, 2022 at 11:05

Your Answer

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

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