View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0012277 | Taler | exchange | public | 2026-11-21 10:28 | 2026-11-22 09:37 |
| Reporter | bot-oec [agent] | ||||
| Implementer | oec | ||||
| Priority | high | Severity | major | ||
| Status | implementing | ||||
| Target Version | 1.8 | ||||
| Summary | 0012277: The transfer statement states the unrounded total, not the rounded amount wired; the merchant never matches such a transfer | ||||
| Description | `get-transfers-WTID.rst` documents `total` as the "Actual amount of the wire transfer, excluding the wire fee". The aggregator (`taler-exchange-aggregator.c`) wires `round_down(total − wire fee, CURRENCY_ROUND_UNIT)`. `GET /transfers/{wtid}` (`taler-exchange-httpd_get-transfers-WTID.c`) recomputes the total from the deposits and subtracts the wire fee, without rounding, and signs that. The client library checks the statement against this unrounded sum. The merchant backend matches a bank credit with the statement's total by equality (`pg_triggers.sql`, `merchant_transfers_insert_trigger`), so a rounded transfer is never confirmed, although the exchange paid what it should. **Steps to reproduce:** deposit and wire fee EUR:0.01: 1. Deposit EUR:1.005, wired at once. 2. The bank receives EUR:0.98. 3. `GET /transfers/{wtid}`: expected a total of EUR:0.98, gets EUR:0.985. The test `src/testing/test_exchange_api_wire_rounding.c` does this; it fails on master at step 3 (expects EUR:0.98, gets EUR:0.985). The test will be on branch `dev/oec/formalization-findings` on git.taler.net; a note here will name the commit. **Proposed fix:** sign the rounded amount as `total`, and let the client library accept a total up to one rounding unit below the sum. This needs the rounding unit in `/keys`, which does not publish it today. **Found by:** the formalization of the Taler protocols; the rule violated is (E2) in `spec/deposit.md`: the statement's `total` is the amount wired, the aggregate less the wire fee rounded down to the rounding unit. | ||||
| Tags | No tags attached. | ||||
| Test: branch `dev/oec/formalization-findings` of exchange.git (git.taler.net), commit b93d7f3183db "testing: rounded wire transfers and their statement (0012277)", on master 7b658d8da. test_exchange_api_wire_rounding_{cs,rsa}, deposit and wire fee EUR:0.01: a deposit of EUR:1.005 is wired at once, the bank receives EUR:0.98; the transfer statement (GET /transfers/{wtid}) must state that total, it states EUR:0.985. Fails on master at track-transfer. | |
| Wallet test: branch `dev/oec/formalization-findings` of taler-typescript-core (git.taler.net), commit eb3190e5828a "harness: a merchant matches a rounded wire transfer (0012277)", on wallet-core master 908b0b1b5 with exchange master 7b658d8da; run it with `taler-harness run-integrationtests merchant-wire-rounding`. test-merchant-wire-rounding, with currency_round_unit TESTKUDOS:0.1: a payment of TESTKUDOS:5 leaves TESTKUDOS:4.98 after the deposit and wire fees, and the exchange wires TESTKUDOS:4.9. After the merchant is told of that credit, it must expect TESTKUDOS:4.9 and confirm the transfer. With exchange master 7b658d8da the exchange wires TESTKUDOS:4.9 (its wire_out table), but its transfer statement states TESTKUDOS:4.98: the merchant expects 4.98 and does not confirm the transfer. | |
| https://git-www.taler.net/exchange.git/log/?h=dev/oec/formalization-findings https://git-www.taler.net/taler-typescript-core.git/log/?h=dev/oec/formalization-findings | |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2026-11-21 10:28 | bot-oec | New Issue | |
| 2026-11-21 10:28 | bot-oec | Implementer | => oec |
| 2026-11-21 10:28 | bot-oec | Reviewer | => Christian Grothoff |
| 2026-11-21 10:28 | bot-oec | Release signed by | => Christian Grothoff |
| 2026-11-21 10:28 | bot-oec | Deployed by | => Christian Grothoff |
| 2026-11-21 10:28 | bot-oec | Verifier | => oec |
| 2026-11-21 10:28 | bot-oec | Communicator | => CM_7 |
| 2026-11-21 10:47 | bot-oec | Note Added: 0030677 | |
| 2026-11-21 11:41 | bot-oec | Note Added: 0030688 | |
| 2026-11-21 16:16 | oec | Implementer | oec => |
| 2026-11-21 22:39 | Christian Grothoff | Implementer | => oec |
| 2026-11-21 22:39 | Christian Grothoff | Priority | normal => high |
| 2026-11-21 22:39 | Christian Grothoff | Severity | minor => major |
| 2026-11-21 22:39 | Christian Grothoff | Status | new => implementing |
| 2026-11-21 22:39 | Christian Grothoff | Target Version | => 1.8 |
| 2026-11-21 22:40 | Christian Grothoff | View Status | private => public |
| 2026-11-22 09:37 | bot-oec | Note Added: 0030772 |