View Issue Details

IDProjectCategoryView StatusLast Update
0012282Talerauditorpublic2026-11-21 22:46
Reporterbot-oec [agent]  
Implementeroec  
PrioritynormalSeveritymajor 
Status implementing 
Target Version1.7 
Summary0012282: The auditor's coin check credits one deposit fee for any refund, so over-credited coins pass it
DescriptionA refund credits the coin its value less the refund fee; the deposit fee is waived at the wire transfer, not returned to the coin. `taler-helper-auditor-coins.c` credits one deposit fee as soon as a coin has any refund ("If we gave any refund, also discount ONE deposit fee"): after a full refund, as the exchange currently does, but also after a partial refund, where the exchange credits no deposit fee. (Purse refunds no longer set it since 7f43c9292.)

The per-coin check (per coin, debits never exceed its value plus its credits) therefore accepts a coin credited up to one deposit fee too much. The exchange currently credits the deposit fee on top after a full refund, and such a coin passes the per-coin check. Other checks still catch it once the coin spends the extra credit: the denomination's escrow balance runs short ("subtracting amount from escrow balance") and an emergency reports the loss. Once the exchange no longer credits the deposit fee on a full refund, the second deposit below is refused and the scenario no longer arises.

**Steps to reproduce:** found by reading the code. On an exchange that credits the deposit fee on top after a full refund, a coin of EUR:5 deposited in full, refunded in full and deposited in full again is caught by the escrow balance check (exchange EUR:4.99, auditor EUR:5) and by an emergency (loss EUR:5), but the per-coin check reports nothing for it; it would report the coin (a "deposit" record) without the extra deposit-fee credit. A test that requires the per-coin record may follow.

**Proposed fix:** credit a refund with its value less the refund fee only (`taler-helper-auditor-coins.c`). With it the test above and the auditor's other tests pass.

**Found by:** the formalization of the Taler protocols; the rule violated is (A1) "coin" in `spec/auditor.md` together with RD4 in `spec/refund.md`: per coin, debits never exceed its value plus credits, and a refund credits the coin its value less the refund fee.
TagsNo tags attached.

Required notifications

Address or linkRemarkAdded byNotifiedActions

Activities

There are no notes attached to this issue.

Issue History

Date ModifiedUsernameFieldChange
2026-11-21 10:28bot-oecNew Issue
2026-11-21 10:28bot-oecImplementer => oec
2026-11-21 10:28bot-oecReviewer => Christian Grothoff
2026-11-21 10:28bot-oecRelease signed by => Antoine A
2026-11-21 10:28bot-oecDeployed by => Florian Dold
2026-11-21 10:28bot-oecVerifier => oec
2026-11-21 10:28bot-oecCommunicator => CM_7
2026-11-21 16:17oecImplementeroec =>
2026-11-21 16:17oecRelease signed byAntoine A => Florian Dold
2026-11-21 16:17oecVerifieroec => Florian Dold
2026-11-21 22:46Christian GrothoffImplementer => oec
2026-11-21 22:46Christian GrothoffStatusnew => implementing
2026-11-21 22:46Christian GrothoffTarget Version => 1.7
2026-11-21 22:46Christian GrothoffView Statusprivate => public