taler-docs

Documentation for GNU Taler components, APIs and protocols
Log | Files | Refs | README | LICENSE

commit a9f11b7a5fb693d6b1b4b44bdf2eb12de0a7f528
parent 360dc88d5148cf2f5ab09f3e454f59d478747ad2
Author: Özgür Kesim <oec-taler@kesim.org>
Date:   Tue, 11 Oct 2022 09:17:15 +0200

define various amount fields for the policy_details

Diffstat:
Mdesign-documents/028-deposit-policies.rst | 17++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/design-documents/028-deposit-policies.rst b/design-documents/028-deposit-policies.rst @@ -87,7 +87,7 @@ TODO: Description label=<<B>policy_details</B>> margin=20 policy_details [ - label="<id>id\l|<hash>hash_code (unique)\l|deadline\l|total_amount\l|policy_fee\l|refresh_amount\l|state\l" + label="<id>id\l|<hash>hash_code (unique)\l|deadline\l|commitment (amount)\l|accumulated_total (amount)\l|fee (amount)\l|transferable (amount)\l|fulfilment_state\l" ] } @@ -124,9 +124,10 @@ Ready fulfilment to arrive before the deadline. Insufficient - The policy lacks funding, but has otherwise been accepted. Funding can - be continued by calling ``/deposit`` with more coins and the same - policy details. + The policy lacks funding, that is ``accumulated_total`` < + ``commitment``, but has otherwise been accepted. Funding can be + continued by calling ``/deposit`` with more coins and the same policy + details. Success The policy is provably fulfilled. The amounts for payout, fees and @@ -149,9 +150,11 @@ Invariants The following invariants need to be fulfilled and be checked by the auditor: -- The total sum of amounts of all deposits that refer the same policy detail - MUST NOT be less than the amount in the ``total_amount`` field in the - ``policy_details`` table. +- The fulfilment state of a policy is **Insufficient** IF AND ONLY IF the + amount in ``commitment`` is larger than the amount in ``accumulated_total``. + +- The sum of amounts in ``fee`` and ``transferable`` must be less or equal to + the amount in ``accumulated_total``. - If the fulfilment state of a policy is **Success**, there MUST exists an entry in the ``policy_details_fulfilment`` table for the corresponding