summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--design-documents/013-peer-to-peer-payments.rst50
-rw-r--r--manpages/taler-exchange-offline.1.rst31
2 files changed, 72 insertions, 9 deletions
diff --git a/design-documents/013-peer-to-peer-payments.rst b/design-documents/013-peer-to-peer-payments.rst
index c0308bcf..68c75643 100644
--- a/design-documents/013-peer-to-peer-payments.rst
+++ b/design-documents/013-peer-to-peer-payments.rst
@@ -975,18 +975,41 @@ database.)
COMMENT ON INDEX wad_in_entries_reserve_pub
IS 'needed to compute reserve history';
--
- CREATE TABLE IF NOT EXISTS partners
- (partner_serial_id BIGSERIAL UNIQUE
- ,wad_in_serial_id INT8 REFERENCES wads_in (wad_serial_id) ON DELETE CASCADE
- ,partner_master_pub BYTEA NOT NULL CHECK(LENGTH(reserve_pub)=32)
+ CREATE TABLE IF NOT EXISTS p2pfees
+ (p2pfees_serial_id BIGSERIAL UNIQUE
,start_date INT8 NOT NULL
,end_date INT8 NOT NULL
- ,wad_frequency INT8 NOT NULL
- ,wad_fee_val INT8 NOT NULL
- ,wad_fee_frac INT4 NOT NULL
+ ,kyc_timeout INT8 NOT NULL
+ ,purse_timeout INT8 NOT NULL
+ ,history_retention INT8 NOT NULL
+ ,purse_account_limit INT NOT NULL
+ ,kyc_fee_val INT8 NOT NULL
+ ,kyc_fee_frac INT4 NOT NULL
+ ,history_fee_val INT8 NOT NULL
+ ,history_fee_frac INT4 NOT NULL
+ ,account_fee_val INT8 NOT NULL
+ ,account_fee_frac INT4 NOT NULL
+ ,purse_fee_val INT8 NOT NULL
+ ,purse_fee_frac INT4 NOT NULL
,master_sig BYTEA NOT NULL CHECK (LENGTH(master_sig)=64))
- ,partner_base_url TEXT NOT NULL
);
+ --
+ CREATE TABLE IF NOT EXISTS partner_accounts
+ (payto_uri VARCHAR PRIMARY KEY
+ ,partner_serial_id INT8 REFERENCES partners(partner_serial_id) ON DELETE CASCADE,
+ ,partner_master_sig BYTEA CHECK (LENGTH(partner_master_sig)=64)
+ ,last_seen INT8 NOT NULL
+ );
+ CREATE INDEX IF NOT EXISTS partner_accounts_index_by_partner_and_time
+ ON partner_accounts (partner_serial_id,last_seen);
+ COMMENT ON TABLE partner_accounts
+ IS 'Table with bank accounts of the partner exchange. Entries never expire as we need to remember the signature for the auditor.';
+ COMMENT ON COLUMN wire_accounts.payto_uri
+ IS 'payto URI (RFC 8905) with the bank account of the partner exchange.';
+ COMMENT ON COLUMN wire_accounts.partner_master_sig
+ IS 'Signature of purpose TALER_SIGNATURE_MASTER_WIRE_DETAILS by the partner master public key';
+ COMMENT ON COLUMN wire_accounts.last_seen
+ IS 'Last time we saw this account as being active at the partner exchange. Used to select the most recent entry, and to detect when we should check again.';
-- Complete transaction
COMMIT;
@@ -1093,8 +1116,17 @@ Q / A
* Q: What determines when a wad transfer can happen between two exchanges?
- * Exchanges should explicitly state which other exchanges they are willing
+ * Exchanges explicitly state which other exchanges they are willing
to do wad transfers with (and how often, at what cost). This may involve
abstract policies like sharing an auditor, using the same currency and the
same (banking) protocol, or other constraints (like a specific list of
exchanges).
+
+* Q: What happens if the owner of a reserve never drains it?
+
+ * Reserves are eventually closed. If the reserve is associated
+ with a bank account, the remaining funds are sent to that bank
+ account. If the reserve was created via a merge, and the owner
+ failed to associate a bank account with it (say because the
+ KYC step never happened), then the reserve balance is forfeit
+ to the exchange upon expiration.
diff --git a/manpages/taler-exchange-offline.1.rst b/manpages/taler-exchange-offline.1.rst
index 6d800f5b..027316b6 100644
--- a/manpages/taler-exchange-offline.1.rst
+++ b/manpages/taler-exchange-offline.1.rst
@@ -270,6 +270,37 @@ It outputs the signature affirming the wire fees, in a format suitable for the
``upload`` subcommand.
+enable-partner
+--------------
+
+This subcommand informs an exchange about the wad fee and frequency to apply
+to a partner exchange. The arguments provided must include:
+
+ (1) Partner exchange base URL.
+ (2) Partner exchange master public key.
+ (3) Calendar year for which the fee applies, 'now' for the current year.
+ (4) Wad frequency, in minutes (for example, '30').
+ (5) Wad fee (for example, 'KUDOS:0.1').
+
+
+p2p-fees
+--------
+
+This subcommand configures fees related to wallet-to-wallet payments. If this configuration is not provided, wallet-to-wallet payments will be disabled by the exchange.
+
+The arguments provided must include:
+
+ (1) Calendar year for which the fee applies, 'now' for the current year.
+ (2) KYC timeout. How long does the exchange keep a reserve open that is waiting for the KYC.
+ (3) KYC fee. How much will the exchange charge for performing KYC.
+ (4) Purse timeout. How long does the exchange keep information about a purse around after it expired or was successfully merged?
+ (5) Purse fee. How much will the exchange charge for an abandoned purse. Also the minimum amount that can be in a purse that is not associated with an account.
+ (6) Number of free purses per account.
+ (7) Annual fee charged to an open account.
+ (8) How long will the exchange preserve an account history.
+ (9) History fee charged when inquiring about non-recent account history.
+
+
upload
------