Skip to content

Commit

Permalink
Document properties guaranteed by distributeSurplus in `Transaction…
Browse files Browse the repository at this point in the history
…Layer`.
  • Loading branch information
jonathanknowles committed Apr 21, 2022
1 parent 5becf1c commit f5fbc6a
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions lib/core/src/Cardano/Wallet/Transaction.hs
Original file line number Diff line number Diff line change
Expand Up @@ -274,11 +274,21 @@ data TransactionLayer k tx = TransactionLayer
-- When comparing the original fee and change outputs to the adjusted
-- fee and change outputs, this function guarantees that:
--
-- - The number of the change outputs remains constant;
-- - The fee quantity either remains the same or increases.
-- - For each change output:
-- - the ada quantity either remains constant or increases.
-- - non-ada quantities remain the same.
-- - The number of the change outputs remains constant;
--
-- - The fee quantity either remains the same or increases.
--
-- - For each change output:
-- - the ada quantity either remains constant or increases.
-- - non-ada quantities remain the same.
--
-- - The surplus is conserved:
-- The total increase in the fee and change ada quantities is
-- exactly equal to the surplus.
--
-- - Any increase in cost is covered:
-- If the total cost has increased by 𝛿c, then the fee value
-- will have increased by at least 𝛿c.

, computeSelectionLimit
:: ProtocolParameters
Expand Down

0 comments on commit f5fbc6a

Please sign in to comment.