gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [taler-exchange] branch stable updated (21df5cb -> 7ba2ee0)


From: gnunet
Subject: [GNUnet-SVN] [taler-exchange] branch stable updated (21df5cb -> 7ba2ee0)
Date: Fri, 10 Mar 2017 16:17:16 +0100

This is an automated email from the git hooks/post-receive script.

dold pushed a change to branch stable
in repository exchange.

    from 21df5cb  Error codes for /map/out
     add 9114ff8  typo
     add a580ac1  disable MHD deprecation warnings as we want to be compatible 
to older releases that simply have not the new symbols (fixing #4845)
     add 0589d26  comment
     add c631ae1  elaborate on ContractPS
     add 0bfb5b2  Add option to initialized db, fixes 4858
     add d2302da  remove redundant fields from ContractPS (#4859)
     add a60c5e9  Renaming's first steps.
     add 74fdd92  typo
     add 3ead839  h_contract->h_proposal_data
     add 26d5e08  h_proposal_data -> hash
     add 8c820b6  contract terminology renaming (#4877)
     add 92246c3  remove transaction_id, only one payment per proposal allowed
     add 61a19b4  fix SQL statement after removing transaction_id
     add f8d11fc  typo
     add c319f14  fix SQL
     add 5b1d513  fix SQL
     add 49539d8  fix test cases (transaction_id related problems)
     add 4c47cbc  add code to silence false positive warning in gcc6.3
     add aca6003  skip test if binaries are not in PATH
     add e9cdf64  ensure testcase terminates if wget is not installed or 
launching httpd failed
     add 3592083  do not print warnings for perfectly expected status codes
     add 8178d04  fix conditional in test case (exposes underlying failure)
     add 387a37f  fix #4886
     add 6e46853  do not do path expansion on public key in Crockford encoding
     add 5b3f346  fix return value check
     add 1c08e3d  error code for instance unknown
     add 4d8942b  fix expire header parsing if day-of-month is 7th due to field 
confusing (wday vs mday)
     add 397c718  implementing #4921: add base URL to wire transfers
     add d06dac6  implement #4851 (refuse to run without wire plugin)
     add 4d2faa5  changing wire plugin specification from [exchange]WIREFORMAT 
to [exchange-wire-PLUGIN]enable=YES/NO
     add 243d8d1  update configuration generators to use new ENABLE option 
instead of WIREFORMATS, and to support wire fee generation
     add 364abba  use new ENABLE method to load wire plugins
     add f406f96  implement #4929: add wire transfer fee to /wire (but not yet 
charged by aggregator)
     add 6ab67a3  implementing #4929
     add e3dcc27  implementing/fixing #4933: check total_amount matches 
aggregated transactions
     add 1c84b3d  implementing #4932
     add 0e15a99  implement #4937: allow extraction of fees
     add 43cfb0e  write test for new wire fee APIs (#4931)
     add 6545739  fix use of uninit value
     add 3abca6d  fix memory leaks in DB logic
     add 326f3b2  add EC codes for merchant
     add 0214e42  add amount division API and test case
     add 92345d0  cover get more of /wire API in test case
     add 7ba2ee0  test more of /wire, fix off-by-one

No new revisions were added by this update.

Summary of changes:
 .gitignore                                         |   2 +
 .../exchange-template/config/exchange-common.conf  |  19 +-
 doc/paper/postquantum.tex                          |   2 +-
 doc/taler-config-generate.1                        |   5 +-
 doc/taler-exchange-httpd.1                         |   3 +
 doc/taler.conf.5                                   |   8 +-
 src/auditor/taler-auditor-sign.c                   |   2 +-
 src/bank-lib/bank_api_admin.c                      |  12 +-
 src/bank-lib/fakebank.c                            |  34 +-
 src/bank-lib/test_bank_api_with_fakebank.c         |   4 +-
 src/bank-lib/test_bank_interpreter.c               |  12 +-
 src/bank-lib/test_bank_interpreter.h               |   7 +-
 src/benchmark/taler-exchange-benchmark.c           |  17 +-
 src/benchmark/taler-exchange-benchmark.conf        |   9 +-
 src/exchange-lib/afl-generate.sh                   |   2 +-
 src/exchange-lib/baseline/deposit.req              |   2 +-
 src/exchange-lib/exchange_api_common.c             |   2 +-
 src/exchange-lib/exchange_api_deposit.c            |  32 +-
 src/exchange-lib/exchange_api_handle.c             |   2 +-
 src/exchange-lib/exchange_api_refund.c             |  19 +-
 src/exchange-lib/exchange_api_track_transaction.c  |  20 +-
 src/exchange-lib/exchange_api_track_transfer.c     |  51 ++-
 src/exchange-lib/exchange_api_wire.c               | 169 +++++++-
 src/exchange-lib/test_exchange_api.c               | 303 ++++++++++-----
 src/exchange-lib/test_exchange_api.conf            |  45 ++-
 src/exchange-tools/Makefile.am                     |   1 +
 src/exchange-tools/taler-exchange-keyup.c          | 203 +++++++++-
 src/exchange/afl-tests/id:000001,orig:deposit.req  |   8 -
 .../id:000703,src:000001,op:flip1,pos:34,+cov      |   8 -
 .../id:000704,src:000001,op:flip1,pos:50,+cov      |   9 -
 .../id:000705,src:000001,op:flip1,pos:61,+cov      |   8 -
 .../afl-tests/id:000706,src:000001,op:flip1,pos:91 |   8 -
 .../id:000707,src:000001,op:flip1,pos:103,+cov     |   8 -
 .../id:000708,src:000001,op:flip1,pos:120,+cov     |   8 -
 .../id:000709,src:000001,op:flip1,pos:129,+cov     |   8 -
 .../id:000710,src:000001,op:flip1,pos:129,+cov     |   8 -
 .../id:000711,src:000001,op:flip1,pos:131,+cov     |   8 -
 .../id:000712,src:000001,op:flip1,pos:139,+cov     |   8 -
 .../id:000713,src:000001,op:flip1,pos:197,+cov     |   8 -
 .../id:000714,src:000001,op:flip1,pos:243,+cov     |   8 -
 .../id:000715,src:000001,op:flip1,pos:365,+cov     |   8 -
 .../afl-tests/id:000716,src:000001,op:flip1,pos:2  |   8 -
 .../id:000716,src:000001,op:flip1,pos:456,+cov     |   8 -
 .../id:000717,src:000001,op:flip1,pos:50,+cov      |   9 -
 .../id:000717,src:000001,op:flip1,pos:596          |   8 -
 .../id:000718,src:000001,op:flip1,pos:55,+cov      |   8 -
 .../id:000718,src:000001,op:flip1,pos:614,+cov     |   8 -
 .../id:000719,src:000001,op:flip1,pos:629,+cov     |   8 -
 .../afl-tests/id:000719,src:000001,op:flip1,pos:95 |   8 -
 .../id:000720,src:000001,op:flip1,pos:102,+cov     |   8 -
 .../id:000720,src:000001,op:flip1,pos:635,+cov     |   8 -
 .../id:000721,src:000001,op:flip1,pos:107,+cov     |   8 -
 .../id:000721,src:000001,op:flip1,pos:683,+cov     |   8 -
 .../id:000722,src:000001,op:flip1,pos:118,+cov     |   8 -
 .../id:000722,src:000001,op:flip1,pos:730,+cov     |   8 -
 .../id:000723,src:000001,op:flip1,pos:124,+cov     |   8 -
 .../id:000723,src:000001,op:flip1,pos:786,+cov     |   8 -
 .../id:000724,src:000001,op:flip1,pos:133,+cov     |   8 -
 .../id:000724,src:000001,op:flip1,pos:796          |   8 -
 .../id:000725,src:000001,op:flip1,pos:133,+cov     |   8 -
 .../id:000725,src:000001,op:flip1,pos:915,+cov     |   8 -
 .../id:000726,src:000001,op:flip1,pos:1112,+cov    |   8 -
 .../id:000726,src:000001,op:flip1,pos:135,+cov     |   8 -
 .../id:000727,src:000001,op:flip1,pos:1112,+cov    |   8 -
 .../id:000727,src:000001,op:flip1,pos:457,+cov     |   8 -
 .../id:000728,src:000001,op:flip1,pos:1114,+cov    |   8 -
 .../id:000728,src:000001,op:flip1,pos:469,+cov     |   8 -
 .../id:000729,src:000001,op:flip1,pos:1215,+cov    |   8 -
 .../id:000729,src:000001,op:flip1,pos:508,+cov     |   8 -
 .../id:000730,src:000001,op:flip1,pos:1353,+cov    |   8 -
 .../id:000730,src:000001,op:flip1,pos:600          |   8 -
 .../id:000731,src:000001,op:flip1,pos:1453,+cov    |   8 -
 .../id:000731,src:000001,op:flip1,pos:618,+cov     |   8 -
 .../id:000732,src:000001,op:flip1,pos:1574,+cov    |   8 -
 .../id:000732,src:000001,op:flip1,pos:633,+cov     |   8 -
 .../id:000733,src:000001,op:flip1,pos:1630         |   8 -
 .../id:000733,src:000001,op:flip1,pos:687,+cov     |   8 -
 .../id:000734,src:000001,op:flip1,pos:722,+cov     |   8 -
 .../id:000734,src:000001,op:flip2,pos:453,+cov     |   8 -
 .../id:000735,src:000001,op:flip1,pos:734,+cov     |   8 -
 .../id:000735,src:000001,op:flip2,pos:484,+cov     |   8 -
 .../id:000736,src:000001,op:flip1,pos:800          |   8 -
 .../id:000736,src:000001,op:flip2,pos:696,+cov     |   8 -
 .../id:000737,src:000001,op:flip1,pos:888,+cov     |   8 -
 .../id:000737,src:000001,op:flip2,pos:843,+cov     |   8 -
 .../id:000738,src:000001,op:flip1,pos:893,+cov     |   8 -
 .../id:000738,src:000001,op:flip2,pos:845,+cov     |   8 -
 .../id:000739,src:000001,op:flip1,pos:1116,+cov    |   8 -
 .../id:000739,src:000001,op:flip2,pos:917,+cov     |   8 -
 .../id:000740,src:000001,op:flip1,pos:1116,+cov    |   8 -
 .../id:000740,src:000001,op:flip2,pos:995,+cov     |   8 -
 .../id:000741,src:000001,op:flip1,pos:1118,+cov    |   8 -
 .../id:000741,src:000001,op:flip2,pos:1031,+cov    |   8 -
 .../id:000742,src:000001,op:flip1,pos:1170,+cov    |   8 -
 .../id:000742,src:000001,op:flip2,pos:1135,+cov    |   8 -
 .../id:000743,src:000001,op:flip1,pos:1205,+cov    |   8 -
 .../id:000743,src:000001,op:flip2,pos:1286,+cov    |   8 -
 .../id:000744,src:000001,op:flip1,pos:1301,+cov    |   8 -
 .../id:000744,src:000001,op:flip2,pos:1655,+cov    |   8 -
 .../id:000745,src:000001,op:flip1,pos:1369,+cov    |   8 -
 .../id:000745,src:000001,op:flip4,pos:50,+cov      |   7 -
 .../id:000746,src:000001,op:flip1,pos:1378,+cov    |   8 -
 .../id:000746,src:000001,op:flip4,pos:122,+cov     |   8 -
 .../id:000747,src:000001,op:flip1,pos:1474,+cov    |   8 -
 .../id:000747,src:000001,op:flip4,pos:351,+cov     |   8 -
 .../id:000748,src:000001,op:flip1,pos:1510,+cov    |   8 -
 .../id:000748,src:000001,op:flip4,pos:569,+cov     |   8 -
 .../id:000749,src:000001,op:flip1,pos:1634         |   8 -
 .../id:000749,src:000001,op:flip4,pos:788,+cov     |   8 -
 .../id:000750,src:000001,op:flip1,pos:1657,+cov    |   8 -
 .../id:000750,src:000001,op:flip4,pos:1198,+cov    |   8 -
 .../id:000751,src:000001,op:flip1,pos:1712,+cov    |   8 -
 .../id:000751,src:000001,op:flip8,pos:67,+cov      |   8 -
 .../id:000752,src:000001,op:flip2,pos:21,+cov      |   8 -
 .../id:000752,src:000001,op:flip8,pos:1661,+cov    |   8 -
 .../id:000753,src:000001,op:flip16,pos:390,+cov    |   8 -
 .../id:000753,src:000001,op:flip2,pos:39,+cov      |   8 -
 .../id:000754,src:000001,op:flip2,pos:105,+cov     |   8 -
 .../id:000754,src:000001,op:flip32,pos:339,+cov    |   8 -
 .../id:000755,src:000001,op:flip2,pos:890,+cov     |   8 -
 .../id:000755,src:000001,op:flip32,pos:975,+cov    |   8 -
 ...000756,src:000001,op:arith8,pos:10,val:-30,+cov |   8 -
 .../id:000756,src:000001,op:flip2,pos:975,+cov     |   8 -
 ...:000757,src:000001,op:arith8,pos:46,val:+9,+cov |   8 -
 .../id:000757,src:000001,op:flip2,pos:1509,+cov    |   8 -
 ...:000758,src:000001,op:arith8,pos:72,val:+5,+cov |   8 -
 .../id:000758,src:000001,op:flip2,pos:1662,+cov    |   8 -
 .../id:000759,src:000001,op:flip4,pos:32,+cov      |   8 -
 .../id:000760,src:000001,op:flip4,pos:300,+cov     |   8 -
 .../id:000761,src:000001,op:flip4,pos:457,+cov     |   8 -
 .../id:000762,src:000001,op:flip4,pos:1507,+cov    |   8 -
 .../id:000763,src:000001,op:flip4,pos:1549,+cov    |   8 -
 .../id:000764,src:000001,op:flip4,pos:1577,+cov    |   8 -
 .../id:000765,src:000001,op:flip8,pos:899,+cov     |   8 -
 .../id:000766,src:000001,op:flip8,pos:1457,+cov    |   8 -
 .../id:000767,src:000001,op:flip32,pos:301,+cov    |   8 -
 ...000768,src:000001,op:arith8,pos:18,val:+11,+cov |   8 -
 ...000769,src:000001,op:arith8,pos:33,val:+17,+cov |   8 -
 src/exchange/exchange.conf                         |  15 +-
 src/exchange/taler-config-generate                 |  72 ++--
 src/exchange/taler-exchange-aggregator.c           | 189 +++++++--
 src/exchange/taler-exchange-httpd.c                |  23 +-
 src/exchange/taler-exchange-httpd_db.c             |  99 +++--
 src/exchange/taler-exchange-httpd_db.h             |   8 +-
 src/exchange/taler-exchange-httpd_deposit.c        |   6 +-
 src/exchange/taler-exchange-httpd_refund.c         |   6 +-
 src/exchange/taler-exchange-httpd_responses.c      |  42 +-
 src/exchange/taler-exchange-httpd_responses.h      |  23 +-
 src/exchange/taler-exchange-httpd_tracking.c       |  17 +-
 src/exchange/taler-exchange-httpd_validation.c     | 127 +++---
 src/exchange/taler-exchange-httpd_wire.c           |  73 +++-
 src/exchange/taler-exchange-httpd_wire.h           |  10 +
 .../test-taler-exchange-aggregator-postgres.conf   |  46 ++-
 src/exchange/test_taler_exchange_aggregator.c      | 120 +++---
 src/exchange/test_taler_exchange_httpd.conf        |  13 +-
 src/exchange/test_taler_exchange_httpd.data        |   2 +-
 src/exchange/test_taler_exchange_httpd.sh          |   2 +-
 src/exchangedb/Makefile.am                         |  14 +-
 src/exchangedb/exchangedb.conf                     |   7 +
 src/exchangedb/exchangedb_denomkeys.c              |   9 +-
 src/exchangedb/exchangedb_fees.c                   | 251 ++++++++++++
 src/exchangedb/perf_taler_exchangedb_init.c        |  12 +-
 src/exchangedb/plugin_exchangedb_postgres.c        | 430 +++++++++++++++------
 src/exchangedb/test_exchangedb.c                   | 207 +++++++---
 src/exchangedb/test_exchangedb_fees.c              | 147 +++++++
 src/include/platform.h                             |   5 +
 src/include/taler_amount_lib.h                     |  14 +
 src/include/taler_bank_service.h                   |   6 +-
 src/include/taler_crypto_lib.h                     |   9 +-
 src/include/taler_error_codes.h                    |  63 ++-
 src/include/taler_exchange_service.h               |  83 +++-
 src/include/taler_exchangedb_lib.h                 |  82 +++-
 src/include/taler_exchangedb_plugin.h              | 110 ++++--
 src/include/taler_fakebank_lib.h                   |  11 +-
 src/include/taler_signatures.h                     | 173 ++++-----
 src/include/taler_wire_lib.h                       |  24 ++
 src/include/taler_wire_plugin.h                    |   2 +
 src/util/amount.c                                  |  28 ++
 src/util/test_amount.c                             |  37 ++
 src/wire/plugin_wire_sepa.c                        |   6 +-
 src/wire/plugin_wire_template.c                    |   2 +
 src/wire/plugin_wire_test.c                        |  40 +-
 src/wire/test_wire_plugin.c                        |  29 +-
 src/wire/wire-sepa.conf                            |   6 +
 src/wire/wire-test.conf                            |   6 +
 src/wire/wire.c                                    |  78 +++-
 186 files changed, 2870 insertions(+), 1790 deletions(-)
 delete mode 100644 src/exchange/afl-tests/id:000001,orig:deposit.req
 delete mode 100644 
src/exchange/afl-tests/id:000703,src:000001,op:flip1,pos:34,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000704,src:000001,op:flip1,pos:50,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000705,src:000001,op:flip1,pos:61,+cov
 delete mode 100644 src/exchange/afl-tests/id:000706,src:000001,op:flip1,pos:91
 delete mode 100644 
src/exchange/afl-tests/id:000707,src:000001,op:flip1,pos:103,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000708,src:000001,op:flip1,pos:120,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000709,src:000001,op:flip1,pos:129,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000710,src:000001,op:flip1,pos:129,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000711,src:000001,op:flip1,pos:131,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000712,src:000001,op:flip1,pos:139,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000713,src:000001,op:flip1,pos:197,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000714,src:000001,op:flip1,pos:243,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000715,src:000001,op:flip1,pos:365,+cov
 delete mode 100644 src/exchange/afl-tests/id:000716,src:000001,op:flip1,pos:2
 delete mode 100644 
src/exchange/afl-tests/id:000716,src:000001,op:flip1,pos:456,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000717,src:000001,op:flip1,pos:50,+cov
 delete mode 100644 src/exchange/afl-tests/id:000717,src:000001,op:flip1,pos:596
 delete mode 100644 
src/exchange/afl-tests/id:000718,src:000001,op:flip1,pos:55,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000718,src:000001,op:flip1,pos:614,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000719,src:000001,op:flip1,pos:629,+cov
 delete mode 100644 src/exchange/afl-tests/id:000719,src:000001,op:flip1,pos:95
 delete mode 100644 
src/exchange/afl-tests/id:000720,src:000001,op:flip1,pos:102,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000720,src:000001,op:flip1,pos:635,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000721,src:000001,op:flip1,pos:107,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000721,src:000001,op:flip1,pos:683,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000722,src:000001,op:flip1,pos:118,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000722,src:000001,op:flip1,pos:730,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000723,src:000001,op:flip1,pos:124,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000723,src:000001,op:flip1,pos:786,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000724,src:000001,op:flip1,pos:133,+cov
 delete mode 100644 src/exchange/afl-tests/id:000724,src:000001,op:flip1,pos:796
 delete mode 100644 
src/exchange/afl-tests/id:000725,src:000001,op:flip1,pos:133,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000725,src:000001,op:flip1,pos:915,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000726,src:000001,op:flip1,pos:1112,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000726,src:000001,op:flip1,pos:135,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000727,src:000001,op:flip1,pos:1112,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000727,src:000001,op:flip1,pos:457,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000728,src:000001,op:flip1,pos:1114,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000728,src:000001,op:flip1,pos:469,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000729,src:000001,op:flip1,pos:1215,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000729,src:000001,op:flip1,pos:508,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000730,src:000001,op:flip1,pos:1353,+cov
 delete mode 100644 src/exchange/afl-tests/id:000730,src:000001,op:flip1,pos:600
 delete mode 100644 
src/exchange/afl-tests/id:000731,src:000001,op:flip1,pos:1453,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000731,src:000001,op:flip1,pos:618,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000732,src:000001,op:flip1,pos:1574,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000732,src:000001,op:flip1,pos:633,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000733,src:000001,op:flip1,pos:1630
 delete mode 100644 
src/exchange/afl-tests/id:000733,src:000001,op:flip1,pos:687,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000734,src:000001,op:flip1,pos:722,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000734,src:000001,op:flip2,pos:453,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000735,src:000001,op:flip1,pos:734,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000735,src:000001,op:flip2,pos:484,+cov
 delete mode 100644 src/exchange/afl-tests/id:000736,src:000001,op:flip1,pos:800
 delete mode 100644 
src/exchange/afl-tests/id:000736,src:000001,op:flip2,pos:696,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000737,src:000001,op:flip1,pos:888,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000737,src:000001,op:flip2,pos:843,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000738,src:000001,op:flip1,pos:893,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000738,src:000001,op:flip2,pos:845,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000739,src:000001,op:flip1,pos:1116,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000739,src:000001,op:flip2,pos:917,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000740,src:000001,op:flip1,pos:1116,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000740,src:000001,op:flip2,pos:995,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000741,src:000001,op:flip1,pos:1118,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000741,src:000001,op:flip2,pos:1031,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000742,src:000001,op:flip1,pos:1170,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000742,src:000001,op:flip2,pos:1135,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000743,src:000001,op:flip1,pos:1205,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000743,src:000001,op:flip2,pos:1286,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000744,src:000001,op:flip1,pos:1301,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000744,src:000001,op:flip2,pos:1655,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000745,src:000001,op:flip1,pos:1369,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000745,src:000001,op:flip4,pos:50,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000746,src:000001,op:flip1,pos:1378,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000746,src:000001,op:flip4,pos:122,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000747,src:000001,op:flip1,pos:1474,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000747,src:000001,op:flip4,pos:351,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000748,src:000001,op:flip1,pos:1510,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000748,src:000001,op:flip4,pos:569,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000749,src:000001,op:flip1,pos:1634
 delete mode 100644 
src/exchange/afl-tests/id:000749,src:000001,op:flip4,pos:788,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000750,src:000001,op:flip1,pos:1657,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000750,src:000001,op:flip4,pos:1198,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000751,src:000001,op:flip1,pos:1712,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000751,src:000001,op:flip8,pos:67,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000752,src:000001,op:flip2,pos:21,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000752,src:000001,op:flip8,pos:1661,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000753,src:000001,op:flip16,pos:390,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000753,src:000001,op:flip2,pos:39,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000754,src:000001,op:flip2,pos:105,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000754,src:000001,op:flip32,pos:339,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000755,src:000001,op:flip2,pos:890,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000755,src:000001,op:flip32,pos:975,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000756,src:000001,op:arith8,pos:10,val:-30,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000756,src:000001,op:flip2,pos:975,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000757,src:000001,op:arith8,pos:46,val:+9,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000757,src:000001,op:flip2,pos:1509,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000758,src:000001,op:arith8,pos:72,val:+5,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000758,src:000001,op:flip2,pos:1662,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000759,src:000001,op:flip4,pos:32,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000760,src:000001,op:flip4,pos:300,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000761,src:000001,op:flip4,pos:457,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000762,src:000001,op:flip4,pos:1507,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000763,src:000001,op:flip4,pos:1549,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000764,src:000001,op:flip4,pos:1577,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000765,src:000001,op:flip8,pos:899,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000766,src:000001,op:flip8,pos:1457,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000767,src:000001,op:flip32,pos:301,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000768,src:000001,op:arith8,pos:18,val:+11,+cov
 delete mode 100644 
src/exchange/afl-tests/id:000769,src:000001,op:arith8,pos:33,val:+17,+cov
 create mode 100644 src/exchangedb/exchangedb_fees.c
 create mode 100644 src/exchangedb/test_exchangedb_fees.c

diff --git a/.gitignore b/.gitignore
index 6a6c27d..0896a4c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -35,9 +35,11 @@ src/bank-lib/test_bank_api
 src/bank-lib/test_bank_api_with_fakebank
 src/exchange-lib/test_exchange_api
 src/exchange-lib/test_exchange_api_home/.local/share/taler/exchange/live-keys/
+src/exchange-lib/test_exchange_api_home/.local/share/taler/exchange/wirefees/
 src/exchange/taler-exchange-aggregator
 src/exchange/test_taler_exchange_aggregator-postgres
 
src/exchange/test_taler_exchange_httpd_home/.local/share/taler/exchange/live-keys/
+src/exchange/test_taler_exchange_httpd_home/.local/share/taler/exchange/wirefees/
 src/exchange-tools/taler-auditor-sign
 src/exchange-tools/taler-exchange-dbinit
 src/exchange-tools/taler-exchange-keycheck
diff --git a/contrib/exchange-template/config/exchange-common.conf 
b/contrib/exchange-template/config/exchange-common.conf
index eddde3c..d513b35 100644
--- a/contrib/exchange-template/config/exchange-common.conf
+++ b/contrib/exchange-template/config/exchange-common.conf
@@ -2,10 +2,6 @@
 # Currency supported by the exchange (can only be one)
 CURRENCY = EUR
 
-# Wire format supported by the exchange, case-insensitive.
-# Examples for formats include 'test' for testing and 'sepa' (for EU IBAN).
-WIREFORMAT = SEPA
-
 # HTTP port the exchange listens to
 PORT = 4241
 
@@ -21,21 +17,28 @@ TESTRUN = YES
 [exchangedb-postgres]
 DB_CONN_STR = "postgres:///talercheck"
 
-[wire-incoming-sepa]
+
+[exchange-wire-sepa]
+# Change here to enable SEPA wire transfers.
+ENABLE = NO
+
+[exchange-wire-incoming-sepa]
 SEPA_RESPONSE_FILE = "sepa.json"
 
-[wire-outgoing-sepa]
+[exchange-wire-outgoing-sepa]
 SEPA_RESPONSE_FILE = "sepa.json"
 
+[exchange-wire-sepa]
+ENABLE = YES
 
-[wire-incoming-test]
+[exchange-wire-incoming-test]
 # What is the main website of the bank?
 BANK_URI = "https://bank/";
 # Into which account at the 'bank' should incoming
 # wire transfers be made?
 BANK_ACCOUNT_NUMBER = 2
 
-[wire-outgoing-test]
+[exchange-wire-outgoing-test]
 # What is the main website of the bank?
 BANK_URI = "https://bank/";
 # From which account at the 'bank' should outgoing
diff --git a/doc/paper/postquantum.tex b/doc/paper/postquantum.tex
index f25fc71..4312479 100644
--- a/doc/paper/postquantum.tex
+++ b/doc/paper/postquantum.tex
@@ -41,7 +41,7 @@
 \mainmatter
 
 \author{Jeffrey Burdges}
-\institute{Intria / GNUnet / Taler}
+\institute{Inria / GNUnet / Taler}
 
 
 \maketitle
diff --git a/doc/taler-config-generate.1 b/doc/taler-config-generate.1
index 7f69e55..8a72cdd 100644
--- a/doc/taler-config-generate.1
+++ b/doc/taler-config-generate.1
@@ -1,7 +1,7 @@
 .TH TALER\-CONFIG\-GENERATE 1 "May 5, 2016" "GNU Taler"
 
 .SH NAME
-taler\-config\-generate \- tool to simplfy Taler configuration generation
+taler\-config\-generate \- tool to simplify Taler configuration generation
 
 .SH SYNOPSIS
 .B taler\-config\-generate
@@ -22,6 +22,9 @@ Which currency should we use in the configuration.
 .IP "\-e, \-\-exchange"
 Generate configuration for a Taler exchange.
 .B
+.IP "\-f AMOUNT, \-\-wirefee=AMOUNT"
+Setup wire transfer fees for the next 5 years for the exchange (for all wire 
methods).
+.B
 .IP "\-m, \-\-merchant"
 Generate configuration for a Taler merchant.
 .B
diff --git a/doc/taler-exchange-httpd.1 b/doc/taler-exchange-httpd.1
index 2f0c37f..a02619d 100644
--- a/doc/taler-exchange-httpd.1
+++ b/doc/taler-exchange-httpd.1
@@ -22,6 +22,9 @@ Use the configuration and other resources for the exchange to 
operate from DIRNA
 .IP "\-h, \-\-help"
 Print short help on options.
 .B
+.IP "\-i, \-\-init-db"
+Initialize the database by creating tables and indices if necessary.
+.B
 .IP "\-v, \-\-version"
 Print version information.
 .B
diff --git a/doc/taler.conf.5 b/doc/taler.conf.5
index 6e50c69..40a9506 100644
--- a/doc/taler.conf.5
+++ b/doc/taler.conf.5
@@ -16,8 +16,6 @@ The following options are from the "[exchange]" section and 
used by most exchang
 
 .IP CURRENCY
     Name of the currency, i.e. "EUR" for Euro.
-.IP WIREFORMAT
-    Format used for wire transfers to the merchant, i.e. "SEPA".
 .IP DB
     Plugin to use for the database, i.e. "postgres"
 .IP PORT
@@ -28,7 +26,8 @@ The following options are from the "[exchange]" section and 
used by most exchang
 
 .SH WIRE transfer details
 
-The following options must be in section "[wire\-incoming\-test]" and 
"[wire\-outgoing\-test]":
+To enable the "test" wire transfer method, you must set "ENABLE = YES" in 
"[exchange\-wire\-test]".
+Then, the following options must be in section 
"[exchange\-wire\-incoming\-test]" and "[exchange\-wire\-outgoing\-test]":
 
 .IP BANK_URI
     URL of the Taler bank.
@@ -36,7 +35,8 @@ The following options must be in section 
"[wire\-incoming\-test]" and "[wire\-ou
 .IP BANK_ACCOUNT_NUMBER
     Number of the bank account of the exchange.
 
-The following options must be in section "[wire\-incoming\-sepa]" and 
"[wire\-outgoing\-sepa]":
+To enable the "sepa" wire transfer method, you must set "ENABLE = YES" in 
"[exchange\-wire\-sepa]".
+Then, the following options must be in section 
"[exchange\-wire\-incoming\-sepa]" and "[exchange\-wire\-outgoing\-sepa]":
 
 .IP SEPA_RESPONSE_FILE
     Filename with the JSON body for the /wire response, signed using the 
exchange\'s long-term offline master key.  Use taler\-exchange\-sepa to create 
the SEPA_RESPONSE_FILE.
diff --git a/src/auditor/taler-auditor-sign.c b/src/auditor/taler-auditor-sign.c
index 6e4fda7..90888da 100644
--- a/src/auditor/taler-auditor-sign.c
+++ b/src/auditor/taler-auditor-sign.c
@@ -151,7 +151,7 @@ main (int argc,
     GNUNET_GETOPT_OPTION_HELP ("Private key of the auditor to use for 
signing"),
     {'m', "exchange-key", "KEY",
      "public key of the exchange (Crockford base32 encoded)", 1,
-     &GNUNET_GETOPT_set_filename, &exchange_public_key},
+     &GNUNET_GETOPT_set_string, &exchange_public_key},
     {'u', "auditor-url", "URL",
      "URL of the auditor (informative link for the user)", 1,
      &GNUNET_GETOPT_set_string, &auditor_url},
diff --git a/src/bank-lib/bank_api_admin.c b/src/bank-lib/bank_api_admin.c
index 338ddce..0b6386a 100644
--- a/src/bank-lib/bank_api_admin.c
+++ b/src/bank-lib/bank_api_admin.c
@@ -162,8 +162,9 @@ handle_admin_add_incoming_finished (void *cls,
  * to the operators of the bank.
  *
  * @param ctx curl context for the event loop
- * @param bank_base_url URL of the bank
- * @param reserve_pub public key of the reserve
+ * @param bank_base_url URL of the bank (used to execute this request)
+ * @param exchange_base_url base URL of the exchange (for tracking)
+ * @param wtid wire transfer identifier for the transfer
  * @param amount amount that was deposited
  * @param execution_date when did we receive the amount
  * @param debit_account_no account number to withdraw from (53 bits at most)
@@ -177,6 +178,7 @@ handle_admin_add_incoming_finished (void *cls,
 struct TALER_BANK_AdminAddIncomingHandle *
 TALER_BANK_admin_add_incoming (struct GNUNET_CURL_Context *ctx,
                                const char *bank_base_url,
+                               const char *exchange_base_url,
                                const struct TALER_WireTransferIdentifierRawP 
*wtid,
                                const struct TALER_Amount *amount,
                                uint64_t debit_account_no,
@@ -188,9 +190,9 @@ TALER_BANK_admin_add_incoming (struct GNUNET_CURL_Context 
*ctx,
   json_t *admin_obj;
   CURL *eh;
 
-  admin_obj = json_pack ("{s:o, s:o,"
-                         " s:I, s:I}",
-                         "wtid", GNUNET_JSON_from_data_auto (wtid), /* #4340 */
+  admin_obj = json_pack ("{s:s, s:o, s:o, s:I, s:I}",
+                         "exchange_url", exchange_base_url,
+                         "wtid", GNUNET_JSON_from_data_auto (wtid),
                          "amount", TALER_JSON_from_amount (amount),
                          "debit_account", (json_int_t) debit_account_no,
                          "credit_account", (json_int_t) credit_account_no);
diff --git a/src/bank-lib/fakebank.c b/src/bank-lib/fakebank.c
index 83ea797..d99332b 100644
--- a/src/bank-lib/fakebank.c
+++ b/src/bank-lib/fakebank.c
@@ -1,6 +1,6 @@
 /*
   This file is part of TALER
-  (C) 2016 Inria and GNUnet e.V.
+  (C) 2016, 2017 Inria and GNUnet e.V.
 
   TALER is free software; you can redistribute it and/or modify it under the
   terms of the GNU General Public License as published by the Free Software
@@ -65,6 +65,11 @@ struct Transaction
    * Subject of the transfer.
    */
   struct TALER_WireTransferIdentifierRawP wtid;
+
+  /**
+   * Base URL of the exchange.
+   */
+  char *exchange_base_url;
 };
 
 
@@ -105,6 +110,8 @@ struct TALER_FAKEBANK_Handle
  * @param want_amount transfer amount desired
  * @param want_debit account that should have been debited
  * @param want_debit account that should have been credited
+ * @param exchange_base_url expected base URL of the exchange
+ *        i.e. "https://example.com/";; may include a port
  * @param[out] wtid set to the wire transfer identifier
  * @return #GNUNET_OK on success
  */
@@ -113,6 +120,7 @@ TALER_FAKEBANK_check (struct TALER_FAKEBANK_Handle *h,
                       const struct TALER_Amount *want_amount,
                       uint64_t want_debit,
                       uint64_t want_credit,
+                      const char *exchange_base_url,
                       struct TALER_WireTransferIdentifierRawP *wtid)
 {
   struct Transaction *t;
@@ -122,12 +130,15 @@ TALER_FAKEBANK_check (struct TALER_FAKEBANK_Handle *h,
     if ( (want_debit == t->debit_account) &&
          (want_credit == t->credit_account) &&
          (0 == TALER_amount_cmp (want_amount,
-                                 &t->amount)) )
+                                 &t->amount)) &&
+         (0 == strcasecmp (exchange_base_url,
+                           t->exchange_base_url)) )
     {
       GNUNET_CONTAINER_DLL_remove (h->transactions_head,
                                    h->transactions_tail,
                                    t);
       *wtid = t->wtid;
+      GNUNET_free (t->exchange_base_url);
       GNUNET_free (t);
       return GNUNET_OK;
     }
@@ -140,10 +151,11 @@ TALER_FAKEBANK_check (struct TALER_FAKEBANK_Handle *h,
 
     s = TALER_amount_to_string (&t->amount);
     fprintf (stderr,
-             "%llu -> %llu (%s)\n",
+             "%llu -> %llu (%s) from %s\n",
              (unsigned long long) t->debit_account,
              (unsigned long long) t->credit_account,
-             s);
+             s,
+             t->exchange_base_url);
     GNUNET_free (s);
   }
   return GNUNET_SYSERR;
@@ -174,10 +186,11 @@ TALER_FAKEBANK_check_empty (struct TALER_FAKEBANK_Handle 
*h)
 
     s = TALER_amount_to_string (&t->amount);
     fprintf (stderr,
-             "%llu -> %llu (%s)\n",
+             "%llu -> %llu (%s) from %s\n",
              (unsigned long long) t->debit_account,
              (unsigned long long) t->credit_account,
-             s);
+             s,
+             t->exchange_base_url);
     GNUNET_free (s);
   }
   return GNUNET_SYSERR;
@@ -199,6 +212,7 @@ TALER_FAKEBANK_stop (struct TALER_FAKEBANK_Handle *h)
     GNUNET_CONTAINER_DLL_remove (h->transactions_head,
                                  h->transactions_tail,
                                  t);
+    GNUNET_free (t->exchange_base_url);
     GNUNET_free (t);
   }
   if (NULL != h->mhd_task)
@@ -303,11 +317,13 @@ handle_mhd_request (void *cls,
   }
   t = GNUNET_new (struct Transaction);
   {
+    const char *base_url;
     struct GNUNET_JSON_Specification spec[] = {
       GNUNET_JSON_spec_fixed_auto ("wtid", &t->wtid),
       GNUNET_JSON_spec_uint64 ("debit_account", &t->debit_account),
       GNUNET_JSON_spec_uint64 ("credit_account", &t->credit_account),
       TALER_JSON_spec_amount ("amount", &t->amount),
+      GNUNET_JSON_spec_string ("exchange_url", &base_url),
       GNUNET_JSON_spec_end ()
     };
     if (GNUNET_OK !=
@@ -319,14 +335,16 @@ handle_mhd_request (void *cls,
       json_decref (json);
       return MHD_NO;
     }
+    t->exchange_base_url = GNUNET_strdup (base_url);
     GNUNET_CONTAINER_DLL_insert (h->transactions_head,
                                  h->transactions_tail,
                                  t);
   }
   GNUNET_log (GNUNET_ERROR_TYPE_INFO,
-              "Receiving incoming wire transfer: %llu->%llu\n",
+              "Receiving incoming wire transfer: %llu->%llu from %s\n",
               (unsigned long long) t->debit_account,
-              (unsigned long long) t->credit_account);
+              (unsigned long long) t->credit_account,
+              t->exchange_base_url);
   json_decref (json);
   resp = MHD_create_response_from_buffer (0, "", MHD_RESPMEM_PERSISTENT);
   ret = MHD_queue_response (connection,
diff --git a/src/bank-lib/test_bank_api_with_fakebank.c 
b/src/bank-lib/test_bank_api_with_fakebank.c
index 8e0ac6d..3c726a7 100644
--- a/src/bank-lib/test_bank_api_with_fakebank.c
+++ b/src/bank-lib/test_bank_api_with_fakebank.c
@@ -1,6 +1,6 @@
 /*
   This file is part of TALER
-  Copyright (C) 2016 GNUnet e.V.
+  Copyright (C) 2016, 2017 GNUnet e.V.
 
   TALER is free software; you can redistribute it and/or modify it under the
   terms of the GNU General Public License as published by the Free Software
@@ -45,6 +45,7 @@ run (void *cls)
       .details.admin_add_incoming.expected_response_code = MHD_HTTP_OK,
       .details.admin_add_incoming.credit_account_no = 1,
       .details.admin_add_incoming.debit_account_no = 2,
+      .details.admin_add_incoming.exchange_base_url = "https://exchange.net/";,
       .details.admin_add_incoming.amount = "PUDOS:5.01" },
     /* Add EUR:3.21 to account 3 */
     { .oc = TBI_OC_ADMIN_ADD_INCOMING,
@@ -52,6 +53,7 @@ run (void *cls)
       .details.admin_add_incoming.expected_response_code = MHD_HTTP_OK,
       .details.admin_add_incoming.credit_account_no = 3,
       .details.admin_add_incoming.debit_account_no = 2,
+      .details.admin_add_incoming.exchange_base_url = "https://exchange.org/";,
       .details.admin_add_incoming.amount = "PUDOS:3.21" },
     /* check transfers arrived at fakebank */
     { .oc = TBI_OC_EXPECT_TRANSFER,
diff --git a/src/bank-lib/test_bank_interpreter.c 
b/src/bank-lib/test_bank_interpreter.c
index 0364878..f088cfc 100644
--- a/src/bank-lib/test_bank_interpreter.c
+++ b/src/bank-lib/test_bank_interpreter.c
@@ -1,6 +1,6 @@
 /*
   This file is part of TALER
-  Copyright (C) 2016 GNUnet e.V.
+  Copyright (C) 2016, 2017 GNUnet e.V.
 
   TALER is free software; you can redistribute it and/or modify it under the
   terms of the GNU General Public License as published by the Free Software
@@ -222,6 +222,7 @@ interpreter_run (void *cls)
     cmd->details.admin_add_incoming.aih
       = TALER_BANK_admin_add_incoming (is->ctx,
                                        "http://localhost:8081";,
+                                       
cmd->details.admin_add_incoming.exchange_base_url,
                                        &cmd->details.admin_add_incoming.wtid,
                                        &amount,
                                        
cmd->details.admin_add_incoming.debit_account_no,
@@ -243,10 +244,11 @@ interpreter_run (void *cls)
                                            &amount));
     if (GNUNET_OK !=
         TALER_FAKEBANK_check (is->fakebank,
-                        &amount,
-                        ref->details.admin_add_incoming.debit_account_no,
-                        ref->details.admin_add_incoming.credit_account_no,
-                        &wtid))
+                              &amount,
+                              ref->details.admin_add_incoming.debit_account_no,
+                              
ref->details.admin_add_incoming.credit_account_no,
+                              
ref->details.admin_add_incoming.exchange_base_url,
+                              &wtid))
     {
       GNUNET_break (0);
       fail (is);
diff --git a/src/bank-lib/test_bank_interpreter.h 
b/src/bank-lib/test_bank_interpreter.h
index 0093b0d..1f2772c 100644
--- a/src/bank-lib/test_bank_interpreter.h
+++ b/src/bank-lib/test_bank_interpreter.h
@@ -1,6 +1,6 @@
 /*
   This file is part of TALER
-  Copyright (C) 2016 GNUnet e.V.
+  Copyright (C) 2016, 2017 GNUnet e.V.
 
   TALER is free software; you can redistribute it and/or modify it under the
   terms of the GNU General Public License as published by the Free Software
@@ -100,6 +100,11 @@ struct TBI_Command
       uint64_t debit_account_no;
 
       /**
+       * Exchange base URL to use.
+       */
+      const char *exchange_base_url;
+
+      /**
        * Wire transfer identifier to use.  Initialized to
        * a random value.
        */
diff --git a/src/benchmark/taler-exchange-benchmark.c 
b/src/benchmark/taler-exchange-benchmark.c
index 7b143a1..62a7fb6 100644
--- a/src/benchmark/taler-exchange-benchmark.c
+++ b/src/benchmark/taler-exchange-benchmark.c
@@ -358,11 +358,6 @@ static struct Reserve *reserves;
 static struct Coin *coins;
 
 /**
- * Transaction id counter, used in /deposit's
- */
-static unsigned int transaction_id;
-
-/**
  * Transfer UUID counter, used in /admin/add/incoming
  */
 static unsigned int transfer_uuid;
@@ -831,7 +826,7 @@ spend_coin (struct Coin *coin,
   struct GNUNET_TIME_Absolute wire_deadline;
   struct GNUNET_TIME_Absolute timestamp;
   struct GNUNET_TIME_Absolute refund_deadline;
-  struct GNUNET_HashCode h_contract;
+  struct GNUNET_HashCode h_proposal_data;
   struct TALER_CoinSpendPublicKeyP coin_pub;
   struct TALER_DepositRequestPS dr;
   struct TALER_MerchantPublicKeyP merchant_pub;
@@ -840,8 +835,8 @@ spend_coin (struct Coin *coin,
   GNUNET_CRYPTO_eddsa_key_get_public (&coin->coin_priv.eddsa_priv,
                                      &coin_pub.eddsa_pub);
   GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_WEAK,
-                             &h_contract,
-                             sizeof (h_contract));
+                             &h_proposal_data,
+                             sizeof (h_proposal_data));
   timestamp = GNUNET_TIME_absolute_get ();
   wire_deadline = GNUNET_TIME_absolute_add (timestamp,
                                            GNUNET_TIME_UNIT_WEEKS);
@@ -887,13 +882,12 @@ spend_coin (struct Coin *coin,
   memset (&dr, 0, sizeof (dr));
   dr.purpose.size = htonl (sizeof (struct TALER_DepositRequestPS));
   dr.purpose.purpose = htonl (TALER_SIGNATURE_WALLET_COIN_DEPOSIT);
-  dr.h_contract = h_contract;
+  dr.h_proposal_data = h_proposal_data;
   TALER_JSON_hash (merchant_details,
                   &dr.h_wire);
 
   dr.timestamp = GNUNET_TIME_absolute_hton (timestamp);
   dr.refund_deadline = GNUNET_TIME_absolute_hton (refund_deadline);
-  dr.transaction_id = GNUNET_htonll (transaction_id);
 
   TALER_amount_hton (&dr.amount_with_fee,
                     &amount);
@@ -914,12 +908,11 @@ spend_coin (struct Coin *coin,
                                     &amount,
                                     wire_deadline,
                                     merchant_details,
-                                    &h_contract,
+                                    &h_proposal_data,
                                     &coin_pub,
                                     &coin->sig,
                                     &coin->pk->key,
                                     timestamp,
-                                    transaction_id++,
                                     &merchant_pub,
                                     refund_deadline,
                                     &coin_sig,
diff --git a/src/benchmark/taler-exchange-benchmark.conf 
b/src/benchmark/taler-exchange-benchmark.conf
index 16a26d8..a77df46 100644
--- a/src/benchmark/taler-exchange-benchmark.conf
+++ b/src/benchmark/taler-exchange-benchmark.conf
@@ -11,11 +11,6 @@ CURRENCY = KUDOS
 
 [exchange]
 
-# Wire format supported by the exchange
-# We use 'test' for testing of the actual
-# coin operations, and 'sepa' to test SEPA-specific routines.
-WIREFORMAT = test
-
 # HTTP port the exchange listens to
 PORT = 8081
 # How to access our database
@@ -27,6 +22,9 @@ MASTER_PUBLIC_KEY = 
98NJW3CQHZQGQXTY3K85K531XKPAPAVV4Q5V8PYYRR00NJGZWNVG
 [exchangedb-postgres]
 DB_CONN_STR = "postgres:///talercheck"
 
+[exchange-wire-test]
+# Enable 'test' for testing of the actual coin operations.
+ENABLE = YES
 
 [exchange-wire-outgoing-test]
 # What is the main website of the bank?
@@ -88,4 +86,3 @@ fee_deposit = KUDOS:0.00
 fee_refresh = KUDOS:0.00
 fee_refund = KUDOS:0.00
 rsa_keysize = 1024
-
diff --git a/src/exchange-lib/afl-generate.sh b/src/exchange-lib/afl-generate.sh
index 6ae8330..b0afcab 100644
--- a/src/exchange-lib/afl-generate.sh
+++ b/src/exchange-lib/afl-generate.sh
@@ -31,4 +31,4 @@
 #
 # Must be run from this directory.
 #
-$AFL_HOME/afl-fuzz -i baseline/ -m 250 -o afl-tests/ -f /tmp/afl-input 
taler-exchange-httpd -f /tmp/afl-input -d test-exchange-home/ -C
+$AFL_HOME/afl-fuzz -i baseline/ -m 250 -o afl-tests/ -f /tmp/afl-input 
taler-exchange-httpd -i -f /tmp/afl-input -d test-exchange-home/ -C
diff --git a/src/exchange-lib/baseline/deposit.req 
b/src/exchange-lib/baseline/deposit.req
index f50d83e..6518e76 100644
--- a/src/exchange-lib/baseline/deposit.req
+++ b/src/exchange-lib/baseline/deposit.req
@@ -5,4 +5,4 @@ Content-Type: application/json
 Content-Length: 1658
 Expect: 100-continue
 
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
+{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
diff --git a/src/exchange-lib/exchange_api_common.c 
b/src/exchange-lib/exchange_api_common.c
index a531b1c..743fb4f 100644
--- a/src/exchange-lib/exchange_api_common.c
+++ b/src/exchange-lib/exchange_api_common.c
@@ -226,7 +226,7 @@ TALER_EXCHANGE_verify_coin_history (const char *currency,
         return GNUNET_SYSERR;
       }
       /* NOTE/FIXME: theoretically, we could also check that the given
-         transaction_id and merchant_pub and h_contract appear in the
+         merchant_pub and h_proposal_data appear in the
          history under deposits.  However, there is really no benefit
          for the exchange to lie here, so not checking is probably OK
          (an auditor ought to check, though). Then again, we similarly
diff --git a/src/exchange-lib/exchange_api_deposit.c 
b/src/exchange-lib/exchange_api_deposit.c
index 9282bbf..7eb6f5b 100644
--- a/src/exchange-lib/exchange_api_deposit.c
+++ b/src/exchange-lib/exchange_api_deposit.c
@@ -274,12 +274,11 @@ handle_deposit_finished (void *cls,
  * @param dki public key information
  * @param amount the amount to be deposited
  * @param h_wire hash of the merchant’s account details
- * @param h_contract hash of the contact of the merchant with the customer 
(further details are never disclosed to the exchange)
+ * @param h_proposal_data hash of the contact of the merchant with the 
customer (further details are never disclosed to the exchange)
  * @param coin_pub coin’s public key
  * @param denom_pub denomination key with which the coin is signed
  * @param denom_sig exchange’s unblinded signature of the coin
- * @param timestamp timestamp when the contract was finalized, must match 
approximately the current time of the exchange
- * @param transaction_id transaction id for the transaction between merchant 
and customer
+ * @param timestamp timestamp when the deposit was finalized
  * @param merchant_pub the public key of the merchant (used to identify the 
merchant for refund requests)
  * @param refund_deadline date until which the merchant can issue a refund to 
the customer via the exchange (can be zero if refunds are not allowed)
  * @param coin_sig the signature made with purpose 
#TALER_SIGNATURE_WALLET_COIN_DEPOSIT made by the customer with the coin’s 
private key.
@@ -289,12 +288,11 @@ static int
 verify_signatures (const struct TALER_EXCHANGE_DenomPublicKey *dki,
                    const struct TALER_Amount *amount,
                    const struct GNUNET_HashCode *h_wire,
-                   const struct GNUNET_HashCode *h_contract,
+                   const struct GNUNET_HashCode *h_proposal_data,
                    const struct TALER_CoinSpendPublicKeyP *coin_pub,
                    const struct TALER_DenominationSignature *denom_sig,
                    const struct TALER_DenominationPublicKey *denom_pub,
                    struct GNUNET_TIME_Absolute timestamp,
-                   uint64_t transaction_id,
                    const struct TALER_MerchantPublicKeyP *merchant_pub,
                    struct GNUNET_TIME_Absolute refund_deadline,
                    const struct TALER_CoinSpendSignatureP *coin_sig)
@@ -304,11 +302,10 @@ verify_signatures (const struct 
TALER_EXCHANGE_DenomPublicKey *dki,
 
   dr.purpose.purpose = htonl (TALER_SIGNATURE_WALLET_COIN_DEPOSIT);
   dr.purpose.size = htonl (sizeof (struct TALER_DepositRequestPS));
-  dr.h_contract = *h_contract;
+  dr.h_proposal_data = *h_proposal_data;
   dr.h_wire = *h_wire;
   dr.timestamp = GNUNET_TIME_absolute_hton (timestamp);
   dr.refund_deadline = GNUNET_TIME_absolute_hton (refund_deadline);
-  dr.transaction_id = GNUNET_htonll (transaction_id);
   TALER_amount_hton (&dr.amount_with_fee,
                      amount);
   TALER_amount_hton (&dr.deposit_fee,
@@ -374,12 +371,11 @@ verify_signatures (const struct 
TALER_EXCHANGE_DenomPublicKey *dki,
  * @param wire_deadline date until which the merchant would like the exchange 
to settle the balance (advisory, the exchange cannot be
  *        forced to settle in the past or upon very short notice, but of 
course a well-behaved exchange will limit aggregation based on the advice 
received)
  * @param wire_details the merchant’s account details, in a format supported 
by the exchange
- * @param h_contract hash of the contact of the merchant with the customer 
(further details are never disclosed to the exchange)
+ * @param h_proposal_data hash of the contact of the merchant with the 
customer (further details are never disclosed to the exchange)
  * @param coin_pub coin’s public key
  * @param denom_pub denomination key with which the coin is signed
  * @param denom_sig exchange’s unblinded signature of the coin
- * @param timestamp timestamp when the contract was finalized, must match 
approximately the current time of the exchange
- * @param transaction_id transaction id for the transaction between merchant 
and customer
+ * @param timestamp timestamp when the contract was finalized, must not be too 
far in the future
  * @param merchant_pub the public key of the merchant (used to identify the 
merchant for refund requests)
  * @param refund_deadline date until which the merchant can issue a refund to 
the customer via the exchange (can be zero if refunds are not allowed); must 
not be after the @a wire_deadline
  * @param coin_sig the signature made with purpose 
#TALER_SIGNATURE_WALLET_COIN_DEPOSIT made by the customer with the coin’s 
private key.
@@ -393,12 +389,11 @@ TALER_EXCHANGE_deposit (struct TALER_EXCHANGE_Handle 
*exchange,
                         const struct TALER_Amount *amount,
                         struct GNUNET_TIME_Absolute wire_deadline,
                         json_t *wire_details,
-                        const struct GNUNET_HashCode *h_contract,
+                        const struct GNUNET_HashCode *h_proposal_data,
                         const struct TALER_CoinSpendPublicKeyP *coin_pub,
                         const struct TALER_DenominationSignature *denom_sig,
                         const struct TALER_DenominationPublicKey *denom_pub,
                         struct GNUNET_TIME_Absolute timestamp,
-                        uint64_t transaction_id,
                         const struct TALER_MerchantPublicKeyP *merchant_pub,
                         struct GNUNET_TIME_Absolute refund_deadline,
                         const struct TALER_CoinSpendSignatureP *coin_sig,
@@ -435,12 +430,11 @@ TALER_EXCHANGE_deposit (struct TALER_EXCHANGE_Handle 
*exchange,
       verify_signatures (dki,
                          amount,
                          &h_wire,
-                         h_contract,
+                         h_proposal_data,
                          coin_pub,
                          denom_sig,
                          denom_pub,
                          timestamp,
-                         transaction_id,
                          merchant_pub,
                          refund_deadline,
                          coin_sig))
@@ -450,21 +444,20 @@ TALER_EXCHANGE_deposit (struct TALER_EXCHANGE_Handle 
*exchange,
   }
 
   deposit_obj = json_pack ("{s:o, s:O," /* f/wire */
-                           " s:o, s:o," /* H_wire, H_contract */
+                           " s:o, s:o," /* H_wire, h_proposal_data */
                            " s:o, s:o," /* coin_pub, denom_pub */
                            " s:o, s:o," /* ub_sig, timestamp */
-                           " s:I, s:o," /* transaction id, merchant_pub */
+                           " s:o," /* merchant_pub */
                            " s:o, s:o," /* refund_deadline, wire_deadline */
                            " s:o}",     /* coin_sig */
                            "f", TALER_JSON_from_amount (amount),
                            "wire", wire_details,
                            "H_wire", GNUNET_JSON_from_data_auto (&h_wire),
-                           "H_contract", GNUNET_JSON_from_data_auto 
(h_contract),
+                           "h_proposal_data", GNUNET_JSON_from_data_auto 
(h_proposal_data),
                            "coin_pub", GNUNET_JSON_from_data_auto (coin_pub),
                            "denom_pub", GNUNET_JSON_from_rsa_public_key 
(denom_pub->rsa_public_key),
                            "ub_sig", GNUNET_JSON_from_rsa_signature 
(denom_sig->rsa_signature),
                            "timestamp", GNUNET_JSON_from_time_abs (timestamp),
-                           "transaction_id", (json_int_t) transaction_id,
                            "merchant_pub", GNUNET_JSON_from_data_auto 
(merchant_pub),
                            "refund_deadline", GNUNET_JSON_from_time_abs 
(refund_deadline),
                            "wire_transfer_deadline", GNUNET_JSON_from_time_abs 
(wire_deadline),
@@ -478,9 +471,8 @@ TALER_EXCHANGE_deposit (struct TALER_EXCHANGE_Handle 
*exchange,
   dh->url = MAH_path_to_url (exchange, "/deposit");
   dh->depconf.purpose.size = htonl (sizeof (struct 
TALER_DepositConfirmationPS));
   dh->depconf.purpose.purpose = htonl 
(TALER_SIGNATURE_EXCHANGE_CONFIRM_DEPOSIT);
-  dh->depconf.h_contract = *h_contract;
+  dh->depconf.h_proposal_data = *h_proposal_data;
   dh->depconf.h_wire = h_wire;
-  dh->depconf.transaction_id = GNUNET_htonll (transaction_id);
   dh->depconf.timestamp = GNUNET_TIME_absolute_hton (timestamp);
   dh->depconf.refund_deadline = GNUNET_TIME_absolute_hton (refund_deadline);
   TALER_amount_hton (&dh->depconf.amount_without_fee,
diff --git a/src/exchange-lib/exchange_api_handle.c 
b/src/exchange-lib/exchange_api_handle.c
index 8d134eb..6b0e785 100644
--- a/src/exchange-lib/exchange_api_handle.c
+++ b/src/exchange-lib/exchange_api_handle.c
@@ -873,7 +873,7 @@ parse_date_string (const char *date,
   for (i=0;i<12;i++)
     if (0 == strcasecmp (mons[i], mon))
       now.tm_mon = i;
-  if ( (7 == now.tm_mday) ||
+  if ( (7 == now.tm_wday) ||
        (12 == now.tm_mon) )
     return GNUNET_SYSERR;
   t = mktime (&now);
diff --git a/src/exchange-lib/exchange_api_refund.c 
b/src/exchange-lib/exchange_api_refund.c
index be080c5..4a0cac5 100644
--- a/src/exchange-lib/exchange_api_refund.c
+++ b/src/exchange-lib/exchange_api_refund.c
@@ -220,8 +220,7 @@ handle_refund_finished (void *cls,
  *        (as that fee is still being subtracted), and smaller than the amount
  *        (with deposit fee) of the original deposit contribution of this coin
  * @param refund_fee fee applicable to this coin for the refund
- * @param h_contract hash of the contact of the merchant with the customer 
that is being refunded
- * @param transaction_id transaction id for the transaction being refunded, 
must match @a h_contract
+ * @param h_proposal_data hash of the contact of the merchant with the 
customer that is being refunded
  * @param coin_pub coin’s public key of the coin from the original deposit 
operation
  * @param rtransaction_id transaction id for the transaction between merchant 
and customer (of refunding operation);
  *                        this is needed as we may first do a partial refund 
and later a full refund.  If both
@@ -237,8 +236,7 @@ struct TALER_EXCHANGE_RefundHandle *
 TALER_EXCHANGE_refund (struct TALER_EXCHANGE_Handle *exchange,
                       const struct TALER_Amount *amount,
                       const struct TALER_Amount *refund_fee,
-                      const struct GNUNET_HashCode *h_contract,
-                      uint64_t transaction_id,
+                      const struct GNUNET_HashCode *h_proposal_data,
                       const struct TALER_CoinSpendPublicKeyP *coin_pub,
                       uint64_t rtransaction_id,
                       const struct TALER_MerchantPrivateKeyP *merchant_priv,
@@ -256,8 +254,7 @@ TALER_EXCHANGE_refund (struct TALER_EXCHANGE_Handle 
*exchange,
                 MAH_handle_is_ready (exchange));
   rr.purpose.purpose = htonl (TALER_SIGNATURE_MERCHANT_REFUND);
   rr.purpose.size = htonl (sizeof (struct TALER_RefundRequestPS));
-  rr.h_contract = *h_contract;
-  rr.transaction_id = GNUNET_htonll (transaction_id);
+  rr.h_proposal_data = *h_proposal_data;
   rr.coin_pub = *coin_pub;
   GNUNET_CRYPTO_eddsa_key_get_public (&merchant_priv->eddsa_priv,
                                       &rr.merchant.eddsa_pub);
@@ -271,14 +268,13 @@ TALER_EXCHANGE_refund (struct TALER_EXCHANGE_Handle 
*exchange,
                                            &rr.purpose,
                                            &merchant_sig.eddsa_sig));
   refund_obj = json_pack ("{s:o, s:o," /* amount/fee */
-                         " s:o, s:o," /* H_contract, coin_pub */
-                         " s:I, s:I," /* transaction id, rtransaction id */
+                         " s:o, s:o," /* h_proposal_data, coin_pub */
+                         " s:I," /* rtransaction id */
                          " s:o, s:o}", /* merchant_pub, merchant_sig */
                          "refund_amount", TALER_JSON_from_amount (amount),
                          "refund_fee", TALER_JSON_from_amount (refund_fee),
-                         "H_contract", GNUNET_JSON_from_data_auto (h_contract),
+                         "h_proposal_data", GNUNET_JSON_from_data_auto 
(h_proposal_data),
                          "coin_pub", GNUNET_JSON_from_data_auto (coin_pub),
-                         "transaction_id", (json_int_t) transaction_id,
                          "rtransaction_id", (json_int_t) rtransaction_id,
                          "merchant_pub", GNUNET_JSON_from_data_auto 
(&rr.merchant),
                          "merchant_sig", GNUNET_JSON_from_data_auto 
(&merchant_sig)
@@ -292,8 +288,7 @@ TALER_EXCHANGE_refund (struct TALER_EXCHANGE_Handle 
*exchange,
   rh->url = MAH_path_to_url (exchange, "/refund");
   rh->depconf.purpose.size = htonl (sizeof (struct 
TALER_RefundConfirmationPS));
   rh->depconf.purpose.purpose = htonl 
(TALER_SIGNATURE_EXCHANGE_CONFIRM_REFUND);
-  rh->depconf.h_contract = *h_contract;
-  rh->depconf.transaction_id = GNUNET_htonll (transaction_id);
+  rh->depconf.h_proposal_data = *h_proposal_data;
   rh->depconf.coin_pub = *coin_pub;
   rh->depconf.merchant = rr.merchant;
   rh->depconf.rtransaction_id = GNUNET_htonll (rtransaction_id);
diff --git a/src/exchange-lib/exchange_api_track_transaction.c 
b/src/exchange-lib/exchange_api_track_transaction.c
index 7fd2efb..9b63821 100644
--- a/src/exchange-lib/exchange_api_track_transaction.c
+++ b/src/exchange-lib/exchange_api_track_transaction.c
@@ -254,9 +254,9 @@ handle_deposit_wtid_finished (void *cls,
  * @param exchange the exchange to query
  * @param merchant_priv the merchant's private key
  * @param h_wire hash of merchant's wire transfer details
- * @param h_contract hash of the contract
+ * @param h_proposal_data hash of the proposal data from the contract
+ *                        between merchant and customer
  * @param coin_pub public key of the coin
- * @param transaction_id transaction identifier
  * @param cb function to call with the result
  * @param cb_cls closure for @a cb
  * @return handle to abort request
@@ -265,9 +265,8 @@ struct TALER_EXCHANGE_TrackTransactionHandle *
 TALER_EXCHANGE_track_transaction (struct TALER_EXCHANGE_Handle *exchange,
                              const struct TALER_MerchantPrivateKeyP 
*merchant_priv,
                              const struct GNUNET_HashCode *h_wire,
-                             const struct GNUNET_HashCode *h_contract,
+                             const struct GNUNET_HashCode *h_proposal_data,
                              const struct TALER_CoinSpendPublicKeyP *coin_pub,
-                             uint64_t transaction_id,
                              TALER_EXCHANGE_TrackTransactionCallback cb,
                              void *cb_cls)
 {
@@ -286,9 +285,8 @@ TALER_EXCHANGE_track_transaction (struct 
TALER_EXCHANGE_Handle *exchange,
   }
   dtp.purpose.purpose = htonl (TALER_SIGNATURE_MERCHANT_TRACK_TRANSACTION);
   dtp.purpose.size = htonl (sizeof (dtp));
-  dtp.h_contract = *h_contract;
+  dtp.h_proposal_data = *h_proposal_data;
   dtp.h_wire = *h_wire;
-  dtp.transaction_id = GNUNET_htonll (transaction_id);
   GNUNET_CRYPTO_eddsa_key_get_public (&merchant_priv->eddsa_priv,
                                       &dtp.merchant.eddsa_pub);
 
@@ -297,13 +295,12 @@ TALER_EXCHANGE_track_transaction (struct 
TALER_EXCHANGE_Handle *exchange,
                  GNUNET_CRYPTO_eddsa_sign (&merchant_priv->eddsa_priv,
                                            &dtp.purpose,
                                            &merchant_sig.eddsa_sig));
-  deposit_wtid_obj = json_pack ("{s:o, s:o," /* H_wire, H_contract */
-                                " s:o, s:I," /* coin_pub, transaction_id */
+  deposit_wtid_obj = json_pack ("{s:o, s:o," /* H_wire, h_proposal_data */
+                                " s:o," /* coin_pub */
                                 " s:o, s:o}", /* merchant_pub, merchant_sig */
                                 "H_wire", GNUNET_JSON_from_data_auto (h_wire),
-                                "H_contract", GNUNET_JSON_from_data_auto 
(h_contract),
+                                "h_proposal_data", GNUNET_JSON_from_data_auto 
(h_proposal_data),
                                 "coin_pub", GNUNET_JSON_from_data_auto 
(coin_pub),
-                                "transaction_id", (json_int_t) transaction_id,
                                 "merchant_pub", GNUNET_JSON_from_data_auto 
(&dtp.merchant),
                                 "merchant_sig", GNUNET_JSON_from_data_auto 
(&merchant_sig));
 
@@ -315,9 +312,8 @@ TALER_EXCHANGE_track_transaction (struct 
TALER_EXCHANGE_Handle *exchange,
   dwh->depconf.purpose.size = htonl (sizeof (struct TALER_ConfirmWirePS));
   dwh->depconf.purpose.purpose = htonl (TALER_SIGNATURE_EXCHANGE_CONFIRM_WIRE);
   dwh->depconf.h_wire = *h_wire;
-  dwh->depconf.h_contract = *h_contract;
+  dwh->depconf.h_proposal_data = *h_proposal_data;
   dwh->depconf.coin_pub = *coin_pub;
-  dwh->depconf.transaction_id = GNUNET_htonll (transaction_id);
 
   eh = curl_easy_init ();
   GNUNET_assert (NULL != (dwh->json_enc =
diff --git a/src/exchange-lib/exchange_api_track_transfer.c 
b/src/exchange-lib/exchange_api_track_transfer.c
index 8ed5865..92e846c 100644
--- a/src/exchange-lib/exchange_api_track_transfer.c
+++ b/src/exchange-lib/exchange_api_track_transfer.c
@@ -87,12 +87,15 @@ check_track_transfer_response_ok (struct 
TALER_EXCHANGE_TrackTransferHandle *wdh
   struct GNUNET_HashCode h_wire;
   struct GNUNET_TIME_Absolute exec_time;
   struct TALER_Amount total_amount;
+  struct TALER_Amount total_expected;
+  struct TALER_Amount wire_fee;
   struct TALER_MerchantPublicKeyP merchant_pub;
   unsigned int num_details;
   struct TALER_ExchangePublicKeyP exchange_pub;
   struct TALER_ExchangeSignatureP exchange_sig;
   struct GNUNET_JSON_Specification spec[] = {
     TALER_JSON_spec_amount ("total", &total_amount),
+    TALER_JSON_spec_amount ("wire_fee", &wire_fee),
     GNUNET_JSON_spec_fixed_auto ("merchant_pub", &merchant_pub),
     GNUNET_JSON_spec_fixed_auto ("H_wire", &h_wire),
     GNUNET_JSON_spec_absolute_time ("execution_time", &exec_time),
@@ -110,6 +113,13 @@ check_track_transfer_response_ok (struct 
TALER_EXCHANGE_TrackTransferHandle *wdh
     GNUNET_break_op (0);
     return GNUNET_SYSERR;
   }
+  if (GNUNET_OK !=
+      TALER_amount_get_zero (total_amount.currency,
+                             &total_expected))
+  {
+    GNUNET_break_op (0);
+    return GNUNET_SYSERR;
+  }
   num_details = json_array_size (details_j);
   {
     struct TALER_TrackTransferDetails details[num_details];
@@ -124,8 +134,7 @@ check_track_transfer_response_ok (struct 
TALER_EXCHANGE_TrackTransferHandle *wdh
       struct TALER_TrackTransferDetails *detail = &details[i];
       struct json_t *detail_j = json_array_get (details_j, i);
       struct GNUNET_JSON_Specification spec_detail[] = {
-        GNUNET_JSON_spec_fixed_auto ("H_contract", &detail->h_contract),
-        GNUNET_JSON_spec_uint64 ("transaction_id", &detail->transaction_id),
+        GNUNET_JSON_spec_fixed_auto ("h_proposal_data", 
&detail->h_proposal_data),
         GNUNET_JSON_spec_fixed_auto ("coin_pub", &detail->coin_pub),
         TALER_JSON_spec_amount ("deposit_value", &detail->coin_value),
         TALER_JSON_spec_amount ("deposit_fee", &detail->coin_fee),
@@ -143,14 +152,27 @@ check_track_transfer_response_ok (struct 
TALER_EXCHANGE_TrackTransferHandle *wdh
         return GNUNET_SYSERR;
       }
       /* build up big hash for signature checking later */
-      dd.h_contract = detail->h_contract;
+      dd.h_proposal_data = detail->h_proposal_data;
       dd.execution_time = GNUNET_TIME_absolute_hton (exec_time);
-      dd.transaction_id = GNUNET_htonll (detail->transaction_id);
       dd.coin_pub = detail->coin_pub;
       TALER_amount_hton (&dd.deposit_value,
                          &detail->coin_value);
       TALER_amount_hton (&dd.deposit_fee,
                          &detail->coin_fee);
+      if ( (GNUNET_OK !=
+            TALER_amount_add (&total_expected,
+                              &total_expected,
+                              &detail->coin_value)) ||
+           (GNUNET_OK !=
+            TALER_amount_subtract (&total_expected,
+                                   &total_expected,
+                                   &detail->coin_fee)) )
+      {
+        GNUNET_break_op (0);
+        GNUNET_CRYPTO_hash_context_abort (hash_context);
+        GNUNET_JSON_parse_free (spec);
+        return GNUNET_SYSERR;
+      }
       GNUNET_CRYPTO_hash_context_read (hash_context,
                                        &dd,
                                        sizeof (struct 
TALER_WireDepositDetailP));
@@ -160,6 +182,8 @@ check_track_transfer_response_ok (struct 
TALER_EXCHANGE_TrackTransferHandle *wdh
     wdp.purpose.size = htonl (sizeof (struct TALER_WireDepositDataPS));
     TALER_amount_hton (&wdp.total,
                        &total_amount);
+    TALER_amount_hton (&wdp.wire_fee,
+                       &wire_fee);
     wdp.merchant_pub = merchant_pub;
     wdp.h_wire = h_wire;
     GNUNET_CRYPTO_hash_context_finish (hash_context,
@@ -180,6 +204,23 @@ check_track_transfer_response_ok (struct 
TALER_EXCHANGE_TrackTransferHandle *wdh
       GNUNET_JSON_parse_free (spec);
       return GNUNET_SYSERR;
     }
+    if (GNUNET_OK !=
+        TALER_amount_subtract (&total_expected,
+                               &total_expected,
+                               &wire_fee))
+    {
+      GNUNET_break_op (0);
+      GNUNET_JSON_parse_free (spec);
+      return GNUNET_SYSERR;
+    }
+    if (0 !=
+        TALER_amount_cmp (&total_expected,
+                          &total_amount))
+    {
+      GNUNET_break_op (0);
+      GNUNET_JSON_parse_free (spec);
+      return GNUNET_SYSERR;
+    }
     wdh->cb (wdh->cb_cls,
              MHD_HTTP_OK,
             TALER_EC_NONE,
@@ -188,6 +229,7 @@ check_track_transfer_response_ok (struct 
TALER_EXCHANGE_TrackTransferHandle *wdh
              &h_wire,
              exec_time,
              &total_amount,
+             &wire_fee,
              num_details,
              details);
   }
@@ -259,6 +301,7 @@ handle_track_transfer_finished (void *cls,
            NULL,
            GNUNET_TIME_UNIT_ZERO_ABS,
            NULL,
+           NULL,
            0, NULL);
   TALER_EXCHANGE_track_transfer_cancel (wdh);
 }
diff --git a/src/exchange-lib/exchange_api_wire.c 
b/src/exchange-lib/exchange_api_wire.c
index fe60d66..bdf4dc8 100644
--- a/src/exchange-lib/exchange_api_wire.c
+++ b/src/exchange-lib/exchange_api_wire.c
@@ -27,6 +27,7 @@
 #include <gnunet/gnunet_curl_lib.h>
 #include "taler_exchange_service.h"
 #include "taler_json_lib.h"
+#include "taler_signatures.h"
 #include "taler_wire_plugin.h"
 #include "exchange_api_handle.h"
 
@@ -148,6 +149,8 @@ handle_wire_finished (void *cls,
     break;
   case MHD_HTTP_OK:
     {
+      const struct TALER_EXCHANGE_Keys *keys;
+      const struct TALER_MasterPublicKeyP *master_pub;
       const char *key;
       json_t *method;
       int ret;
@@ -175,18 +178,31 @@ handle_wire_finished (void *cls,
                            method);
         }
       }
+      /* check fees */
+      keys = TALER_EXCHANGE_get_keys (wh->exchange);
+      if (NULL == keys)
+        master_pub = NULL;
+      else
+        master_pub = &keys->master_pub;
+      if (GNUNET_OK !=
+          TALER_EXCHANGE_wire_get_fees (master_pub,
+                                        keep,
+                                        NULL,
+                                        NULL))
+      {
+        /* bogus reply */
+        GNUNET_break_op (0);
+        response_code = 0;
+      }
       if (0 != response_code)
       {
         /* all supported methods were valid, use 'keep' for 'json' */
         break;
       }
-      else
-      {
-        /* some supported methods were invalid, release 'keep', preserve
-           full 'json' for application-level error handling. */
-        json_decref (keep);
-        keep = NULL;
-      }
+      /* some supported methods were invalid, release 'keep', preserve
+         full 'json' for application-level error handling. */
+      json_decref (keep);
+      keep = NULL;
     }
     break;
   case MHD_HTTP_BAD_REQUEST:
@@ -300,4 +316,143 @@ TALER_EXCHANGE_wire_cancel (struct 
TALER_EXCHANGE_WireHandle *wh)
 }
 
 
+/**
+ * Parse wire @a fee and store the result in @a af.
+ *
+ * @param[out] af where to write the result
+ * @param fee json AggregateTransferFee to parse
+ * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
+ */
+static int
+parse_json_fees (struct TALER_EXCHANGE_WireAggregateFees *af,
+                 json_t *fee)
+{
+  struct GNUNET_JSON_Specification spec[] = {
+    GNUNET_JSON_spec_fixed_auto ("sig",
+                                 &af->master_sig),
+    TALER_JSON_spec_amount ("wire_fee",
+                            &af->wire_fee),
+    GNUNET_JSON_spec_absolute_time ("start_date",
+                                    &af->start_date),
+    GNUNET_JSON_spec_absolute_time ("end_date",
+                                    &af->end_date),
+    GNUNET_JSON_spec_end()
+  };
+
+  if (GNUNET_OK !=
+      GNUNET_JSON_parse (fee,
+                         spec,
+                         NULL,
+                         NULL))
+  {
+    GNUNET_break_op (0);
+    return GNUNET_SYSERR;
+  }
+  return GNUNET_OK;
+}
+
+
+/**
+ * Check the #TALER_SIGNATURE_MASTER_WIRE_FEES signature.
+ *
+ * @param af record to check
+ * @param wire_method wire method to check against
+ * @param master_pub expected signing key
+ * @return #GNUNET_OK on success, #GNUNET_SYSERR on failure
+ */
+static int
+check_sig (const struct TALER_EXCHANGE_WireAggregateFees *af,
+           const char *wire_method,
+           const struct TALER_MasterPublicKeyP *master_pub)
+{
+  struct TALER_MasterWireFeePS wp;
+
+  wp.purpose.purpose = htonl (TALER_SIGNATURE_MASTER_WIRE_FEES);
+  wp.purpose.size = htonl (sizeof (wp));
+  GNUNET_CRYPTO_hash (wire_method,
+                      strlen (wire_method) + 1,
+                      &wp.h_wire_method);
+  wp.start_date = GNUNET_TIME_absolute_hton (af->start_date);
+  wp.end_date = GNUNET_TIME_absolute_hton (af->end_date);
+  TALER_amount_hton (&wp.wire_fee,
+                     &af->wire_fee);
+  return GNUNET_CRYPTO_eddsa_verify (TALER_SIGNATURE_MASTER_WIRE_FEES,
+                                     &wp.purpose,
+                                     &af->master_sig.eddsa_signature,
+                                     &master_pub->eddsa_pub);
+}
+
+
+/**
+ * Obtain information about wire fees encoded in @a obj
+ * by wire method.
+ *
+ * @param master_pub public key to use to verify signatures, NULL to not verify
+ * @param obj wire information as encoded in the 
#TALER_EXCHANGE_WireResultCallback
+ * @param cb callback to invoke for the fees
+ * @param cb_cls closure for @a cb
+ * @return #GNUNET_OK in success, #GNUNET_SYSERR if @a obj is ill-formed
+ */
+int
+TALER_EXCHANGE_wire_get_fees (const struct TALER_MasterPublicKeyP *master_pub,
+                              const json_t *obj,
+                              TALER_EXCHANGE_WireFeeCallback cb,
+                              void *cb_cls)
+{
+  const char *wire_method;
+  json_t *value;
+
+  json_object_foreach (((json_t *) obj), wire_method, value)
+  {
+    json_t *fees;
+    size_t num_fees;
+
+    fees = json_object_get (value, "fees");
+    if ( (NULL == fees) ||
+         (! json_is_array (fees)) )
+    {
+      GNUNET_break_op (0);
+      return GNUNET_SYSERR;
+    }
+    num_fees = json_array_size (fees);
+    if (num_fees > 1024)
+    {
+      GNUNET_break_op (0);
+      return GNUNET_SYSERR;
+    }
+    {
+      struct TALER_EXCHANGE_WireAggregateFees af[num_fees + 1];
+
+      for (size_t i=0;i<num_fees;i++)
+      {
+        af[i].next = &af[i+1];
+        if (GNUNET_OK !=
+            parse_json_fees (&af[i],
+                             json_array_get (fees,
+                                             i)))
+        {
+          GNUNET_break_op (0);
+          return GNUNET_SYSERR;
+        }
+        if ( (NULL != master_pub) &&
+             (GNUNET_OK !=
+              check_sig (&af[i],
+                         wire_method,
+                         master_pub)) )
+        {
+          GNUNET_break_op (0);
+          return GNUNET_SYSERR;
+        }
+      }
+      af[num_fees - 1].next = NULL;
+      if (NULL != cb)
+        cb (cb_cls,
+            wire_method,
+            &af[0]);
+    }
+  }
+  return GNUNET_OK;
+}
+
+
 /* end of exchange_api_wire.c */
diff --git a/src/exchange-lib/test_exchange_api.c 
b/src/exchange-lib/test_exchange_api.c
index 7f6e86a..9a57e46 100644
--- a/src/exchange-lib/test_exchange_api.c
+++ b/src/exchange-lib/test_exchange_api.c
@@ -1,6 +1,6 @@
 /*
   This file is part of TALER
-  Copyright (C) 2014, 2015, 2016 GNUnet e.V. and Inria
+  Copyright (C) 2014-2017 GNUnet e.V. and Inria
 
   TALER is free software; you can redistribute it and/or modify it under the
   terms of the GNU General Public License as published by the Free Software
@@ -371,14 +371,9 @@ struct Command
       const char *wire_details;
 
       /**
-       * JSON string describing the contract between the two parties.
+       * JSON string describing what a proposal is about.
        */
-      const char *contract;
-
-      /**
-       * Transaction ID to use.
-       */
-      uint64_t transaction_id;
+      const char *proposal_data;
 
       /**
        * Relative time (to add to 'now') to compute the refund deadline.
@@ -511,6 +506,11 @@ struct Command
        */
       const char *format;
 
+      /**
+       * Expected wire fee.
+       */
+      const char *expected_fee;
+
     } wire;
 
     /**
@@ -545,6 +545,12 @@ struct Command
        */
       const char *total_amount_expected;
 
+      /**
+       * What is the expected wire fee? Only used if
+       * @e expected_response_code was #MHD_HTTP_OK.
+       */
+      const char *wire_fee_expected;
+
 
       /* TODO: may want to add list of deposits we expected
          to see aggregated here in the future. */
@@ -610,6 +616,11 @@ struct Command
       uint64_t account_credit;
 
       /**
+       * Which exchange base URL is expected?
+       */
+      const char *exchange_base_url;
+
+      /**
        * Set (!) to the wire transfer identifier observed.
        */
       struct TALER_WireTransferIdentifierRawP wtid;
@@ -630,7 +641,7 @@ struct Command
 
       /**
        * Reference to the corresponding deposit operation.
-       * Used to obtain contract details, merchant keys,
+       * Used to obtain proposal details, merchant keys,
        * fee structure, etc.
        */
       const char *deposit_ref;
@@ -749,6 +760,8 @@ interpreter_run (void *cls);
 static void
 next_command (struct InterpreterState *is)
 {
+  if (GNUNET_SYSERR == result)
+    return; /* ignore, we already failed! */
   is->ip++;
   is->task = GNUNET_SCHEDULER_add_now (&interpreter_run,
                                        is);
@@ -911,9 +924,10 @@ reserve_status_cb (void *cls,
                (0 == strcmp (cmd->details.reserve_status.reserve_reference,
                              
rel->details.admin_add_incoming.reserve_reference) ) ) )
         {
-          if (GNUNET_OK !=
-              compare_admin_add_incoming_history (&history[j],
-                                                  rel))
+          if ( (j >= history_length) ||
+               (GNUNET_OK !=
+                compare_admin_add_incoming_history (&history[j],
+                                                    rel)) )
           {
             GNUNET_break (0);
             fail (is);
@@ -926,9 +940,10 @@ reserve_status_cb (void *cls,
         if (0 == strcmp (cmd->details.reserve_status.reserve_reference,
                          rel->details.reserve_withdraw.reserve_reference))
         {
-          if (GNUNET_OK !=
-              compare_reserve_withdraw_history (&history[j],
-                                                rel))
+          if ( (j >= history_length) ||
+               (GNUNET_OK !=
+                compare_reserve_withdraw_history (&history[j],
+                                                  rel)) )
           {
             GNUNET_break (0);
             fail (is);
@@ -1344,6 +1359,51 @@ find_pk (const struct TALER_EXCHANGE_Keys *keys,
 
 
 /**
+ * Function called with information about the wire fees
+ * for each wire method.
+ *
+ * @param cls closure
+ * @param wire_method name of the wire method (i.e. "sepa")
+ * @param fees fee structure for this method
+ */
+static void
+check_fee_cb (void *cls,
+              const char *wire_method,
+              const struct TALER_EXCHANGE_WireAggregateFees *fees)
+{
+  struct InterpreterState *is = cls;
+  struct Command *cmd = &is->commands[is->ip];
+  struct TALER_Amount expected_amount;
+
+  GNUNET_break ( (0 == strcasecmp ("test",
+                                   wire_method)) ||
+                 (0 == strcasecmp ("sepa",
+                                   wire_method)) );
+  if (GNUNET_OK !=
+      TALER_string_to_amount (cmd->details.wire.expected_fee,
+                              &expected_amount))
+  {
+    GNUNET_break (0);
+    fail (is);
+    return;
+  }
+  while (NULL != fees)
+  {
+    if (0 != TALER_amount_cmp (&fees->wire_fee,
+                               &expected_amount))
+    {
+      GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                  "Wire fee missmatch to command %s\n",
+                  cmd->label);
+      fail (is);
+      return;
+    }
+    fees = fees->next;
+  }
+}
+
+
+/**
  * Callbacks called with the result(s) of a
  * wire format inquiry request to the exchange.
  *
@@ -1392,6 +1452,19 @@ wire_cb (void *cls,
         fail (is);
         return;
       }
+      if (GNUNET_OK !=
+          TALER_EXCHANGE_wire_get_fees (&TALER_EXCHANGE_get_keys 
(exchange)->master_pub,
+                                        obj,
+                                        &check_fee_cb,
+                                        is))
+      {
+        GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                    "Wire fee extraction in command %s failed\n",
+                    cmd->label);
+        json_dumpf (obj, stderr, 0);
+        fail (is);
+        return;
+      }
     }
     break;
   default:
@@ -1415,6 +1488,7 @@ wire_cb (void *cls,
  * @param execution_time time when the exchange claims to have performed the 
wire transfer
  * @param total_amount total amount of the wire transfer, or NULL if the 
exchange could
  *             not provide any @a wtid (set only if @a http_status is 
#MHD_HTTP_OK)
+ * @param wire_fee wire fee that was charged by the exchange
  * @param details_length length of the @a details array
  * @param details array with details about the combined transactions
  */
@@ -1427,6 +1501,7 @@ wire_deposits_cb (void *cls,
                   const struct GNUNET_HashCode *h_wire,
                   struct GNUNET_TIME_Absolute execution_time,
                   const struct TALER_Amount *total_amount,
+                  const struct TALER_Amount *wire_fee,
                   unsigned int details_length,
                   const struct TALER_TrackTransferDetails *details)
 {
@@ -1467,6 +1542,24 @@ wire_deposits_cb (void *cls,
       fail (is);
       return;
     }
+    if (GNUNET_OK !=
+        TALER_string_to_amount (cmd->details.wire_deposits.wire_fee_expected,
+                                &expected_amount))
+    {
+      GNUNET_break (0);
+      fail (is);
+      return;
+    }
+    if (0 != TALER_amount_cmp (wire_fee,
+                               &expected_amount))
+    {
+      GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                  "Wire fee missmatch to command %s\n",
+                  cmd->label);
+      json_dumpf (json, stderr, 0);
+      fail (is);
+      return;
+    }
     ref = find_command (is,
                         cmd->details.wire_deposits.wtid_ref);
     GNUNET_assert (NULL != ref);
@@ -1595,6 +1688,12 @@ deposit_wtid_cb (void *cls,
       }
     }
     break;
+  case MHD_HTTP_ACCEPTED:
+    /* allowed, nothing to check here */
+    break;
+  case MHD_HTTP_NOT_FOUND:
+    /* allowed, nothing to check here */
+    break;
   default:
     GNUNET_break (0);
     break;
@@ -1874,7 +1973,7 @@ interpreter_run (void *cls)
     return;
   case OC_DEPOSIT:
     {
-      struct GNUNET_HashCode h_contract;
+      struct GNUNET_HashCode h_proposal_data;
       const struct TALER_CoinSpendPrivateKeyP *coin_priv;
       const struct TALER_EXCHANGE_DenomPublicKey *coin_pk;
       const struct TALER_DenominationSignature *coin_pk_sig;
@@ -1885,7 +1984,7 @@ interpreter_run (void *cls)
       struct GNUNET_TIME_Absolute timestamp;
       struct GNUNET_CRYPTO_EddsaPrivateKey *priv;
       struct TALER_MerchantPublicKeyP merchant_pub;
-      json_t *contract;
+      json_t *proposal_data;
       json_t *wire;
 
       GNUNET_assert (NULL !=
@@ -1928,22 +2027,22 @@ interpreter_run (void *cls)
         fail (is);
         return;
       }
-      contract = json_loads (cmd->details.deposit.contract,
+      proposal_data = json_loads (cmd->details.deposit.proposal_data,
                              JSON_REJECT_DUPLICATES,
                              NULL);
-      if (NULL == contract)
+      if (NULL == proposal_data)
       {
         GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                    "Failed to parse contract details `%s' at %u/%s\n",
-                    cmd->details.deposit.contract,
+                    "Failed to parse proposal data `%s' at %u/%s\n",
+                    cmd->details.deposit.proposal_data,
                     is->ip,
                     cmd->label);
         fail (is);
         return;
       }
-      TALER_JSON_hash (contract,
-                       &h_contract);
-      json_decref (contract);
+      TALER_JSON_hash (proposal_data,
+                       &h_proposal_data);
+      json_decref (proposal_data);
       wire = json_loads (cmd->details.deposit.wire_details,
                          JSON_REJECT_DUPLICATES,
                          NULL);
@@ -1986,12 +2085,11 @@ interpreter_run (void *cls)
         memset (&dr, 0, sizeof (dr));
         dr.purpose.size = htonl (sizeof (struct TALER_DepositRequestPS));
         dr.purpose.purpose = htonl (TALER_SIGNATURE_WALLET_COIN_DEPOSIT);
-        dr.h_contract = h_contract;
+        dr.h_proposal_data = h_proposal_data;
         TALER_JSON_hash (wire,
                          &dr.h_wire);
         dr.timestamp = GNUNET_TIME_absolute_hton (timestamp);
         dr.refund_deadline = GNUNET_TIME_absolute_hton (refund_deadline);
-        dr.transaction_id = GNUNET_htonll 
(cmd->details.deposit.transaction_id);
         TALER_amount_hton (&dr.amount_with_fee,
                            &amount);
         TALER_amount_hton (&dr.deposit_fee,
@@ -2008,12 +2106,11 @@ interpreter_run (void *cls)
                                   &amount,
                                   wire_deadline,
                                   wire,
-                                  &h_contract,
+                                  &h_proposal_data,
                                   &coin_pub,
                                   coin_pk_sig,
                                   &coin_pk->key,
                                   timestamp,
-                                  cmd->details.deposit.transaction_id,
                                   &merchant_pub,
                                   refund_deadline,
                                   &coin_sig,
@@ -2201,9 +2298,9 @@ interpreter_run (void *cls)
   case OC_DEPOSIT_WTID:
     {
       struct GNUNET_HashCode h_wire;
-      struct GNUNET_HashCode h_contract;
+      struct GNUNET_HashCode h_proposal_data;
       json_t *wire;
-      json_t *contract;
+      json_t *proposal_data;
       const struct Command *coin;
       struct TALER_CoinSpendPublicKeyP coin_pub;
 
@@ -2223,22 +2320,21 @@ interpreter_run (void *cls)
       TALER_JSON_hash (wire,
                        &h_wire);
       json_decref (wire);
-      contract = json_loads (ref->details.deposit.contract,
+      proposal_data = json_loads (ref->details.deposit.proposal_data,
                              JSON_REJECT_DUPLICATES,
                              NULL);
-      GNUNET_assert (NULL != contract);
-      TALER_JSON_hash (contract,
-                       &h_contract);
-      json_decref (contract);
+      GNUNET_assert (NULL != proposal_data);
+      TALER_JSON_hash (proposal_data,
+                       &h_proposal_data);
+      json_decref (proposal_data);
       cmd->details.deposit_wtid.dwh
-        = TALER_EXCHANGE_track_transaction (exchange,
-                                       &ref->details.deposit.merchant_priv,
-                                       &h_wire,
-                                       &h_contract,
-                                       &coin_pub,
-                                       ref->details.deposit.transaction_id,
-                                       &deposit_wtid_cb,
-                                       is);
+          = TALER_EXCHANGE_track_transaction (exchange,
+                                              
&ref->details.deposit.merchant_priv,
+                                              &h_wire,
+                                              &h_proposal_data,
+                                              &coin_pub,
+                                              &deposit_wtid_cb,
+                                              is);
     }
     return;
   case OC_RUN_AGGREGATOR:
@@ -2282,10 +2378,11 @@ interpreter_run (void *cls)
       }
       if (GNUNET_OK !=
           TALER_FAKEBANK_check (fakebank,
-                          &amount,
-                          cmd->details.check_bank_transfer.account_debit,
-                          cmd->details.check_bank_transfer.account_credit,
-                          &cmd->details.check_bank_transfer.wtid))
+                                &amount,
+                                cmd->details.check_bank_transfer.account_debit,
+                                
cmd->details.check_bank_transfer.account_credit,
+                                
cmd->details.check_bank_transfer.exchange_base_url,
+                                &cmd->details.check_bank_transfer.wtid))
       {
         GNUNET_break (0);
         fail (is);
@@ -2309,8 +2406,8 @@ interpreter_run (void *cls)
   case OC_REFUND:
     {
       const struct Command *coin;
-      struct GNUNET_HashCode h_contract;
-      json_t *contract;
+      struct GNUNET_HashCode h_proposal_data;
+      json_t *proposal_data;
       struct TALER_CoinSpendPublicKeyP coin_pub;
       struct TALER_Amount refund_fee;
 
@@ -2339,13 +2436,13 @@ interpreter_run (void *cls)
       ref = find_command (is,
                           cmd->details.refund.deposit_ref);
       GNUNET_assert (NULL != ref);
-      contract = json_loads (ref->details.deposit.contract,
+      proposal_data = json_loads (ref->details.deposit.proposal_data,
                              JSON_REJECT_DUPLICATES,
                              NULL);
-      GNUNET_assert (NULL != contract);
-      TALER_JSON_hash (contract,
-                       &h_contract);
-      json_decref (contract);
+      GNUNET_assert (NULL != proposal_data);
+      TALER_JSON_hash (proposal_data,
+                       &h_proposal_data);
+      json_decref (proposal_data);
 
       coin = find_command (is,
                            ref->details.deposit.coin_ref);
@@ -2357,8 +2454,7 @@ interpreter_run (void *cls)
         = TALER_EXCHANGE_refund (exchange,
                                  &amount,
                                  &refund_fee,
-                                 &h_contract,
-                                 ref->details.deposit.transaction_id,
+                                 &h_proposal_data,
                                  &coin_pub,
                                  cmd->details.refund.rtransaction_id,
                                  &ref->details.deposit.merchant_priv,
@@ -2719,14 +2815,16 @@ run (void *cls)
       .label = "wire-test",
       /* expecting 'test' method in response */
       .expected_response_code = MHD_HTTP_OK,
-      .details.wire.format = "test" },
+      .details.wire.format = "test",
+      .details.wire.expected_fee = "EUR:0.01" },
 #endif
 #if WIRE_SEPA
     { .oc = OC_WIRE,
       .label = "wire-sepa",
       /* expecting 'sepa' method in response */
       .expected_response_code = MHD_HTTP_OK,
-      .details.wire.format = "sepa" },
+      .details.wire.format = "sepa",
+      .details.wire.expected_fee = "EUR:0.01" },
 #endif
     /* *************** end of /wire testing ************** */
 
@@ -2761,8 +2859,7 @@ run (void *cls)
       .details.deposit.amount = "EUR:5",
       .details.deposit.coin_ref = "withdraw-coin-1",
       .details.deposit.wire_details = "{ \"type\":\"test\", 
\"bank_uri\":\"http://localhost:8082/\";, \"account_number\":42  }",
-      .details.deposit.contract = "{ \"items\": [ { \"name\":\"ice cream\", 
\"value\":1 } ] }",
-      .details.deposit.transaction_id = 1 },
+      .details.deposit.proposal_data = "{ \"items\": [ { \"name\":\"ice 
cream\", \"value\":1 } ] }" },
 
     /* Try to overdraw funds ... */
     { .oc = OC_WITHDRAW_SIGN,
@@ -2778,8 +2875,7 @@ run (void *cls)
       .details.deposit.amount = "EUR:5",
       .details.deposit.coin_ref = "withdraw-coin-1",
       .details.deposit.wire_details = "{ \"type\":\"test\", 
\"bank_uri\":\"http://localhost:8082/\";, \"account_number\":43  }",
-      .details.deposit.contract = "{ \"items\": [ { \"name\":\"ice cream\", 
\"value\":1 } ] }",
-      .details.deposit.transaction_id = 1 },
+      .details.deposit.proposal_data = "{ \"items\": [ { \"name\":\"ice 
cream\", \"value\":1 } ] }" },
     /* Try to double-spend the 5 EUR coin at the same merchant (but different
        transaction ID) */
     { .oc = OC_DEPOSIT,
@@ -2788,18 +2884,16 @@ run (void *cls)
       .details.deposit.amount = "EUR:5",
       .details.deposit.coin_ref = "withdraw-coin-1",
       .details.deposit.wire_details = "{ \"type\":\"test\", 
\"bank_uri\":\"http://localhost:8082/\";, \"account_number\":42  }",
-      .details.deposit.contract = "{ \"items\": [ { \"name\":\"ice cream\", 
\"value\":1 } ] }",
-      .details.deposit.transaction_id = 2 },
+      .details.deposit.proposal_data = "{ \"items\": [ { \"name\":\"ice 
cream\", \"value\":1 } ] }" },
     /* Try to double-spend the 5 EUR coin at the same merchant (but different
-       contract) */
+       proposal) */
     { .oc = OC_DEPOSIT,
       .label = "deposit-double-3",
       .expected_response_code = MHD_HTTP_FORBIDDEN,
       .details.deposit.amount = "EUR:5",
       .details.deposit.coin_ref = "withdraw-coin-1",
       .details.deposit.wire_details = "{ \"type\":\"test\", 
\"bank_uri\":\"http://localhost:8082/\";, \"account_number\":42  }",
-      .details.deposit.contract = "{ \"items\":[{ \"name\":\"ice cream\", 
\"value\":2 } ] }",
-      .details.deposit.transaction_id = 1 },
+      .details.deposit.proposal_data = "{ \"items\":[{ \"name\":\"ice cream\", 
\"value\":2 } ] }" },
 
     /* ***************** /refresh testing ******************** */
 
@@ -2824,8 +2918,7 @@ run (void *cls)
       .details.deposit.amount = "EUR:1",
       .details.deposit.coin_ref = "refresh-withdraw-coin-1",
       .details.deposit.wire_details = "{ \"type\":\"test\", 
\"bank_uri\":\"http://localhost:8082/\";, \"account_number\":42  }",
-      .details.deposit.contract = "{ \"items\" : [ { \"name\":\"ice cream\", 
\"value\":\"EUR:1\" } ] }",
-      .details.deposit.transaction_id = 42421 },
+      .details.deposit.proposal_data = "{ \"items\" : [ { \"name\":\"ice 
cream\", \"value\":\"EUR:1\" } ] }" },
 
     /* Melt the rest of the coin's value (EUR:4.00 = 3x EUR:1.03 + 7x 
EUR:0.13) */
 
@@ -2866,8 +2959,7 @@ run (void *cls)
       .details.deposit.coin_ref = "refresh-reveal-1-idempotency",
       .details.deposit.coin_idx = 0,
       .details.deposit.wire_details = "{ \"type\":\"test\", 
\"bank_uri\":\"http://localhost:8082/\";, \"account_number\":42  }",
-      .details.deposit.contract = "{ \"items\": [ { \"name\":\"ice cream\", 
\"value\":3 } ] }",
-      .details.deposit.transaction_id = 2 },
+      .details.deposit.proposal_data = "{ \"items\": [ { \"name\":\"ice 
cream\", \"value\":3 } ] }" },
 
     /* Test successfully spending coins from the refresh operation:
        finally EUR:0.1 */
@@ -2878,8 +2970,7 @@ run (void *cls)
       .details.deposit.coin_ref = "refresh-reveal-1",
       .details.deposit.coin_idx = 4,
       .details.deposit.wire_details = "{ \"type\":\"test\", 
\"bank_uri\":\"http://localhost:8082/\";, \"account_number\":43  }",
-      .details.deposit.contract = "{ \"items\": [ { \"name\":\"ice cream\", 
\"value\":3 } ] }",
-      .details.deposit.transaction_id = 2 },
+      .details.deposit.proposal_data = "{ \"items\": [ { \"name\":\"ice 
cream\", \"value\":3 } ] }" },
 
     /* Test running a failing melt operation (same operation again must fail) 
*/
     { .oc = OC_REFRESH_MELT,
@@ -2924,25 +3015,29 @@ run (void *cls)
 
     { .oc = OC_CHECK_BANK_TRANSFER,
       .label = "check_bank_transfer-499c",
-      .details.check_bank_transfer.amount = "EUR:4.99",
+      .details.check_bank_transfer.exchange_base_url = "https://exchange.com/";,
+      .details.check_bank_transfer.amount = "EUR:4.98",
       .details.check_bank_transfer.account_debit = 2,
       .details.check_bank_transfer.account_credit = 42
     },
     { .oc = OC_CHECK_BANK_TRANSFER,
       .label = "check_bank_transfer-99c1",
-      .details.check_bank_transfer.amount = "EUR:0.99",
+      .details.check_bank_transfer.exchange_base_url = "https://exchange.com/";,
+      .details.check_bank_transfer.amount = "EUR:0.98",
       .details.check_bank_transfer.account_debit = 2,
       .details.check_bank_transfer.account_credit = 42
     },
     { .oc = OC_CHECK_BANK_TRANSFER,
       .label = "check_bank_transfer-99c2",
-      .details.check_bank_transfer.amount = "EUR:0.99",
+      .details.check_bank_transfer.exchange_base_url = "https://exchange.com/";,
+      .details.check_bank_transfer.amount = "EUR:0.98",
       .details.check_bank_transfer.account_debit = 2,
       .details.check_bank_transfer.account_credit = 42
     },
     { .oc = OC_CHECK_BANK_TRANSFER,
       .label = "check_bank_transfer-9c",
-      .details.check_bank_transfer.amount = "EUR:0.09",
+      .details.check_bank_transfer.exchange_base_url = "https://exchange.com/";,
+      .details.check_bank_transfer.amount = "EUR:0.08",
       .details.check_bank_transfer.account_debit = 2,
       .details.check_bank_transfer.account_credit = 43
     },
@@ -2957,16 +3052,18 @@ run (void *cls)
       .details.deposit_wtid.bank_transfer_ref = "check_bank_transfer-499c" },
 
     { .oc = OC_WIRE_DEPOSITS,
-      .label = "wire-deposits-sucess-bank",
+      .label = "wire-deposits-success-bank",
       .expected_response_code = MHD_HTTP_OK,
       .details.wire_deposits.wtid_ref = "check_bank_transfer-99c1",
-      .details.wire_deposits.total_amount_expected = "EUR:0.99" },
+      .details.wire_deposits.total_amount_expected = "EUR:0.98",
+      .details.wire_deposits.wire_fee_expected = "EUR:0.01"  },
 
     { .oc = OC_WIRE_DEPOSITS,
-      .label = "wire-deposits-sucess-wtid",
+      .label = "wire-deposits-success-wtid",
       .expected_response_code = MHD_HTTP_OK,
       .details.wire_deposits.wtid_ref = "deposit-wtid-ok",
-      .details.wire_deposits.total_amount_expected = "EUR:4.99" },
+      .details.wire_deposits.total_amount_expected = "EUR:4.98",
+      .details.wire_deposits.wire_fee_expected = "EUR:0.01"  },
 
     /* ************** End of tracking API testing************* */
 
@@ -2994,8 +3091,7 @@ run (void *cls)
       .details.deposit.amount = "EUR:5",
       .details.deposit.coin_ref = "withdraw-coin-r1",
       .details.deposit.wire_details = "{ \"type\":\"test\", 
\"bank_uri\":\"http://localhost:8082/\";, \"account_number\":42  }",
-      .details.deposit.contract = "{ \"items\" : [ { \"name\":\"ice cream\", 
\"value\":\"EUR:5\" } ] }",
-      .details.deposit.transaction_id = 424210,
+      .details.deposit.proposal_data = "{ \"items\" : [ { \"name\":\"ice 
cream\", \"value\":\"EUR:5\" } ] }",
       .details.deposit.refund_deadline = { 60LL * 1000 * 1000 } /* 60 s */,
     },
     /* Run transfers. Should do nothing as refund deadline blocks it */
@@ -3011,7 +3107,6 @@ run (void *cls)
       .details.refund.amount = "EUR:5",
       .details.refund.fee = "EUR:0.01",
       .details.refund.deposit_ref = "deposit-refund-1",
-      .details.refund.rtransaction_id = 1
     },
     /* Spend 4.99 EUR of the refunded 4.99 EUR coin (1ct gone due to refund)
        (merchant would receive EUR:4.98 due to 1 ct deposit fee) */
@@ -3021,8 +3116,7 @@ run (void *cls)
       .details.deposit.amount = "EUR:4.99",
       .details.deposit.coin_ref = "withdraw-coin-r1",
       .details.deposit.wire_details = "{ \"type\":\"test\", 
\"bank_uri\":\"http://localhost:8082/\";, \"account_number\":42  }",
-      .details.deposit.contract = "{ \"items\" : [ { \"name\":\"more ice 
cream\", \"value\":\"EUR:5\" } ] }",
-      .details.deposit.transaction_id = 424211,
+      .details.deposit.proposal_data = "{ \"items\" : [ { \"name\":\"more ice 
cream\", \"value\":\"EUR:5\" } ] }",
     },
     /* Run transfers. This will do the transfer as refund deadline was 0 */
     { .oc = OC_RUN_AGGREGATOR,
@@ -3030,7 +3124,8 @@ run (void *cls)
     /* Check that deposit did run */
     { .oc = OC_CHECK_BANK_TRANSFER,
       .label = "check_bank_transfer-pre-refund",
-      .details.check_bank_transfer.amount = "EUR:4.98",
+      .details.check_bank_transfer.exchange_base_url = "https://exchange.com/";,
+      .details.check_bank_transfer.amount = "EUR:4.97",
       .details.check_bank_transfer.account_debit = 2,
       .details.check_bank_transfer.account_credit = 42
     },
@@ -3041,7 +3136,6 @@ run (void *cls)
       .details.refund.amount = "EUR:4.99",
       .details.refund.fee = "EUR:0.01",
       .details.refund.deposit_ref = "deposit-refund-2",
-      .details.refund.rtransaction_id = 2
     },
 
 #endif
@@ -3085,6 +3179,7 @@ main (int argc,
   struct GNUNET_SIGNAL_Context *shc_chld;
   enum GNUNET_OS_ProcessStatusType type;
   unsigned long code;
+  unsigned int iter;
 
   /* These might get in the way... */
   unsetenv ("XDG_DATA_HOME");
@@ -3099,6 +3194,12 @@ main (int argc,
                                   "taler-exchange-keyup",
                                   "-c", "test_exchange_api.conf",
                                   NULL);
+  if (NULL == proc)
+  {
+    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+               "Failed to run `taler-exchange-keyup`, is your PATH 
correct?\n");
+    return 77;
+  }
   GNUNET_OS_process_wait (proc);
   GNUNET_OS_process_destroy (proc);
   proc = GNUNET_OS_start_process (GNUNET_NO,
@@ -3109,6 +3210,12 @@ main (int argc,
                                   "-c", "test_exchange_api.conf",
                                   "-r",
                                   NULL);
+  if (NULL == proc)
+  {
+    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+               "Failed to run `taler-exchange-dbinit`, is your PATH 
correct?\n");
+    return 77;
+  }
   if (GNUNET_SYSERR ==
       GNUNET_OS_process_wait_status (proc,
                                      &type,
@@ -3130,7 +3237,7 @@ main (int argc,
        (0 != code) )
   {
     fprintf (stderr,
-             "Unexpected error running taler-exchange-dbinit!\n");
+             "Unexpected error running `taler-exchange-dbinit'!\n");
     return 1;
   }
   exchanged = GNUNET_OS_start_process (GNUNET_NO,
@@ -3139,21 +3246,33 @@ main (int argc,
                                        "taler-exchange-httpd",
                                        "taler-exchange-httpd",
                                        "-c", "test_exchange_api.conf",
+                                       "-i",
                                        NULL);
   /* give child time to start and bind against the socket */
   fprintf (stderr,
-           "Waiting for taler-exchange-httpd to be ready");
+           "Waiting for `taler-exchange-httpd' to be ready");
+  iter = 0;
   do
     {
+      if (10 == iter)
+      {
+       fprintf (stderr,
+                "Failed to launch `taler-exchange-httpd' (or `wget')\n");
+       GNUNET_OS_process_kill (exchanged,
+                               SIGTERM);
+       GNUNET_OS_process_wait (exchanged);
+       GNUNET_OS_process_destroy (exchanged);
+       return 77;
+      }
       fprintf (stderr, ".");
       sleep (1);
+      iter++;
     }
   while (0 != system ("wget -q -t 1 -T 1 http://127.0.0.1:8081/keys -o 
/dev/null -O /dev/null"));
   fprintf (stderr, "\n");
-  result = GNUNET_SYSERR;
+  result = GNUNET_NO;
   sigpipe = GNUNET_DISK_pipe (GNUNET_NO, GNUNET_NO, GNUNET_NO, GNUNET_NO);
   GNUNET_assert (NULL != sigpipe);
-  sleep (30);
   shc_chld = GNUNET_SIGNAL_handler_install (GNUNET_SIGCHLD,
                                             &sighandler_child_death);
   GNUNET_SCHEDULER_run (&run, NULL);
diff --git a/src/exchange-lib/test_exchange_api.conf 
b/src/exchange-lib/test_exchange_api.conf
index 03dd6f9..42861ea 100644
--- a/src/exchange-lib/test_exchange_api.conf
+++ b/src/exchange-lib/test_exchange_api.conf
@@ -10,11 +10,6 @@ CURRENCY = EUR
 
 [exchange]
 
-# Wire format supported by the exchange
-# We use 'test' for testing of the actual
-# coin operations, and 'sepa' to test SEPA-specific routines.
-WIREFORMAT = test sepa
-
 # HTTP port the exchange listens to
 PORT = 8081
 
@@ -24,17 +19,53 @@ MASTER_PUBLIC_KEY = 
98NJW3CQHZQGQXTY3K85K531XKPAPAVV4Q5V8PYYRR00NJGZWNVG
 # How to access our database
 DB = postgres
 
-# Is this is a testcase, use transient DB actions?
-TESTRUN = YES
+# Base URL of the exchange. Note that the test expects exactly this
+# value in the wire transfers.
+BASE_URL = "https://exchange.com/";
 
 [exchangedb-postgres]
 DB_CONN_STR = "postgres:///talercheck"
 
+[exchange-wire-sepa]
+# Enable 'sepa' to test SEPA-specific routines.
+ENABLE = YES
+
+# Fees for the forseeable future...
+# If you see this after 2017, update to match the next 10 years...
+WIRE-FEE-2017 = EUR:0.01
+WIRE-FEE-2018 = EUR:0.01
+WIRE-FEE-2019 = EUR:0.01
+WIRE-FEE-2020 = EUR:0.01
+WIRE-FEE-2021 = EUR:0.01
+WIRE-FEE-2022 = EUR:0.01
+WIRE-FEE-2023 = EUR:0.01
+WIRE-FEE-2024 = EUR:0.01
+WIRE-FEE-2025 = EUR:0.01
+WIRE-FEE-2026 = EUR:0.01
+
 [exchange-wire-incoming-sepa]
 # This is the response we give out for the /wire request.  It provides
 # wallets with the bank information for transfers to the exchange.
 SEPA_RESPONSE_FILE = ${TALER_CONFIG_HOME}/sepa.json
 
+[exchange-wire-test]
+# Enable 'test' for testing of the actual coin operations.
+ENABLE = YES
+
+# Fees for the forseeable future...
+# If you see this after 2017, update to match the next 10 years...
+WIRE-FEE-2017 = EUR:0.01
+WIRE-FEE-2018 = EUR:0.01
+WIRE-FEE-2019 = EUR:0.01
+WIRE-FEE-2020 = EUR:0.01
+WIRE-FEE-2021 = EUR:0.01
+WIRE-FEE-2022 = EUR:0.01
+WIRE-FEE-2023 = EUR:0.01
+WIRE-FEE-2024 = EUR:0.01
+WIRE-FEE-2025 = EUR:0.01
+WIRE-FEE-2026 = EUR:0.01
+
+
 [exchange-wire-incoming-test]
 # This is the response we give out for the /wire request.  It provides
 # wallets with the bank information for transfers to the exchange.
diff --git a/src/exchange-tools/Makefile.am b/src/exchange-tools/Makefile.am
index 9c2580e..60b2cc2 100644
--- a/src/exchange-tools/Makefile.am
+++ b/src/exchange-tools/Makefile.am
@@ -25,6 +25,7 @@ taler_exchange_keyup_LDADD = \
   $(LIBGCRYPT_LIBS) \
   $(top_builddir)/src/util/libtalerutil.la \
   $(top_builddir)/src/pq/libtalerpq.la \
+  $(top_builddir)/src/wire/libtalerwire.la \
   $(top_builddir)/src/exchangedb/libtalerexchangedb.la \
   -lgnunetutil $(XLIB)
 taler_exchange_keyup_LDFLAGS = $(POSTGRESQL_LDFLAGS)
diff --git a/src/exchange-tools/taler-exchange-keyup.c 
b/src/exchange-tools/taler-exchange-keyup.c
index 9e2500d..f14e28b 100644
--- a/src/exchange-tools/taler-exchange-keyup.c
+++ b/src/exchange-tools/taler-exchange-keyup.c
@@ -1,6 +1,6 @@
 /*
   This file is part of TALER
-  Copyright (C) 2014, 2015, 2016 GNUnet e.V.
+  Copyright (C) 2014-2017 GNUnet e.V.
 
   TALER is free software; you can redistribute it and/or modify it under the
   terms of the GNU General Public License as published by the Free Software
@@ -23,6 +23,7 @@
  */
 #include <platform.h>
 #include "taler_exchangedb_lib.h"
+#include "taler_wire_lib.h"
 
 /**
  * When generating filenames from a cryptographic hash, we do not use
@@ -189,6 +190,11 @@ static char *exchange_directory;
 static char *pretend_time_str;
 
 /**
+ * Directory where we should write the wire transfer fee structure.
+ */
+static char *feedir;
+
+/**
  * Handle to the exchange's configuration
  */
 static const struct GNUNET_CONFIGURATION_Handle *kcfg;
@@ -215,6 +221,11 @@ static struct TALER_MasterPublicKeyP master_public_key;
 static struct GNUNET_TIME_Absolute lookahead_sign_stamp;
 
 /**
+ * Largest duration for spending of any key.
+ */
+static struct GNUNET_TIME_Relative max_duration_spend;
+
+/**
  * Return value from main().
  */
 static int global_ret;
@@ -598,6 +609,8 @@ get_cointype_params (const char *ct,
     return GNUNET_SYSERR;
   }
   GNUNET_TIME_round_rel (&params->duration_spend);
+  max_duration_spend = GNUNET_TIME_relative_max (max_duration_spend,
+                                                 params->duration_spend);
   if (GNUNET_OK !=
       GNUNET_CONFIGURATION_get_value_time (kcfg,
                                            ct,
@@ -818,7 +831,7 @@ exchange_keys_update_cointype (void *cls,
       return;
     }
     if ( (NULL != auditor_output_file) &&
-         (sizeof (denomkey_issue.issue.properties) !=
+         (1 !=
           fwrite (&denomkey_issue.issue.properties,
                   sizeof (struct TALER_DenominationKeyValidityPS),
                   1,
@@ -862,6 +875,155 @@ exchange_keys_update_denomkeys ()
 
 
 /**
+ * Sign @a af with @a priv
+ *
+ * @param[in|out] af fee structure to sign
+ * @param wireplugin name of the plugin for which we sign
+ * @param priv private key to use for signing
+ */
+static void
+sign_af (struct TALER_EXCHANGEDB_AggregateFees *af,
+         const char *wireplugin,
+         const struct GNUNET_CRYPTO_EddsaPrivateKey *priv)
+{
+  struct TALER_MasterWireFeePS wf;
+
+  TALER_EXCHANGEDB_fees_2_wf (wireplugin,
+                              af,
+                              &wf);
+  GNUNET_assert (GNUNET_OK ==
+                 GNUNET_CRYPTO_eddsa_sign (priv,
+                                           &wf.purpose,
+                                           &af->master_sig.eddsa_signature));
+}
+
+
+/**
+ * Output the wire fee structure.  Must be run after #max_duration_spend
+ * was initialized.
+ *
+ * @param cls pointer to `int`, set to #GNUNET_SYSERR on error
+ * @param wiremethod method to write fees for
+ */
+static void
+create_wire_fee_for_method (void *cls,
+                            const char *wiremethod)
+{
+  int *ret = cls;
+  struct TALER_EXCHANGEDB_AggregateFees *af_head;
+  struct TALER_EXCHANGEDB_AggregateFees *af_tail;
+  unsigned int year;
+  struct GNUNET_TIME_Absolute last_date;
+  struct GNUNET_TIME_Absolute start_date;
+  struct GNUNET_TIME_Absolute end_date;
+  char yearstr[12];
+  char *fn;
+  char *section;
+
+  if (GNUNET_OK != *ret)
+    return;
+  last_date = GNUNET_TIME_absolute_add (lookahead_sign_stamp,
+                                        max_duration_spend);
+  GNUNET_asprintf (&section,
+                   "exchange-wire-%s",
+                   wiremethod);
+  GNUNET_asprintf (&fn,
+                   "%s%s.fee",
+                   feedir,
+                   wiremethod);
+  af_head = NULL;
+  af_tail = NULL;
+  year = GNUNET_TIME_get_current_year ();
+  start_date = GNUNET_TIME_year_to_time (year);
+  while (start_date.abs_value_us < last_date.abs_value_us)
+  {
+    struct TALER_EXCHANGEDB_AggregateFees *af;
+    char *opt;
+    char *amounts;
+
+    GNUNET_snprintf (yearstr,
+                     sizeof (yearstr),
+                     "%u",
+                     year);
+    end_date = GNUNET_TIME_year_to_time (year + 1);
+    af = GNUNET_new (struct TALER_EXCHANGEDB_AggregateFees);
+    af->start_date = start_date;
+    af->end_date = end_date;
+    GNUNET_asprintf (&opt,
+                     "wire-fee-%u",
+                     year);
+    if (GNUNET_OK !=
+        GNUNET_CONFIGURATION_get_value_string (kcfg,
+                                               section,
+                                               opt,
+                                               &amounts))
+    {
+      GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
+                                 section,
+                                 opt);
+      *ret = GNUNET_SYSERR;
+      GNUNET_free (opt);
+      break;
+    }
+    if (GNUNET_OK !=
+        TALER_string_to_amount (amounts,
+                                &af->wire_fee))
+    {
+      GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                  "Invalid amount `%s' specified in `%s' under `%s'\n",
+                  amounts,
+                  wiremethod,
+                  opt);
+      *ret = GNUNET_SYSERR;
+      GNUNET_free (amounts);
+      GNUNET_free (opt);
+      break;
+    }
+    GNUNET_free (amounts);
+    GNUNET_free (opt);
+    sign_af (af,
+             wiremethod,
+             &master_priv.eddsa_priv);
+    if (NULL == af_tail)
+      af_head = af;
+    else
+      af_tail->next = af;
+    af_tail = af;
+    start_date = end_date;
+    year++;
+  }
+  if ( (GNUNET_OK == *ret) &&
+       (GNUNET_OK !=
+        TALER_EXCHANGEDB_fees_write (fn,
+                                     wiremethod,
+                                     af_head)) )
+    *ret = GNUNET_SYSERR;
+  GNUNET_free (section);
+  GNUNET_free (fn);
+  TALER_EXCHANGEDB_fees_free (af_head);
+}
+
+
+/**
+ * Output the wire fee structure.  Must be run after #max_duration_spend
+ * was initialized.
+ *
+ * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
+ */
+static int
+create_wire_fees ()
+{
+  int ret;
+
+  ret = GNUNET_OK;
+  TALER_WIRE_find_enabled (kcfg,
+                           &create_wire_fee_for_method,
+                           &ret);
+  return ret;
+}
+
+
+/**
  * Main function that will be run.
  *
  * @param cls closure
@@ -896,6 +1058,29 @@ run (void *cls,
   {
     now = GNUNET_TIME_absolute_get ();
   }
+  if (NULL == feedir)
+  {
+    if (GNUNET_OK !=
+        GNUNET_CONFIGURATION_get_value_filename (kcfg,
+                                                 "exchangedb",
+                                                 "WIREFEE_BASE_DIR",
+                                                 &feedir))
+    {
+      fprintf (stderr,
+               "Wire fee directory not given in neither configuration nor 
command-line\n");
+      global_ret = 1;
+      return;
+    }
+  }
+  if (GNUNET_OK !=
+      GNUNET_DISK_directory_create (feedir))
+  {
+    GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR,
+                              "mkdir",
+                              feedir);
+    global_ret = 1;
+    return;
+  }
   GNUNET_TIME_round_abs (&now);
   if ( (NULL == masterkeyfile) &&
        (GNUNET_OK !=
@@ -1022,10 +1207,10 @@ run (void *cls,
     global_ret = 1;
     return;
   }
-  if (NULL != auditor_output_file)
+  if (GNUNET_OK != create_wire_fees ())
   {
-    FCLOSE (auditor_output_file);
-    auditor_output_file = NULL;
+    global_ret = 1;
+    return;
   }
 }
 
@@ -1051,6 +1236,9 @@ main (int argc,
     {'m', "master-key", "FILE",
      "master key file (private key)", 1,
      &GNUNET_GETOPT_set_filename, &masterkeyfile},
+    {'f', "feedir", "DIRNAME",
+     "directory where to write wire transfer fee structure", 1,
+     &GNUNET_GETOPT_set_filename, &feedir},
     {'o', "output", "FILE",
      "auditor denomination key signing request file to create", 1,
      &GNUNET_GETOPT_set_filename, &auditorrequestfile},
@@ -1072,6 +1260,11 @@ main (int argc,
                          options,
                          &run, NULL))
     return 1;
+  if (NULL != auditor_output_file)
+  {
+    FCLOSE (auditor_output_file);
+    auditor_output_file = NULL;
+  }
   return global_ret;
 }
 
diff --git a/src/exchange/afl-tests/id:000001,orig:deposit.req 
b/src/exchange/afl-tests/id:000001,orig:deposit.req
deleted file mode 100644
index ec49075..0000000
--- a/src/exchange/afl-tests/id:000001,orig:deposit.req
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: locst:8081
-Accept: */*
-Content-: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000703,src:000001,op:flip1,pos:34,+cov 
b/src/exchange/afl-tests/id:000703,src:000001,op:flip1,pos:34,+cov
deleted file mode 100644
index 8b8afd5..0000000
--- a/src/exchange/afl-tests/id:000703,src:000001,op:flip1,pos:34,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: locst*8081
-Accept: */*
-Content-: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000704,src:000001,op:flip1,pos:50,+cov 
b/src/exchange/afl-tests/id:000704,src:000001,op:flip1,pos:50,+cov
deleted file mode 100644
index 7a6dce8..0000000
--- a/src/exchange/afl-tests/id:000704,src:000001,op:flip1,pos:50,+cov
+++ /dev/null
@@ -1,9 +0,0 @@
-POST /deposit HTTP/1.1
-Host: locst:8081
-Accept: */
-
-Content-: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000705,src:000001,op:flip1,pos:61,+cov 
b/src/exchange/afl-tests/id:000705,src:000001,op:flip1,pos:61,+cov
deleted file mode 100644
index 91834a9..0000000
--- a/src/exchange/afl-tests/id:000705,src:000001,op:flip1,pos:61,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: locst:8081
-Accept: */*
-Content-:!applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000706,src:000001,op:flip1,pos:91 
b/src/exchange/afl-tests/id:000706,src:000001,op:flip1,pos:91
deleted file mode 100644
index f0774c0..0000000
--- a/src/exchange/afl-tests/id:000706,src:000001,op:flip1,pos:91
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: locst:8081
-Accept: */*
-Content-: applicn/json
-Content-Length: 0658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000707,src:000001,op:flip1,pos:103,+cov 
b/src/exchange/afl-tests/id:000707,src:000001,op:flip1,pos:103,+cov
deleted file mode 100644
index 598ffc9..0000000
--- a/src/exchange/afl-tests/id:000707,src:000001,op:flip1,pos:103,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: locst:8081
-Accept: */*
-Content-: applicn/json
-Content-Length: 1658
-Expect:�100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000708,src:000001,op:flip1,pos:120,+cov 
b/src/exchange/afl-tests/id:000708,src:000001,op:flip1,pos:120,+cov
deleted file mode 100644
index cd08770..0000000
--- a/src/exchange/afl-tests/id:000708,src:000001,op:flip1,pos:120,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: locst:8081
-Accept: */*
-Content-: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"5b_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000709,src:000001,op:flip1,pos:129,+cov 
b/src/exchange/afl-tests/id:000709,src:000001,op:flip1,pos:129,+cov
deleted file mode 100644
index 427ee45..0000000
--- a/src/exchange/afl-tests/id:000709,src:000001,op:flip1,pos:129,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: locst:8081
-Accept: */*
-Content-: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"u1SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000710,src:000001,op:flip1,pos:129,+cov 
b/src/exchange/afl-tests/id:000710,src:000001,op:flip1,pos:129,+cov
deleted file mode 100644
index 546c225..0000000
--- a/src/exchange/afl-tests/id:000710,src:000001,op:flip1,pos:129,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: locst:8081
-Accept: */*
-Content-: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"%1SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000711,src:000001,op:flip1,pos:131,+cov 
b/src/exchange/afl-tests/id:000711,src:000001,op:flip1,pos:131,+cov
deleted file mode 100644
index b097e2a..0000000
--- a/src/exchange/afl-tests/id:000711,src:000001,op:flip1,pos:131,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: locst:8081
-Accept: */*
-Content-: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51CPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000712,src:000001,op:flip1,pos:139,+cov 
b/src/exchange/afl-tests/id:000712,src:000001,op:flip1,pos:139,+cov
deleted file mode 100644
index f3e2920..0000000
--- a/src/exchange/afl-tests/id:000712,src:000001,op:flip1,pos:139,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: locst:8081
-Accept: */*
-Content-: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESgPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000713,src:000001,op:flip1,pos:197,+cov 
b/src/exchange/afl-tests/id:000713,src:000001,op:flip1,pos:197,+cov
deleted file mode 100644
index 74773e9..0000000
--- a/src/exchange/afl-tests/id:000713,src:000001,op:flip1,pos:197,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: locst:8081
-Accept: */*
-Content-: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT42CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000714,src:000001,op:flip1,pos:243,+cov 
b/src/exchange/afl-tests/id:000714,src:000001,op:flip1,pos:243,+cov
deleted file mode 100644
index 38b9232..0000000
--- a/src/exchange/afl-tests/id:000714,src:000001,op:flip1,pos:243,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: locst:8081
-Accept: */*
-Content-: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8Mr4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000715,src:000001,op:flip1,pos:365,+cov 
b/src/exchange/afl-tests/id:000715,src:000001,op:flip1,pos:365,+cov
deleted file mode 100644
index 8a5422a..0000000
--- a/src/exchange/afl-tests/id:000715,src:000001,op:flip1,pos:365,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: locst:8081
-Accept: */*
-Content-: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13QE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000716,src:000001,op:flip1,pos:2 
b/src/exchange/afl-tests/id:000716,src:000001,op:flip1,pos:2
deleted file mode 100644
index bfc0224..0000000
--- a/src/exchange/afl-tests/id:000716,src:000001,op:flip1,pos:2
+++ /dev/null
@@ -1,8 +0,0 @@
-POsT /deposit HTTP/1.1
-Host: localhost:8081
-pt: */*
-Content-Type: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000716,src:000001,op:flip1,pos:456,+cov 
b/src/exchange/afl-tests/id:000716,src:000001,op:flip1,pos:456,+cov
deleted file mode 100644
index 90f879b..0000000
--- a/src/exchange/afl-tests/id:000716,src:000001,op:flip1,pos:456,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: locst:8081
-Accept: */*
-Content-: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSN6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000717,src:000001,op:flip1,pos:50,+cov 
b/src/exchange/afl-tests/id:000717,src:000001,op:flip1,pos:50,+cov
deleted file mode 100644
index 01aca8b..0000000
--- a/src/exchange/afl-tests/id:000717,src:000001,op:flip1,pos:50,+cov
+++ /dev/null
@@ -1,9 +0,0 @@
-POST /deposit HTTP/1.1
-Host: localhost:8081
-pt: */
-
-Content-Type: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000717,src:000001,op:flip1,pos:596 
b/src/exchange/afl-tests/id:000717,src:000001,op:flip1,pos:596
deleted file mode 100644
index e3265d2..0000000
--- a/src/exchange/afl-tests/id:000717,src:000001,op:flip1,pos:596
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: locst:8081
-Accept: */*
-Content-: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","4imestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000718,src:000001,op:flip1,pos:55,+cov 
b/src/exchange/afl-tests/id:000718,src:000001,op:flip1,pos:55,+cov
deleted file mode 100644
index 63295d5..0000000
--- a/src/exchange/afl-tests/id:000718,src:000001,op:flip1,pos:55,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: localhost:8081
-pt: */*
-Con4ent-Type: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000718,src:000001,op:flip1,pos:614,+cov 
b/src/exchange/afl-tests/id:000718,src:000001,op:flip1,pos:614,+cov
deleted file mode 100644
index 37d818c..0000000
--- a/src/exchange/afl-tests/id:000718,src:000001,op:flip1,pos:614,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: locst:8081
-Accept: */*
-Content-: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000719,src:000001,op:flip1,pos:629,+cov 
b/src/exchange/afl-tests/id:000719,src:000001,op:flip1,pos:629,+cov
deleted file mode 100644
index 861e99c..0000000
--- a/src/exchange/afl-tests/id:000719,src:000001,op:flip1,pos:629,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: locst:8081
-Accept: */*
-Content-: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000719,src:000001,op:flip1,pos:95 
b/src/exchange/afl-tests/id:000719,src:000001,op:flip1,pos:95
deleted file mode 100644
index 6f50c2e..0000000
--- a/src/exchange/afl-tests/id:000719,src:000001,op:flip1,pos:95
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: localhost:8081
-pt: */*
-Content-Type: applicn/json
-Content-Length: 0658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000720,src:000001,op:flip1,pos:102,+cov 
b/src/exchange/afl-tests/id:000720,src:000001,op:flip1,pos:102,+cov
deleted file mode 100644
index 9750ed4..0000000
--- a/src/exchange/afl-tests/id:000720,src:000001,op:flip1,pos:102,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: localhost:8081
-pt: */*
-Content-Type: applicn/json
-Content-Length: 1658
-Exqect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000720,src:000001,op:flip1,pos:635,+cov 
b/src/exchange/afl-tests/id:000720,src:000001,op:flip1,pos:635,+cov
deleted file mode 100644
index faf9bbb..0000000
--- a/src/exchange/afl-tests/id:000720,src:000001,op:flip1,pos:635,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: locst:8081
-Accept: */*
-Content-: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000721,src:000001,op:flip1,pos:107,+cov 
b/src/exchange/afl-tests/id:000721,src:000001,op:flip1,pos:107,+cov
deleted file mode 100644
index 410ddd0..0000000
--- a/src/exchange/afl-tests/id:000721,src:000001,op:flip1,pos:107,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: localhost:8081
-pt: */*
-Content-Type: applicn/json
-Content-Length: 1658
-Expect:�100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000721,src:000001,op:flip1,pos:683,+cov 
b/src/exchange/afl-tests/id:000721,src:000001,op:flip1,pos:683,+cov
deleted file mode 100644
index 73f5248..0000000
--- a/src/exchange/afl-tests/id:000721,src:000001,op:flip1,pos:683,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: locst:8081
-Accept: */*
-Content-: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000722,src:000001,op:flip1,pos:118,+cov 
b/src/exchange/afl-tests/id:000722,src:000001,op:flip1,pos:118,+cov
deleted file mode 100644
index b0c0d06..0000000
--- a/src/exchange/afl-tests/id:000722,src:000001,op:flip1,pos:118,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: localhost:8081
-pt: */*
-Content-Type: applicn/json
-Content-Length: 1658
-Expect: 100-continee
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000722,src:000001,op:flip1,pos:730,+cov 
b/src/exchange/afl-tests/id:000722,src:000001,op:flip1,pos:730,+cov
deleted file mode 100644
index 5d230cd..0000000
--- a/src/exchange/afl-tests/id:000722,src:000001,op:flip1,pos:730,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: locst:8081
-Accept: */*
-Content-: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000723,src:000001,op:flip1,pos:124,+cov 
b/src/exchange/afl-tests/id:000723,src:000001,op:flip1,pos:124,+cov
deleted file mode 100644
index 3447e4b..0000000
--- a/src/exchange/afl-tests/id:000723,src:000001,op:flip1,pos:124,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: localhost:8081
-pt: */*
-Content-Type: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"5b_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000723,src:000001,op:flip1,pos:786,+cov 
b/src/exchange/afl-tests/id:000723,src:000001,op:flip1,pos:786,+cov
deleted file mode 100644
index e99546a..0000000
--- a/src/exchange/afl-tests/id:000723,src:000001,op:flip1,pos:786,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: locst:8081
-Accept: */*
-Content-: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000724,src:000001,op:flip1,pos:133,+cov 
b/src/exchange/afl-tests/id:000724,src:000001,op:flip1,pos:133,+cov
deleted file mode 100644
index b045d2d..0000000
--- a/src/exchange/afl-tests/id:000724,src:000001,op:flip1,pos:133,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: localhost:8081
-pt: */*
-Content-Type: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"u1SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000724,src:000001,op:flip1,pos:796 
b/src/exchange/afl-tests/id:000724,src:000001,op:flip1,pos:796
deleted file mode 100644
index b989d16..0000000
--- a/src/exchange/afl-tests/id:000724,src:000001,op:flip1,pos:796
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: locst:8081
-Accept: */*
-Content-: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000725,src:000001,op:flip1,pos:133,+cov 
b/src/exchange/afl-tests/id:000725,src:000001,op:flip1,pos:133,+cov
deleted file mode 100644
index 36ad08e..0000000
--- a/src/exchange/afl-tests/id:000725,src:000001,op:flip1,pos:133,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: localhost:8081
-pt: */*
-Content-Type: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"%1SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000725,src:000001,op:flip1,pos:915,+cov 
b/src/exchange/afl-tests/id:000725,src:000001,op:flip1,pos:915,+cov
deleted file mode 100644
index f8d9127..0000000
--- a/src/exchange/afl-tests/id:000725,src:000001,op:flip1,pos:915,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: locst:8081
-Accept: */*
-Content-: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000726,src:000001,op:flip1,pos:1112,+cov 
b/src/exchange/afl-tests/id:000726,src:000001,op:flip1,pos:1112,+cov
deleted file mode 100644
index c5a1fa7..0000000
--- a/src/exchange/afl-tests/id:000726,src:000001,op:flip1,pos:1112,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: locst:8081
-Accept: */*
-Content-: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000726,src:000001,op:flip1,pos:135,+cov 
b/src/exchange/afl-tests/id:000726,src:000001,op:flip1,pos:135,+cov
deleted file mode 100644
index b8423af..0000000
--- a/src/exchange/afl-tests/id:000726,src:000001,op:flip1,pos:135,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: localhost:8081
-pt: */*
-Content-Type: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51CPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000727,src:000001,op:flip1,pos:1112,+cov 
b/src/exchange/afl-tests/id:000727,src:000001,op:flip1,pos:1112,+cov
deleted file mode 100644
index 722f45b..0000000
--- a/src/exchange/afl-tests/id:000727,src:000001,op:flip1,pos:1112,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: locst:8081
-Accept: */*
-Content-: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000727,src:000001,op:flip1,pos:457,+cov 
b/src/exchange/afl-tests/id:000727,src:000001,op:flip1,pos:457,+cov
deleted file mode 100644
index b66ec82..0000000
--- a/src/exchange/afl-tests/id:000727,src:000001,op:flip1,pos:457,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: localhost:8081
-pt: */*
-Content-Type: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4SDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000728,src:000001,op:flip1,pos:1114,+cov 
b/src/exchange/afl-tests/id:000728,src:000001,op:flip1,pos:1114,+cov
deleted file mode 100644
index d096b97..0000000
--- a/src/exchange/afl-tests/id:000728,src:000001,op:flip1,pos:1114,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: locst:8081
-Accept: */*
-Content-: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000728,src:000001,op:flip1,pos:469,+cov 
b/src/exchange/afl-tests/id:000728,src:000001,op:flip1,pos:469,+cov
deleted file mode 100644
index 394a850..0000000
--- a/src/exchange/afl-tests/id:000728,src:000001,op:flip1,pos:469,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: localhost:8081
-pt: */*
-Content-Type: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT34W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000729,src:000001,op:flip1,pos:1215,+cov 
b/src/exchange/afl-tests/id:000729,src:000001,op:flip1,pos:1215,+cov
deleted file mode 100644
index 830a76c..0000000
--- a/src/exchange/afl-tests/id:000729,src:000001,op:flip1,pos:1215,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: locst:8081
-Accept: */*
-Content-: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000729,src:000001,op:flip1,pos:508,+cov 
b/src/exchange/afl-tests/id:000729,src:000001,op:flip1,pos:508,+cov
deleted file mode 100644
index e82a828..0000000
--- a/src/exchange/afl-tests/id:000729,src:000001,op:flip1,pos:508,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: localhost:8081
-pt: */*
-Content-Type: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHW8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000730,src:000001,op:flip1,pos:1353,+cov 
b/src/exchange/afl-tests/id:000730,src:000001,op:flip1,pos:1353,+cov
deleted file mode 100644
index 6c9c4be..0000000
--- a/src/exchange/afl-tests/id:000730,src:000001,op:flip1,pos:1353,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: locst:8081
-Accept: */*
-Content-: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000730,src:000001,op:flip1,pos:600 
b/src/exchange/afl-tests/id:000730,src:000001,op:flip1,pos:600
deleted file mode 100644
index 561d9b6..0000000
--- a/src/exchange/afl-tests/id:000730,src:000001,op:flip1,pos:600
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: localhost:8081
-pt: */*
-Content-Type: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","4imestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000731,src:000001,op:flip1,pos:1453,+cov 
b/src/exchange/afl-tests/id:000731,src:000001,op:flip1,pos:1453,+cov
deleted file mode 100644
index f39d1a4..0000000
--- a/src/exchange/afl-tests/id:000731,src:000001,op:flip1,pos:1453,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: locst:8081
-Accept: */*
-Content-: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000731,src:000001,op:flip1,pos:618,+cov 
b/src/exchange/afl-tests/id:000731,src:000001,op:flip1,pos:618,+cov
deleted file mode 100644
index 07575f9..0000000
--- a/src/exchange/afl-tests/id:000731,src:000001,op:flip1,pos:618,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: localhost:8081
-pt: */*
-Content-Type: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000732,src:000001,op:flip1,pos:1574,+cov 
b/src/exchange/afl-tests/id:000732,src:000001,op:flip1,pos:1574,+cov
deleted file mode 100644
index a80fb94..0000000
--- a/src/exchange/afl-tests/id:000732,src:000001,op:flip1,pos:1574,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: locst:8081
-Accept: */*
-Content-: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000732,src:000001,op:flip1,pos:633,+cov 
b/src/exchange/afl-tests/id:000732,src:000001,op:flip1,pos:633,+cov
deleted file mode 100644
index 84c29c5..0000000
--- a/src/exchange/afl-tests/id:000732,src:000001,op:flip1,pos:633,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: localhost:8081
-pt: */*
-Content-Type: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000733,src:000001,op:flip1,pos:1630 
b/src/exchange/afl-tests/id:000733,src:000001,op:flip1,pos:1630
deleted file mode 100644
index e84d89d..0000000
--- a/src/exchange/afl-tests/id:000733,src:000001,op:flip1,pos:1630
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: locst:8081
-Accept: */*
-Content-: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000733,src:000001,op:flip1,pos:687,+cov 
b/src/exchange/afl-tests/id:000733,src:000001,op:flip1,pos:687,+cov
deleted file mode 100644
index b12b1ec..0000000
--- a/src/exchange/afl-tests/id:000733,src:000001,op:flip1,pos:687,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: localhost:8081
-pt: */*
-Content-Type: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000734,src:000001,op:flip1,pos:722,+cov 
b/src/exchange/afl-tests/id:000734,src:000001,op:flip1,pos:722,+cov
deleted file mode 100644
index 63cf05f..0000000
--- a/src/exchange/afl-tests/id:000734,src:000001,op:flip1,pos:722,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: localhost:8081
-pt: */*
-Content-Type: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000734,src:000001,op:flip2,pos:453,+cov 
b/src/exchange/afl-tests/id:000734,src:000001,op:flip2,pos:453,+cov
deleted file mode 100644
index 0e23b00..0000000
--- a/src/exchange/afl-tests/id:000734,src:000001,op:flip2,pos:453,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: locst:8081
-Accept: */*
-Content-: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4B�SJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000735,src:000001,op:flip1,pos:734,+cov 
b/src/exchange/afl-tests/id:000735,src:000001,op:flip1,pos:734,+cov
deleted file mode 100644
index 6cf6656..0000000
--- a/src/exchange/afl-tests/id:000735,src:000001,op:flip1,pos:734,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: localhost:8081
-pt: */*
-Content-Type: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000735,src:000001,op:flip2,pos:484,+cov 
b/src/exchange/afl-tests/id:000735,src:000001,op:flip2,pos:484,+cov
deleted file mode 100644
index 807f2a7..0000000
--- a/src/exchange/afl-tests/id:000735,src:000001,op:flip2,pos:484,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: locst:8081
-Accept: */*
-Content-: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SL�DSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000736,src:000001,op:flip1,pos:800 
b/src/exchange/afl-tests/id:000736,src:000001,op:flip1,pos:800
deleted file mode 100644
index 1b631b8..0000000
--- a/src/exchange/afl-tests/id:000736,src:000001,op:flip1,pos:800
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: localhost:8081
-pt: */*
-Content-Type: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000736,src:000001,op:flip2,pos:696,+cov 
b/src/exchange/afl-tests/id:000736,src:000001,op:flip2,pos:696,+cov
deleted file mode 100644
index 2014e21..0000000
--- a/src/exchange/afl-tests/id:000736,src:000001,op:flip2,pos:696,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: locst:8081
-Accept: */*
-Content-: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000737,src:000001,op:flip1,pos:888,+cov 
b/src/exchange/afl-tests/id:000737,src:000001,op:flip1,pos:888,+cov
deleted file mode 100644
index 04e588c..0000000
--- a/src/exchange/afl-tests/id:000737,src:000001,op:flip1,pos:888,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: localhost:8081
-pt: */*
-Content-Type: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000737,src:000001,op:flip2,pos:843,+cov 
b/src/exchange/afl-tests/id:000737,src:000001,op:flip2,pos:843,+cov
deleted file mode 100644
index ba306ce..0000000
--- a/src/exchange/afl-tests/id:000737,src:000001,op:flip2,pos:843,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: locst:8081
-Accept: */*
-Content-: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000738,src:000001,op:flip1,pos:893,+cov 
b/src/exchange/afl-tests/id:000738,src:000001,op:flip1,pos:893,+cov
deleted file mode 100644
index f56cf52..0000000
--- a/src/exchange/afl-tests/id:000738,src:000001,op:flip1,pos:893,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: localhost:8081
-pt: */*
-Content-Type: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000738,src:000001,op:flip2,pos:845,+cov 
b/src/exchange/afl-tests/id:000738,src:000001,op:flip2,pos:845,+cov
deleted file mode 100644
index 007d58e..0000000
--- a/src/exchange/afl-tests/id:000738,src:000001,op:flip2,pos:845,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: locst:8081
-Accept: */*
-Content-: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000739,src:000001,op:flip1,pos:1116,+cov 
b/src/exchange/afl-tests/id:000739,src:000001,op:flip1,pos:1116,+cov
deleted file mode 100644
index a911178..0000000
--- a/src/exchange/afl-tests/id:000739,src:000001,op:flip1,pos:1116,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: localhost:8081
-pt: */*
-Content-Type: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000739,src:000001,op:flip2,pos:917,+cov 
b/src/exchange/afl-tests/id:000739,src:000001,op:flip2,pos:917,+cov
deleted file mode 100644
index e54b632..0000000
--- a/src/exchange/afl-tests/id:000739,src:000001,op:flip2,pos:917,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: locst:8081
-Accept: */*
-Content-: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000740,src:000001,op:flip1,pos:1116,+cov 
b/src/exchange/afl-tests/id:000740,src:000001,op:flip1,pos:1116,+cov
deleted file mode 100644
index ab1a92e..0000000
--- a/src/exchange/afl-tests/id:000740,src:000001,op:flip1,pos:1116,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: localhost:8081
-pt: */*
-Content-Type: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000740,src:000001,op:flip2,pos:995,+cov 
b/src/exchange/afl-tests/id:000740,src:000001,op:flip2,pos:995,+cov
deleted file mode 100644
index 31437d7..0000000
--- a/src/exchange/afl-tests/id:000740,src:000001,op:flip2,pos:995,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: locst:8081
-Accept: */*
-Content-: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000741,src:000001,op:flip1,pos:1118,+cov 
b/src/exchange/afl-tests/id:000741,src:000001,op:flip1,pos:1118,+cov
deleted file mode 100644
index 0af7933..0000000
--- a/src/exchange/afl-tests/id:000741,src:000001,op:flip1,pos:1118,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: localhost:8081
-pt: */*
-Content-Type: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000741,src:000001,op:flip2,pos:1031,+cov 
b/src/exchange/afl-tests/id:000741,src:000001,op:flip2,pos:1031,+cov
deleted file mode 100644
index 51fc01b..0000000
--- a/src/exchange/afl-tests/id:000741,src:000001,op:flip2,pos:1031,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: locst:8081
-Accept: */*
-Content-: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000742,src:000001,op:flip1,pos:1170,+cov 
b/src/exchange/afl-tests/id:000742,src:000001,op:flip1,pos:1170,+cov
deleted file mode 100644
index 2907e71..0000000
--- a/src/exchange/afl-tests/id:000742,src:000001,op:flip1,pos:1170,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: localhost:8081
-pt: */*
-Content-Type: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000742,src:000001,op:flip2,pos:1135,+cov 
b/src/exchange/afl-tests/id:000742,src:000001,op:flip2,pos:1135,+cov
deleted file mode 100644
index 8023745..0000000
--- a/src/exchange/afl-tests/id:000742,src:000001,op:flip2,pos:1135,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: locst:8081
-Accept: */*
-Content-: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000743,src:000001,op:flip1,pos:1205,+cov 
b/src/exchange/afl-tests/id:000743,src:000001,op:flip1,pos:1205,+cov
deleted file mode 100644
index 21fa764..0000000
--- a/src/exchange/afl-tests/id:000743,src:000001,op:flip1,pos:1205,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: localhost:8081
-pt: */*
-Content-Type: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000743,src:000001,op:flip2,pos:1286,+cov 
b/src/exchange/afl-tests/id:000743,src:000001,op:flip2,pos:1286,+cov
deleted file mode 100644
index 8db7aad..0000000
--- a/src/exchange/afl-tests/id:000743,src:000001,op:flip2,pos:1286,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: locst:8081
-Accept: */*
-Content-: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000744,src:000001,op:flip1,pos:1301,+cov 
b/src/exchange/afl-tests/id:000744,src:000001,op:flip1,pos:1301,+cov
deleted file mode 100644
index fa0448f..0000000
--- a/src/exchange/afl-tests/id:000744,src:000001,op:flip1,pos:1301,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: localhost:8081
-pt: */*
-Content-Type: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000744,src:000001,op:flip2,pos:1655,+cov 
b/src/exchange/afl-tests/id:000744,src:000001,op:flip2,pos:1655,+cov
deleted file mode 100644
index 127b0f5..0000000
--- a/src/exchange/afl-tests/id:000744,src:000001,op:flip2,pos:1655,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: locst:8081
-Accept: */*
-Content-: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000745,src:000001,op:flip1,pos:1369,+cov 
b/src/exchange/afl-tests/id:000745,src:000001,op:flip1,pos:1369,+cov
deleted file mode 100644
index 03a4527..0000000
--- a/src/exchange/afl-tests/id:000745,src:000001,op:flip1,pos:1369,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: localhost:8081
-pt: */*
-Content-Type: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000745,src:000001,op:flip4,pos:50,+cov 
b/src/exchange/afl-tests/id:000745,src:000001,op:flip4,pos:50,+cov
deleted file mode 100644
index 76d7a5e..0000000
--- a/src/exchange/afl-tests/id:000745,src:000001,op:flip4,pos:50,+cov
+++ /dev/null
@@ -1,7 +0,0 @@
-POST /deposit HTTP/1.1
-Host: locst:8081
-Accept: */)�Content-: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000746,src:000001,op:flip1,pos:1378,+cov 
b/src/exchange/afl-tests/id:000746,src:000001,op:flip1,pos:1378,+cov
deleted file mode 100644
index f6dacce..0000000
--- a/src/exchange/afl-tests/id:000746,src:000001,op:flip1,pos:1378,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: localhost:8081
-pt: */*
-Content-Type: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000746,src:000001,op:flip4,pos:122,+cov 
b/src/exchange/afl-tests/id:000746,src:000001,op:flip4,pos:122,+cov
deleted file mode 100644
index 60bf24f..0000000
--- a/src/exchange/afl-tests/id:000746,src:000001,op:flip4,pos:122,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: locst:8081
-Accept: */*
-Content-: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ubcsig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000747,src:000001,op:flip1,pos:1474,+cov 
b/src/exchange/afl-tests/id:000747,src:000001,op:flip1,pos:1474,+cov
deleted file mode 100644
index 9c51034..0000000
--- a/src/exchange/afl-tests/id:000747,src:000001,op:flip1,pos:1474,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: localhost:8081
-pt: */*
-Content-Type: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000747,src:000001,op:flip4,pos:351,+cov 
b/src/exchange/afl-tests/id:000747,src:000001,op:flip4,pos:351,+cov
deleted file mode 100644
index a0878cb..0000000
--- a/src/exchange/afl-tests/id:000747,src:000001,op:flip4,pos:351,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: locst:8081
-Accept: */*
-Content-: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDN66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000748,src:000001,op:flip1,pos:1510,+cov 
b/src/exchange/afl-tests/id:000748,src:000001,op:flip1,pos:1510,+cov
deleted file mode 100644
index 6e75c96..0000000
--- a/src/exchange/afl-tests/id:000748,src:000001,op:flip1,pos:1510,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: localhost:8081
-pt: */*
-Content-Type: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000748,src:000001,op:flip4,pos:569,+cov 
b/src/exchange/afl-tests/id:000748,src:000001,op:flip4,pos:569,+cov
deleted file mode 100644
index 61eaeac..0000000
--- a/src/exchange/afl-tests/id:000748,src:000001,op:flip4,pos:569,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: locst:8081
-Accept: */*
-Content-: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA25�242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000749,src:000001,op:flip1,pos:1634 
b/src/exchange/afl-tests/id:000749,src:000001,op:flip1,pos:1634
deleted file mode 100644
index cb0f68d..0000000
--- a/src/exchange/afl-tests/id:000749,src:000001,op:flip1,pos:1634
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: localhost:8081
-pt: */*
-Content-Type: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000749,src:000001,op:flip4,pos:788,+cov 
b/src/exchange/afl-tests/id:000749,src:000001,op:flip4,pos:788,+cov
deleted file mode 100644
index ba918f1..0000000
--- a/src/exchange/afl-tests/id:000749,src:000001,op:flip4,pos:788,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: locst:8081
-Accept: */*
-Content-: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000750,src:000001,op:flip1,pos:1657,+cov 
b/src/exchange/afl-tests/id:000750,src:000001,op:flip1,pos:1657,+cov
deleted file mode 100644
index f502490..0000000
--- a/src/exchange/afl-tests/id:000750,src:000001,op:flip1,pos:1657,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: localhost:8081
-pt: */*
-Content-Type: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000750,src:000001,op:flip4,pos:1198,+cov 
b/src/exchange/afl-tests/id:000750,src:000001,op:flip4,pos:1198,+cov
deleted file mode 100644
index b463b75..0000000
--- a/src/exchange/afl-tests/id:000750,src:000001,op:flip4,pos:1198,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: locst:8081
-Accept: */*
-Content-: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000751,src:000001,op:flip1,pos:1712,+cov 
b/src/exchange/afl-tests/id:000751,src:000001,op:flip1,pos:1712,+cov
deleted file mode 100644
index ed22ac2..0000000
--- a/src/exchange/afl-tests/id:000751,src:000001,op:flip1,pos:1712,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: localhost:8081
-pt: */*
-Content-Type: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000751,src:000001,op:flip8,pos:67,+cov 
b/src/exchange/afl-tests/id:000751,src:000001,op:flip8,pos:67,+cov
deleted file mode 100644
index 48167b4..0000000
--- a/src/exchange/afl-tests/id:000751,src:000001,op:flip8,pos:67,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: locst:8081
-Accept: */*
-Content-: appli�n/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000752,src:000001,op:flip2,pos:21,+cov 
b/src/exchange/afl-tests/id:000752,src:000001,op:flip2,pos:21,+cov
deleted file mode 100644
index 95dde0c..0000000
--- a/src/exchange/afl-tests/id:000752,src:000001,op:flip2,pos:21,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.Q
-Host: localhost:8081
-pt: */*
-Content-Type: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000752,src:000001,op:flip8,pos:1661,+cov 
b/src/exchange/afl-tests/id:000752,src:000001,op:flip8,pos:1661,+cov
deleted file mode 100644
index 7a74997..0000000
--- a/src/exchange/afl-tests/id:000752,src:000001,op:flip8,pos:1661,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: locst:8081
-Accept: */*
-Content-: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000753,src:000001,op:flip16,pos:390,+cov 
b/src/exchange/afl-tests/id:000753,src:000001,op:flip16,pos:390,+cov
deleted file mode 100644
index 4088f86..0000000
--- a/src/exchange/afl-tests/id:000753,src:000001,op:flip16,pos:390,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: locst:8081
-Accept: */*
-Content-: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336��Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000753,src:000001,op:flip2,pos:39,+cov 
b/src/exchange/afl-tests/id:000753,src:000001,op:flip2,pos:39,+cov
deleted file mode 100644
index 63802d8..0000000
--- a/src/exchange/afl-tests/id:000753,src:000001,op:flip2,pos:39,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: localhost: 081
-pt: */*
-Content-Type: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000754,src:000001,op:flip2,pos:105,+cov 
b/src/exchange/afl-tests/id:000754,src:000001,op:flip2,pos:105,+cov
deleted file mode 100644
index 61d1484..0000000
--- a/src/exchange/afl-tests/id:000754,src:000001,op:flip2,pos:105,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: localhost:8081
-pt: */*
-Content-Type: applicn/json
-Content-Length: 1658
-Expecl: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000754,src:000001,op:flip32,pos:339,+cov 
b/src/exchange/afl-tests/id:000754,src:000001,op:flip32,pos:339,+cov
deleted file mode 100644
index e33270c..0000000
--- a/src/exchange/afl-tests/id:000754,src:000001,op:flip32,pos:339,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: locst:8081
-Accept: */*
-Content-: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18Dʹ��A46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/Da
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000755,src:000001,op:flip2,pos:890,+cov 
b/src/exchange/afl-tests/id:000755,src:000001,op:flip2,pos:890,+cov
deleted file mode 100644
index 4021f8c..0000000
--- a/src/exchange/afl-tests/id:000755,src:000001,op:flip2,pos:890,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: localhost:8081
-pt: */*
-Content-Type: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000755,src:000001,op:flip32,pos:975,+cov 
b/src/exchange/afl-tests/id:000755,src:000001,op:flip32,pos:975,+cov
deleted file mode 100644
index f067606..0000000
--- a/src/exchange/afl-tests/id:000755,src:000001,op:flip32,pos:975,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: locst:8081
-Accept: */*
-Content-: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git 
a/src/exchange/afl-tests/id:000756,src:000001,op:arith8,pos:10,val:-30,+cov 
b/src/exchange/afl-tests/id:000756,src:000001,op:arith8,pos:10,val:-30,+cov
deleted file mode 100644
index f01f71e..0000000
--- a/src/exchange/afl-tests/id:000756,src:000001,op:arith8,pos:10,val:-30,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /depoUit HTTP/1.1
-Host: locst:8081
-Accept: */*
-Content-: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000756,src:000001,op:flip2,pos:975,+cov 
b/src/exchange/afl-tests/id:000756,src:000001,op:flip2,pos:975,+cov
deleted file mode 100644
index 3bb81fc..0000000
--- a/src/exchange/afl-tests/id:000756,src:000001,op:flip2,pos:975,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: localhost:8081
-pt: */*
-Content-Type: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git 
a/src/exchange/afl-tests/id:000757,src:000001,op:arith8,pos:46,val:+9,+cov 
b/src/exchange/afl-tests/id:000757,src:000001,op:arith8,pos:46,val:+9,+cov
deleted file mode 100644
index e94ab3d..0000000
--- a/src/exchange/afl-tests/id:000757,src:000001,op:arith8,pos:46,val:+9,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: locst:8081
-AcceptC */*
-Content-: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000757,src:000001,op:flip2,pos:1509,+cov 
b/src/exchange/afl-tests/id:000757,src:000001,op:flip2,pos:1509,+cov
deleted file mode 100644
index f237a89..0000000
--- a/src/exchange/afl-tests/id:000757,src:000001,op:flip2,pos:1509,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: localhost:8081
-pt: */*
-Content-Type: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git 
a/src/exchange/afl-tests/id:000758,src:000001,op:arith8,pos:72,val:+5,+cov 
b/src/exchange/afl-tests/id:000758,src:000001,op:arith8,pos:72,val:+5,+cov
deleted file mode 100644
index 4e956d1..0000000
--- a/src/exchange/afl-tests/id:000758,src:000001,op:arith8,pos:72,val:+5,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: locst:8081
-Accept: */*
-Content-: applicn/jstn
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000758,src:000001,op:flip2,pos:1662,+cov 
b/src/exchange/afl-tests/id:000758,src:000001,op:flip2,pos:1662,+cov
deleted file mode 100644
index 725d382..0000000
--- a/src/exchange/afl-tests/id:000758,src:000001,op:flip2,pos:1662,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: localhost:8081
-pt: */*
-Content-Type: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000759,src:000001,op:flip4,pos:32,+cov 
b/src/exchange/afl-tests/id:000759,src:000001,op:flip4,pos:32,+cov
deleted file mode 100644
index 1641ffd..0000000
--- a/src/exchange/afl-tests/id:000759,src:000001,op:flip4,pos:32,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: loclhost:8081
-pt: */*
-Content-Type: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000760,src:000001,op:flip4,pos:300,+cov 
b/src/exchange/afl-tests/id:000760,src:000001,op:flip4,pos:300,+cov
deleted file mode 100644
index 7ab6d56..0000000
--- a/src/exchange/afl-tests/id:000760,src:000001,op:flip4,pos:300,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: localhost:8081
-pt: */*
-Content-Type: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSr8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000761,src:000001,op:flip4,pos:457,+cov 
b/src/exchange/afl-tests/id:000761,src:000001,op:flip4,pos:457,+cov
deleted file mode 100644
index 31745f5..0000000
--- a/src/exchange/afl-tests/id:000761,src:000001,op:flip4,pos:457,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: localhost:8081
-pt: */*
-Content-Type: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4B�SJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000762,src:000001,op:flip4,pos:1507,+cov 
b/src/exchange/afl-tests/id:000762,src:000001,op:flip4,pos:1507,+cov
deleted file mode 100644
index c5eb142..0000000
--- a/src/exchange/afl-tests/id:000762,src:000001,op:flip4,pos:1507,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: localhost:8081
-pt: */*
-Content-Type: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000763,src:000001,op:flip4,pos:1549,+cov 
b/src/exchange/afl-tests/id:000763,src:000001,op:flip4,pos:1549,+cov
deleted file mode 100644
index 775a9f9..0000000
--- a/src/exchange/afl-tests/id:000763,src:000001,op:flip4,pos:1549,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: localhost:8081
-pt: */*
-Content-Type: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000764,src:000001,op:flip4,pos:1577,+cov 
b/src/exchange/afl-tests/id:000764,src:000001,op:flip4,pos:1577,+cov
deleted file mode 100644
index dc33780..0000000
--- a/src/exchange/afl-tests/id:000764,src:000001,op:flip4,pos:1577,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: localhost:8081
-pt: */*
-Content-Type: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000765,src:000001,op:flip8,pos:899,+cov 
b/src/exchange/afl-tests/id:000765,src:000001,op:flip8,pos:899,+cov
deleted file mode 100644
index 5046a0a..0000000
--- a/src/exchange/afl-tests/id:000765,src:000001,op:flip8,pos:899,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: localhost:8081
-pt: */*
-Content-Type: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000766,src:000001,op:flip8,pos:1457,+cov 
b/src/exchange/afl-tests/id:000766,src:000001,op:flip8,pos:1457,+cov
deleted file mode 100644
index a18b027..0000000
--- a/src/exchange/afl-tests/id:000766,src:000001,op:flip8,pos:1457,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: localhost:8081
-pt: */*
-Content-Type: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/afl-tests/id:000767,src:000001,op:flip32,pos:301,+cov 
b/src/exchange/afl-tests/id:000767,src:000001,op:flip32,pos:301,+cov
deleted file mode 100644
index 03c18d5..0000000
--- a/src/exchange/afl-tests/id:000767,src:000001,op:flip32,pos:301,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: localhost:8081
-pt: */*
-Content-Type: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSNǭ��6D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/Da
 [...]
\ No newline at end of file
diff --git 
a/src/exchange/afl-tests/id:000768,src:000001,op:arith8,pos:18,val:+11,+cov 
b/src/exchange/afl-tests/id:000768,src:000001,op:arith8,pos:18,val:+11,+cov
deleted file mode 100644
index 96c53e4..0000000
--- a/src/exchange/afl-tests/id:000768,src:000001,op:arith8,pos:18,val:+11,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP:1.1
-Host: localhost:8081
-pt: */*
-Content-Type: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git 
a/src/exchange/afl-tests/id:000769,src:000001,op:arith8,pos:33,val:+17,+cov 
b/src/exchange/afl-tests/id:000769,src:000001,op:arith8,pos:33,val:+17,+cov
deleted file mode 100644
index 52829db..0000000
--- a/src/exchange/afl-tests/id:000769,src:000001,op:arith8,pos:33,val:+17,+cov
+++ /dev/null
@@ -1,8 +0,0 @@
-POST /deposit HTTP/1.1
-Host: loca}host:8081
-pt: */*
-Content-Type: applicn/json
-Content-Length: 1658
-Expect: 100-continue
-
-{"ub_sig":"51SPJSSDESGPR80A40M74WV140520818ECG26E9M8S0M6CSH6X334GSN8RW30D9G8MT46CA660W34GSG6MT4AD9K8GT3ECSH6MVK0E2374V38H1M8MR4CDJ66MWK4E1S6MR3GCT28CV32H1Q8N23GCHG70S36C1K8MS3GCSN8RV36D9S710KGD9K6GWKEGJ28GRM4CJ56X1K6DJ18D2KGHA46D13GDA66GVK4GHJ8N13AE9J8RVK6GT184S48E1K6X336G9Q8N142CJ4692M6EA16GRKJD9N6523ADA36X13GG9G70TK6DHN68R36CT18GR4CDSJ6CW3GCT364W46CSR8RV42GJ474SMADSH851K4H9Q8GS42CHS8RV3GCSJ64V46DSN8RSM6HHN6N246D9S6934AH9P6X23JGSH652K0DJ5612KJGA26N242CH35452081918G2J2G0","timestamp":"/D
 [...]
\ No newline at end of file
diff --git a/src/exchange/exchange.conf b/src/exchange/exchange.conf
index 333e9a5..4c10b31 100644
--- a/src/exchange/exchange.conf
+++ b/src/exchange/exchange.conf
@@ -7,19 +7,12 @@
 # in respective subdirectories.)
 KEYDIR = ${TALER_DATA_HOME}/exchange/live-keys/
 
-# Wire format supported by the exchange.  We use 'test' for testing of
-# the actual coin operations.
-# WIREFORMAT = test
-
 # Master public key used to sign the exchange's various keys
 # MASTER_PUBLIC_KEY = 98NJW3CQHZQGQXTY3K85K531XKPAPAVV4Q5V8PYYRR00NJGZWNVG
 
 # How to access our database
 DB = postgres
 
-# Is this is a testcase, use transient DB actions?
-# TESTRUN = YES
-
 # Where do we store the offline master private key of the exchange?
 MASTER_PRIV_FILE = ${TALER_DATA_HOME}/exchange/offline-keys/master.priv
 
@@ -36,6 +29,14 @@ UNIXPATH_MODE = 660
 # HTTP port the exchange listens to
 PORT = 8081
 
+# Base URL of the exchange (public-facing).  Due to reverse proxies,
+# this may or may not match our port or hostname at all and can thus
+# not be determined automatically. Note that a globally reachable name
+# is required, so 'localhost' will not work except for testing.
+# Required for wire transfers as we need to include it in the wire
+# transfers to enable tracking.
+BASE_URL = http://localhost:8081/
+
 
 [exchange-admin]
 # Network configuration for the /admin HTTP server
diff --git a/src/exchange/taler-config-generate 
b/src/exchange/taler-config-generate
index cc77d47..b2e2229 100755
--- a/src/exchange/taler-config-generate
+++ b/src/exchange/taler-config-generate
@@ -6,6 +6,7 @@
 # -c FILENAME, --config=FILENAME (where to write config, defaults to 
~/.config/taler.conf)
 # -C CURRENCY, --currency=CURRENCY (name of the currency)
 # -e, --exchange (generate configuration for the exchange)
+# -f AMOUNT, --wirefee=AMOUNT (wire transfer fees charged to merchant, 
generated for next 5 years)
 # -j WIREJSON, --wire-json-merchant=WIREJSON (wire plugin details in JSON)
 # -J WIREJSON, --wire-json-exchange=WIREJSON (wire plugin details in JSON)
 # -m, --merchant (generate configuration for the merchant)
@@ -32,7 +33,7 @@ ARG_MERCHANT_BANK_ACCOUNT=
 
 ##################################
 # read the options
-TEMP=`getopt -o c:C:ehj:J:mtw: --long 
config:,currency:,exchange,help,wire-json-exchange:,wire-json-merchant:,merchant,trusted,wire:,bank-uri:,exchange-bank-account:,merchant-bank-account:
 -n 'taler-config-generate' -- "$@"`
+TEMP=`getopt -o c:C:ef:hj:J:mtw: --long 
config:,currency:,exchange,wirefee:,help,wire-json-exchange:,wire-json-merchant:,merchant,trusted,wire:,bank-uri:,exchange-bank-account:,merchant-bank-account:
 -n 'taler-config-generate' -- "$@"`
 eval set -- "$TEMP"
 
 ####################################################
@@ -48,6 +49,9 @@ while true ; do
         -e|--exchange)
             ARG_E=1
             shift ;;
+        -f|--wirefee)
+            ARG_WIRE_FEE="$2"
+            shift 2 ;;
         -h|--help)
             ARG_H=1
             shift ;;
@@ -172,33 +176,55 @@ then
 # Obtain public master key of exchange
   MASTER_PUB=`gnunet-ecc -p "$MASTER_KEY"`
 
-# Setup wire format
-  $CS -s exchange -o WIREFORMAT -V "$ARG_W" || exit 1
 # Setup master public key
   $CS -s exchange -o MASTER_PUBLIC_KEY -V "$MASTER_PUB" || exit 1
+
+# Setup wire transfer methods
+  for $WMETHOD in $ARG_W
+  do
+    $CS -s exchange-wire-$WMETHOD -o ENABLE -V YES || exit 1
+
 # If possible, initialize outgoing wire account details ('test' method only)
-  if (test "test" = "$ARG_W" -a ! -z "$ARG_BANK_URI")
-  then
-    $CS -s exchange-wire-outgoing-test -o BANK_URI -V "$ARG_BANK_URI" || exit 1
-  else
-    echo "Skipped generating outgoing wire account details for exchange"
-  fi
-  if (test "test" = "$ARG_W" -a ! -z "$ARG_EXCHANGE_BANK_ACCOUNT")
-  then
-    $CS -s exchange-wire-outgoing-test -o BANK_ACCOUNT_NUMBER -V 
"$ARG_EXCHANGE_BANK_ACCOUNT" || exit 1
-  else
-    echo "Skipped generating outgoing wire account details for exchange"
-  fi
+    if (test "test" = "$WMETHOD" -a ! -z "$ARG_BANK_URI")
+    then
+      $CS -s exchange-wire-outgoing-test -o BANK_URI -V "$ARG_BANK_URI" || 
exit 1
+    else
+      echo "Skipped generating outgoing wire account details for exchange"
+    fi
+    if (test "test" = "$ARG_W" -a ! -z "$ARG_EXCHANGE_BANK_ACCOUNT")
+    then
+      $CS -s exchange-wire-outgoing-test -o BANK_ACCOUNT_NUMBER -V 
"$ARG_EXCHANGE_BANK_ACCOUNT" || exit 1
+    else
+      echo "Skipped generating outgoing wire account details for exchange"
+    fi
+
 # If possible, initialize /wire response from JSON (with signature)
-  if (test ! -z $ARG_JE)
-  then
-    JSONF=`$CS -s exchange-wire-incoming-${ARG_W} -o ${ARG_W}_RESPONSE_FILE -f`
+    if (test ! -z $ARG_JE)
+    then
+      JSONF=`$CS -s exchange-wire-incoming-${ARG_W} -o ${ARG_W}_RESPONSE_FILE 
-f`
 #    echo "Generating /wire response at $JSONF"
-    mkdir -p `dirname $JSONF`
-    taler-exchange-wire -c "$ARG_CONFIG" -t "$ARG_W" -j "$ARG_JE" -m 
"$MASTER_KEY" -o "$JSONF" || exit 1
-  else
-    echo "Skipped generating /wire response for exchange"
-  fi
+      mkdir -p `dirname $JSONF`
+      taler-exchange-wire -c "$ARG_CONFIG" -t "$ARG_W" -j "$ARG_JE" -m 
"$MASTER_KEY" -o "$JSONF" || exit 1
+    else
+      echo "Skipped generating /wire response for exchange"
+    fi
+
+# Setup wire transfer fee structure.
+    if (test -z "$ARG_WIRE_FEE")
+    then
+      today=`date '+%Y'`
+      future=`expr $today + 5`
+      for YEAR in `seq $today $future`
+      do
+        $CS -s exchange-wire-$WMETHOD -o wire-fee-$YEAR -V $ARG_WIRE_FEE
+      done
+    else
+      echo "Skipped generating wire fee structure for exchange"
+    fi
+
+# End of for loop over all wire transfer methods
+  done
+
 else
   echo "Skipped exchange setup"
 fi
diff --git a/src/exchange/taler-exchange-aggregator.c 
b/src/exchange/taler-exchange-aggregator.c
index 525886d..cbf3fb5 100644
--- a/src/exchange/taler-exchange-aggregator.c
+++ b/src/exchange/taler-exchange-aggregator.c
@@ -1,6 +1,6 @@
 /*
   This file is part of TALER
-  Copyright (C) 2016 GNUnet e.V.
+  Copyright (C) 2016, 2017 GNUnet e.V.
 
   TALER is free software; you can redistribute it and/or modify it under the
   terms of the GNU Affero General Public License as published by the Free 
Software
@@ -29,8 +29,6 @@
 #include "taler_wire_lib.h"
 
 
-
-
 /**
  * Information we keep for each loaded wire plugin.
  */
@@ -55,6 +53,12 @@ struct WirePlugin
    * Name of the plugin.
    */
   char *type;
+
+  /**
+   * Wire transfer fee structure.
+   */
+  struct TALER_EXCHANGEDB_AggregateFees *af;
+
 };
 
 
@@ -105,6 +109,11 @@ struct AggregationUnit
   struct TALER_Amount total_amount;
 
   /**
+   * Wire fee we charge for @e wp at @e execution_time.
+   */
+  struct TALER_Amount wire_fee;
+
+  /**
    * Hash of @e wire.
    */
   struct GNUNET_HashCode h_wire;
@@ -169,6 +178,11 @@ struct AggregationUnit
 static char *exchange_currency_string;
 
 /**
+ * What is the base URL of this exchange?
+ */
+static char *exchange_base_url;
+
+/**
  * The exchange's configuration (global)
  */
 static struct GNUNET_CONFIGURATION_Handle *cfg;
@@ -257,6 +271,83 @@ extract_type (const json_t *wire)
 
 
 /**
+ * Advance the "af" pointer in @a wp to point to the
+ * currently valid record.
+ *
+ * @param wp wire transfer fee data structure to update
+ * @param now timestamp to update fees to
+ */
+static void
+advance_fees (struct WirePlugin *wp,
+              struct GNUNET_TIME_Absolute now)
+{
+  struct TALER_EXCHANGEDB_AggregateFees *af;
+
+  /* First, try to see if we have current fee information in memory */
+  af = wp->af;
+  while ( (NULL != af) &&
+          (af->end_date.abs_value_us < now.abs_value_us) )
+  {
+    struct TALER_EXCHANGEDB_AggregateFees *n = af->next;
+
+    GNUNET_free (af);
+    af = n;
+  }
+  wp->af = af;
+}
+
+
+/**
+ * Update wire transfer fee data structure in @a wp.
+ *
+ * @param wp wire transfer fee data structure to update
+ * @param now timestamp to update fees to
+ * @param session DB session to use
+ * @return #GNUNET_OK on success, #GNUNET_SYSERR if we
+ *         lack current fee information (and need to exit)
+ */
+static int
+update_fees (struct WirePlugin *wp,
+             struct GNUNET_TIME_Absolute now,
+             struct TALER_EXCHANGEDB_Session *session)
+{
+  advance_fees (wp,
+                now);
+  if (NULL != wp->af)
+    return GNUNET_OK;
+  /* Let's try to load it from disk... */
+  wp->af = TALER_EXCHANGEDB_fees_read (cfg,
+                                       wp->type);
+  advance_fees (wp,
+                now);
+  for (struct TALER_EXCHANGEDB_AggregateFees *p = wp->af;
+       NULL != p;
+       p = p->next)
+  {
+    if (GNUNET_SYSERR ==
+        db_plugin->insert_wire_fee (db_plugin->cls,
+                                    session,
+                                    wp->type,
+                                    p->start_date,
+                                    p->end_date,
+                                    &p->wire_fee,
+                                    &p->master_sig))
+    {
+      TALER_EXCHANGEDB_fees_free (wp->af);
+      wp->af = NULL;
+      return GNUNET_SYSERR;
+    }
+  }
+  if (NULL != wp->af)
+    return GNUNET_OK;
+  GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+              "Failed to find current wire transfer fees for `%s'\n",
+              wp->type);
+  return GNUNET_SYSERR;
+}
+
+
+/**
  * Find the wire plugin for the given wire address.
  *
  * @param type wire plugin type we need a plugin for
@@ -342,6 +433,7 @@ shutdown_task (void *cls)
                                  wp_tail,
                                  wp);
     TALER_WIRE_plugin_unload (wp->wire_plugin);
+    TALER_EXCHANGEDB_fees_free (wp->af);
     GNUNET_free (wp->type);
     GNUNET_free (wp);
   }
@@ -401,8 +493,7 @@ exchange_serve_process_config ()
  * @param coin_pub public key of the coin
  * @param amount_with_fee amount that was deposited including fee
  * @param deposit_fee amount the exchange gets to keep as transaction fees
- * @param transaction_id unique transaction ID chosen by the merchant
- * @param h_contract hash of the contract between merchant and customer
+ * @param h_proposal_data hash of the proposal data known to merchant and 
customer
  * @param wire_deadline by which the merchant adviced that he would like the
  *        wire transfer to be executed
  * @param wire wire details for the merchant
@@ -415,8 +506,7 @@ deposit_cb (void *cls,
             const struct TALER_CoinSpendPublicKeyP *coin_pub,
             const struct TALER_Amount *amount_with_fee,
             const struct TALER_Amount *deposit_fee,
-            uint64_t transaction_id,
-            const struct GNUNET_HashCode *h_contract,
+            const struct GNUNET_HashCode *h_proposal_data,
             struct GNUNET_TIME_Absolute wire_deadline,
             const json_t *wire)
 {
@@ -432,9 +522,8 @@ deposit_cb (void *cls,
     return GNUNET_SYSERR;
   }
   au->row_id = row_id;
+  GNUNET_assert (NULL == au->wire);
   au->wire = json_incref ((json_t *) wire);
-  au->execution_time = GNUNET_TIME_absolute_get ();
-  (void) GNUNET_TIME_round_abs (&au->execution_time);
   TALER_JSON_hash (au->wire,
                    &au->h_wire);
   GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_NONCE,
@@ -443,6 +532,21 @@ deposit_cb (void *cls,
   GNUNET_log (GNUNET_ERROR_TYPE_INFO,
               "Starting aggregation under H(WTID)=%s\n",
               TALER_B2S (&au->wtid));
+
+  au->wp = find_plugin (extract_type (au->wire));
+  if (NULL == au->wp)
+    return GNUNET_SYSERR;
+
+  /* make sure we have current fees */
+  au->execution_time = GNUNET_TIME_absolute_get ();
+  (void) GNUNET_TIME_round_abs (&au->execution_time);
+  if (GNUNET_OK !=
+      update_fees (au->wp,
+                   au->execution_time,
+                   au->session))
+    return GNUNET_SYSERR;
+  au->wire_fee = au->wp->af->wire_fee;
+
   if (GNUNET_OK !=
       db_plugin->insert_aggregation_tracking (db_plugin->cls,
                                               au->session,
@@ -476,8 +580,7 @@ deposit_cb (void *cls,
  * @param coin_pub public key of the coin
  * @param amount_with_fee amount that was deposited including fee
  * @param deposit_fee amount the exchange gets to keep as transaction fees
- * @param transaction_id unique transaction ID chosen by the merchant
- * @param h_contract hash of the contract between merchant and customer
+ * @param h_proposal_data hash of the proposal data known to merchant and 
customer
  * @param wire_deadline by which the merchant adviced that he would like the
  *        wire transfer to be executed
  * @param wire wire details for the merchant
@@ -490,8 +593,7 @@ aggregate_cb (void *cls,
               const struct TALER_CoinSpendPublicKeyP *coin_pub,
               const struct TALER_Amount *amount_with_fee,
               const struct TALER_Amount *deposit_fee,
-              uint64_t transaction_id,
-              const struct GNUNET_HashCode *h_contract,
+              const struct GNUNET_HashCode *h_proposal_data,
               struct GNUNET_TIME_Absolute wire_deadline,
               const json_t *wire)
 {
@@ -586,7 +688,7 @@ run_aggregation (void *cls)
   unsigned int i;
   int ret;
   const struct GNUNET_SCHEDULER_TaskContext *tc;
-  struct WirePlugin *wp;
+  struct TALER_Amount final_amount;
 
   task = NULL;
   tc = GNUNET_SCHEDULER_get_task_context ();
@@ -651,18 +753,6 @@ run_aggregation (void *cls)
     return;
   }
 
-  wp = find_plugin (extract_type (au->wire));
-  if (NULL == wp)
-  {
-    json_decref (au->wire);
-    GNUNET_free (au);
-    au = NULL;
-    db_plugin->rollback (db_plugin->cls,
-                         session);
-    GNUNET_SCHEDULER_shutdown ();
-    return;
-  }
-
   /* Now try to find other deposits to aggregate */
   GNUNET_log (GNUNET_ERROR_TYPE_INFO,
               "Found ready deposit for %s, aggregating\n",
@@ -690,13 +780,18 @@ run_aggregation (void *cls)
     return;
   }
 
-  /* Round to the unit supported by the wire transfer method */
-  GNUNET_assert (GNUNET_SYSERR !=
-                 wp->wire_plugin->amount_round (wp->wire_plugin->cls,
-                                                &au->total_amount));
-  /* Check if after rounding down, we still have an amount to transfer */
-  if ( (0 == au->total_amount.value) &&
-       (0 == au->total_amount.fraction) )
+  /* Subtract wire transfer fee and round to the unit supported by the
+     wire transfer method; Check if after rounding down, we still have
+     an amount to transfer, and if not mark as 'tiny'. */
+  if ( (GNUNET_OK !=
+        TALER_amount_subtract (&final_amount,
+                               &au->total_amount,
+                               &au->wire_fee)) ||
+       (GNUNET_SYSERR ==
+        au->wp->wire_plugin->amount_round (au->wp->wire_plugin->cls,
+                                           &final_amount)) ||
+       ( (0 == final_amount.value) &&
+         (0 == final_amount.fraction) ) )
   {
     GNUNET_log (GNUNET_ERROR_TYPE_INFO,
                 "Aggregate value too low for transfer\n");
@@ -756,20 +851,20 @@ run_aggregation (void *cls)
   {
     char *amount_s;
 
-    amount_s = TALER_amount_to_string (&au->total_amount);
+    amount_s = TALER_amount_to_string (&final_amount);
     GNUNET_log (GNUNET_ERROR_TYPE_INFO,
                 "Preparing wire transfer of %s to %s\n",
                 amount_s,
                 TALER_B2S (&au->merchant_pub));
     GNUNET_free (amount_s);
   }
-  au->wp = wp;
-  au->ph = wp->wire_plugin->prepare_wire_transfer (wp->wire_plugin->cls,
-                                                   au->wire,
-                                                   &au->total_amount,
-                                                   &au->wtid,
-                                                   &prepare_cb,
-                                                   au);
+  au->ph = au->wp->wire_plugin->prepare_wire_transfer 
(au->wp->wire_plugin->cls,
+                                                       au->wire,
+                                                       &final_amount,
+                                                       exchange_base_url,
+                                                       &au->wtid,
+                                                       &prepare_cb,
+                                                       au);
   if (NULL == au->ph)
   {
     GNUNET_break (0); /* why? how to best recover? */
@@ -1065,6 +1160,18 @@ run (void *cls,
      const char *cfgfile,
      const struct GNUNET_CONFIGURATION_Handle *c)
 {
+  if (GNUNET_OK !=
+      GNUNET_CONFIGURATION_get_value_string (c,
+                                             "exchange",
+                                             "BASE_URL",
+                                             &exchange_base_url))
+  {
+    GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
+                               "exchange",
+                               "BASE_URL");
+    global_ret = 1;
+    return;
+  }
   cfg = GNUNET_CONFIGURATION_dup (c);
   if (GNUNET_OK != exchange_serve_process_config ())
   {
diff --git a/src/exchange/taler-exchange-httpd.c 
b/src/exchange/taler-exchange-httpd.c
index d6dfb03..11cf00d 100644
--- a/src/exchange/taler-exchange-httpd.c
+++ b/src/exchange/taler-exchange-httpd.c
@@ -101,6 +101,11 @@ static struct MHD_Daemon *mhd_admin;
 static int no_admin;
 
 /**
+ * Initialize the database by creating tables and indices.
+ */
+static int init_db;
+
+/**
  * Port to run the daemon on.
  */
 static uint16_t serve_port;
@@ -656,13 +661,10 @@ exchange_serve_process_config ()
     TEH_VALIDATION_done ();
     return GNUNET_SYSERR;
   }
-  if (GNUNET_YES ==
-      GNUNET_CONFIGURATION_get_value_yesno (cfg,
-                                            "exchange",
-                                            "TESTRUN"))
+  if (0 != init_db)
   {
     GNUNET_log (GNUNET_ERROR_TYPE_INFO,
-                "Running in TEST mode! Database contents will not persist!\n");
+                "Ensuring that tables and indices are created!\n");
     TEH_plugin->create_tables (TEH_plugin->cls);
   }
 
@@ -938,6 +940,9 @@ main (int argc,
     {'D', "disable-admin", NULL,
      "do not run the /admin-HTTP server", 0,
      &GNUNET_GETOPT_set_one, &no_admin},
+    {'i', "init-db", NULL,
+     "create database tables and indicies if necessary", 0,
+     &GNUNET_GETOPT_set_one, &init_db},
     {'t', "timeout", "SECONDS",
      "after how long do connections timeout by default (in seconds)", 1,
      &GNUNET_GETOPT_set_uint, &connection_timeout},
@@ -1120,12 +1125,16 @@ main (int argc,
     {
       MHD_socket sock = MHD_quiesce_daemon (mhd);
       MHD_socket admin_sock;
+      int admin_sock_opened = GNUNET_NO;
       pid_t chld;
       int flags;
 
       /* Set flags to make 'sock' inherited by child */
       if (NULL != mhd_admin)
+      {
         admin_sock = MHD_quiesce_daemon (mhd_admin);
+        admin_sock_opened = GNUNET_YES;
+      }
       flags = fcntl (sock, F_GETFD);
       GNUNET_assert (-1 != flags);
       flags &= ~FD_CLOEXEC;
@@ -1149,7 +1158,7 @@ main (int argc,
                                "dup2");
           _exit (1);
         }
-        if ( (NULL != mhd_admin) &&
+        if ( (GNUNET_YES == admin_sock_opened) &&
              (4 != dup2 (admin_sock, 4)) )
         {
           GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR,
@@ -1174,7 +1183,7 @@ main (int argc,
          before exiting; as the listen socket is no longer used,
          close it here */
       GNUNET_break (0 == close (sock));
-      if (NULL != mhd_admin)
+      if (GNUNET_YES == admin_sock_opened)
         GNUNET_break (0 == close (admin_sock));
       while ( (0 != MHD_get_daemon_info (mhd,
                                          
MHD_DAEMON_INFO_CURRENT_CONNECTIONS)->num_connections) ||
diff --git a/src/exchange/taler-exchange-httpd_db.c 
b/src/exchange/taler-exchange-httpd_db.c
index 2381127..9257cbe 100644
--- a/src/exchange/taler-exchange-httpd_db.c
+++ b/src/exchange/taler-exchange-httpd_db.c
@@ -236,8 +236,7 @@ TEH_DB_execute_deposit (struct MHD_Connection *connection,
     return TEH_RESPONSE_reply_deposit_success (connection,
                                                &deposit->coin.coin_pub,
                                                &deposit->h_wire,
-                                               &deposit->h_contract,
-                                               deposit->transaction_id,
+                                               &deposit->h_proposal_data,
                                                deposit->timestamp,
                                                deposit->refund_deadline,
                                                &deposit->merchant_pub,
@@ -312,8 +311,7 @@ TEH_DB_execute_deposit (struct MHD_Connection *connection,
   return TEH_RESPONSE_reply_deposit_success (connection,
                                              &deposit->coin.coin_pub,
                                              &deposit->h_wire,
-                                             &deposit->h_contract,
-                                             deposit->transaction_id,
+                                             &deposit->h_proposal_data,
                                              deposit->timestamp,
                                              deposit->refund_deadline,
                                              &deposit->merchant_pub,
@@ -381,10 +379,9 @@ TEH_DB_execute_refund (struct MHD_Connection *connection,
         if ( (0 == memcmp (&dep->merchant_pub,
                            &refund->merchant_pub,
                            sizeof (struct TALER_MerchantPublicKeyP))) &&
-             (0 == memcmp (&dep->h_contract,
-                           &refund->h_contract,
-                           sizeof (struct GNUNET_HashCode))) &&
-             (dep->transaction_id == refund->transaction_id) )
+             (0 == memcmp (&dep->h_proposal_data,
+                           &refund->h_proposal_data,
+                           sizeof (struct GNUNET_HashCode))) )
         {
           deposit_found = GNUNET_YES;
           break;
@@ -402,10 +399,9 @@ TEH_DB_execute_refund (struct MHD_Connection *connection,
         if ( (0 == memcmp (&ref->merchant_pub,
                            &refund->merchant_pub,
                            sizeof (struct TALER_MerchantPublicKeyP))) &&
-             (0 == memcmp (&ref->h_contract,
-                           &refund->h_contract,
+             (0 == memcmp (&ref->h_proposal_data,
+                           &refund->h_proposal_data,
                            sizeof (struct GNUNET_HashCode))) &&
-             (ref->transaction_id == refund->transaction_id) &&
              (ref->rtransaction_id == refund->rtransaction_id) )
         {
           refund_found = GNUNET_YES;
@@ -415,10 +411,9 @@ TEH_DB_execute_refund (struct MHD_Connection *connection,
         if ( (0 == memcmp (&ref->merchant_pub,
                            &refund->merchant_pub,
                            sizeof (struct TALER_MerchantPublicKeyP))) &&
-             (0 == memcmp (&ref->h_contract,
-                           &refund->h_contract,
+             (0 == memcmp (&ref->h_proposal_data,
+                           &refund->h_proposal_data,
                            sizeof (struct GNUNET_HashCode))) &&
-             (ref->transaction_id == refund->transaction_id) &&
              (ref->rtransaction_id != refund->rtransaction_id) )
         {
           GNUNET_break_op (0); /* conflicting refound found */
@@ -1870,6 +1865,11 @@ struct WtidTransactionContext
   struct TALER_MerchantPublicKeyP merchant_pub;
 
   /**
+   * Which method was used to wire the funds?
+   */
+  char *wire_method;
+
+  /**
    * Hash of the wire details of the merchant (identical for all
    * deposits), only valid if @e is_valid is #GNUNET_YES.
    */
@@ -1915,8 +1915,7 @@ struct WtidTransactionContext
  * @param merchant_pub public key of the merchant (should be same for all 
callbacks with the same @e cls)
  * @param h_wire hash of wire transfer details of the merchant (should be same 
for all callbacks with the same @e cls)
  * @param exec_time execution time of the wire transfer (should be same for 
all callbacks with the same @e cls)
- * @param h_contract which contract was this payment about
- * @param transaction_id merchant's transaction ID for the payment
+ * @param h_proposal_data which proposal was this payment about
  * @param coin_pub which public key was this payment about
  * @param deposit_value amount contributed by this coin in total
  * @param deposit_fee deposit fee charged by exchange for this coin
@@ -1924,10 +1923,10 @@ struct WtidTransactionContext
 static void
 handle_transaction_data (void *cls,
                          const struct TALER_MerchantPublicKeyP *merchant_pub,
+                         const char *wire_method,
                          const struct GNUNET_HashCode *h_wire,
                          struct GNUNET_TIME_Absolute exec_time,
-                         const struct GNUNET_HashCode *h_contract,
-                         uint64_t transaction_id,
+                         const struct GNUNET_HashCode *h_proposal_data,
                          const struct TALER_CoinSpendPublicKeyP *coin_pub,
                          const struct TALER_Amount *deposit_value,
                          const struct TALER_Amount *deposit_fee)
@@ -1943,6 +1942,7 @@ handle_transaction_data (void *cls,
     ctx->merchant_pub = *merchant_pub;
     ctx->h_wire = *h_wire;
     ctx->exec_time = exec_time;
+    ctx->wire_method = GNUNET_strdup (wire_method);
     ctx->is_valid = GNUNET_YES;
     if (GNUNET_OK !=
         TALER_amount_subtract (&ctx->total,
@@ -1959,6 +1959,8 @@ handle_transaction_data (void *cls,
     if ( (0 != memcmp (&ctx->merchant_pub,
                        merchant_pub,
                        sizeof (struct TALER_MerchantPublicKeyP))) ||
+         (0 != strcmp (wire_method,
+                       ctx->wire_method)) ||
          (0 != memcmp (&ctx->h_wire,
                        h_wire,
                        sizeof (struct GNUNET_HashCode))) )
@@ -1989,8 +1991,7 @@ handle_transaction_data (void *cls,
   wdd = GNUNET_new (struct TEH_TrackTransferDetail);
   wdd->deposit_value = *deposit_value;
   wdd->deposit_fee = *deposit_fee;
-  wdd->h_contract = *h_contract;
-  wdd->transaction_id = transaction_id;
+  wdd->h_proposal_data = *h_proposal_data;
   wdd->coin_pub = *coin_pub;
   GNUNET_CONTAINER_DLL_insert (ctx->wdd_head,
                                ctx->wdd_tail,
@@ -2014,6 +2015,10 @@ TEH_DB_execute_track_transfer (struct MHD_Connection 
*connection,
   struct WtidTransactionContext ctx;
   struct TALER_EXCHANGEDB_Session *session;
   struct TEH_TrackTransferDetail *wdd;
+  struct GNUNET_TIME_Absolute wire_fee_start_date;
+  struct GNUNET_TIME_Absolute wire_fee_end_date;
+  struct TALER_Amount wire_fee;
+  struct TALER_MasterSignatureP wire_fee_master_sig;
 
   if (NULL == (session = TEH_plugin->get_session (TEH_plugin->cls)))
   {
@@ -2024,6 +2029,7 @@ TEH_DB_execute_track_transfer (struct MHD_Connection 
*connection,
   ctx.is_valid = GNUNET_NO;
   ctx.wdd_head = NULL;
   ctx.wdd_tail = NULL;
+  ctx.wire_method = NULL;
   ret = TEH_plugin->lookup_wire_transfer (TEH_plugin->cls,
                                           session,
                                           wtid,
@@ -2050,10 +2056,36 @@ TEH_DB_execute_track_transfer (struct MHD_Connection 
*connection,
                                           "wtid");
     goto cleanup;
   }
+  if (GNUNET_OK !=
+      TEH_plugin->get_wire_fee (TEH_plugin->cls,
+                                session,
+                                ctx.wire_method,
+                                ctx.exec_time,
+                                &wire_fee_start_date,
+                                &wire_fee_end_date,
+                                &wire_fee,
+                                &wire_fee_master_sig))
+  {
+    GNUNET_break (0);
+    ret = TEH_RESPONSE_reply_internal_db_error (connection,
+                                               
TALER_EC_TRACK_TRANSFER_WIRE_FEE_NOT_FOUND);
+    goto cleanup;
+  }
+  if (GNUNET_OK !=
+      TALER_amount_subtract (&ctx.total,
+                             &ctx.total,
+                             &wire_fee))
+  {
+    GNUNET_break (0);
+    ret = TEH_RESPONSE_reply_internal_db_error (connection,
+                                               
TALER_EC_TRACK_TRANSFER_WIRE_FEE_INCONSISTENT);
+    goto cleanup;
+  }
   ret = TEH_RESPONSE_reply_track_transfer_details (connection,
                                                    &ctx.total,
                                                    &ctx.merchant_pub,
                                                    &ctx.h_wire,
+                                                   &wire_fee,
                                                    ctx.exec_time,
                                                    ctx.wdd_head);
  cleanup:
@@ -2064,6 +2096,7 @@ TEH_DB_execute_track_transfer (struct MHD_Connection 
*connection,
                                  wdd);
     GNUNET_free (wdd);
   }
+  GNUNET_free_non_null (ctx.wire_method);
   return ret;
 }
 
@@ -2080,9 +2113,9 @@ struct DepositWtidContext
   struct MHD_Connection *connection;
 
   /**
-   * Hash of the contract we are looking up.
+   * Hash of the proposal data we are looking up.
    */
-  struct GNUNET_HashCode h_contract;
+  struct GNUNET_HashCode h_proposal_data;
 
   /**
    * Hash of the wire transfer details we are looking up.
@@ -2095,11 +2128,6 @@ struct DepositWtidContext
   struct TALER_CoinSpendPublicKeyP coin_pub;
 
   /**
-   * Transaction ID we are looking up.
-   */
-  uint64_t transaction_id;
-
-  /**
    * MHD result code to return.
    */
   int res;
@@ -2150,11 +2178,10 @@ handle_wtid_data (void *cls,
     else
     {
       ctx->res = TEH_RESPONSE_reply_track_transaction (ctx->connection,
-                                                       &ctx->h_contract,
+                                                       &ctx->h_proposal_data,
                                                        &ctx->h_wire,
                                                        &ctx->coin_pub,
                                                        &coin_delta,
-                                                       ctx->transaction_id,
                                                        wtid,
                                                        execution_time);
     }
@@ -2167,20 +2194,18 @@ handle_wtid_data (void *cls,
  * associated with the given deposit.
  *
  * @param connection the MHD connection to handle
- * @param h_contract hash of the contract
+ * @param h_proposal_data hash of the proposal data
  * @param h_wire hash of the wire details
  * @param coin_pub public key of the coin to link
  * @param merchant_pub public key of the merchant
- * @param transaction_id transaction ID of the merchant
  * @return MHD result code
  */
 int
 TEH_DB_execute_track_transaction (struct MHD_Connection *connection,
-                                  const struct GNUNET_HashCode *h_contract,
+                                  const struct GNUNET_HashCode 
*h_proposal_data,
                                   const struct GNUNET_HashCode *h_wire,
                                   const struct TALER_CoinSpendPublicKeyP 
*coin_pub,
-                                  const struct TALER_MerchantPublicKeyP 
*merchant_pub,
-                                  uint64_t transaction_id)
+                                  const struct TALER_MerchantPublicKeyP 
*merchant_pub)
 {
   int ret;
   struct DepositWtidContext ctx;
@@ -2193,18 +2218,16 @@ TEH_DB_execute_track_transaction (struct MHD_Connection 
*connection,
                                                 TALER_EC_DB_SETUP_FAILED);
   }
   ctx.connection = connection;
-  ctx.h_contract = *h_contract;
+  ctx.h_proposal_data = *h_proposal_data;
   ctx.h_wire = *h_wire;
   ctx.coin_pub = *coin_pub;
-  ctx.transaction_id = transaction_id;
   ctx.res = GNUNET_SYSERR;
   ret = TEH_plugin->wire_lookup_deposit_wtid (TEH_plugin->cls,
                                               session,
-                                             h_contract,
+                                             h_proposal_data,
                                              h_wire,
                                              coin_pub,
                                              merchant_pub,
-                                             transaction_id,
                                              &handle_wtid_data,
                                              &ctx);
   if (GNUNET_SYSERR == ret)
diff --git a/src/exchange/taler-exchange-httpd_db.h 
b/src/exchange/taler-exchange-httpd_db.h
index 87db87f..47afaad 100644
--- a/src/exchange/taler-exchange-httpd_db.h
+++ b/src/exchange/taler-exchange-httpd_db.h
@@ -222,20 +222,18 @@ TEH_DB_execute_track_transfer (struct MHD_Connection 
*connection,
  * associated with the given deposit.
  *
  * @param connection the MHD connection to handle
- * @param h_contract hash of the contract
+ * @param h_proposal_data hash of the contract
  * @param h_wire hash of the wire details
  * @param coin_pub public key of the coin to link
  * @param merchant_pub public key of the merchant
- * @param transaction_id transaction ID of the merchant
  * @return MHD result code
  */
 int
 TEH_DB_execute_track_transaction (struct MHD_Connection *connection,
-                             const struct GNUNET_HashCode *h_contract,
+                             const struct GNUNET_HashCode *h_proposal_data,
                             const struct GNUNET_HashCode *h_wire,
                             const struct TALER_CoinSpendPublicKeyP *coin_pub,
-                            const struct TALER_MerchantPublicKeyP 
*merchant_pub,
-                            uint64_t transaction_id);
+                            const struct TALER_MerchantPublicKeyP 
*merchant_pub);
 
 
 #endif
diff --git a/src/exchange/taler-exchange-httpd_deposit.c 
b/src/exchange/taler-exchange-httpd_deposit.c
index d3b4d03..3ff2475 100644
--- a/src/exchange/taler-exchange-httpd_deposit.c
+++ b/src/exchange/taler-exchange-httpd_deposit.c
@@ -54,11 +54,10 @@ verify_and_execute_deposit (struct MHD_Connection 
*connection,
 
   dr.purpose.purpose = htonl (TALER_SIGNATURE_WALLET_COIN_DEPOSIT);
   dr.purpose.size = htonl (sizeof (struct TALER_DepositRequestPS));
-  dr.h_contract = deposit->h_contract;
+  dr.h_proposal_data = deposit->h_proposal_data;
   dr.h_wire = deposit->h_wire;
   dr.timestamp = GNUNET_TIME_absolute_hton (deposit->timestamp);
   dr.refund_deadline = GNUNET_TIME_absolute_hton (deposit->refund_deadline);
-  dr.transaction_id = GNUNET_htonll (deposit->transaction_id);
   TALER_amount_hton (&dr.amount_with_fee,
                      &deposit->amount_with_fee);
   TALER_amount_hton (&dr.deposit_fee,
@@ -119,10 +118,9 @@ TEH_DEPOSIT_handler_deposit (struct TEH_RequestHandler *rh,
     TALER_JSON_spec_denomination_signature ("ub_sig", &deposit.coin.denom_sig),
     GNUNET_JSON_spec_fixed_auto ("coin_pub", &deposit.coin.coin_pub),
     GNUNET_JSON_spec_fixed_auto ("merchant_pub", &deposit.merchant_pub),
-    GNUNET_JSON_spec_fixed_auto ("H_contract", &deposit.h_contract),
+    GNUNET_JSON_spec_fixed_auto ("h_proposal_data", &deposit.h_proposal_data),
     GNUNET_JSON_spec_fixed_auto ("H_wire", &deposit.h_wire),
     GNUNET_JSON_spec_fixed_auto ("coin_sig",  &deposit.csig),
-    GNUNET_JSON_spec_uint64 ("transaction_id", &deposit.transaction_id),
     GNUNET_JSON_spec_absolute_time ("timestamp", &deposit.timestamp),
     GNUNET_JSON_spec_absolute_time ("refund_deadline", 
&deposit.refund_deadline),
     GNUNET_JSON_spec_absolute_time ("wire_transfer_deadline", 
&deposit.wire_deadline),
diff --git a/src/exchange/taler-exchange-httpd_refund.c 
b/src/exchange/taler-exchange-httpd_refund.c
index 591bb18..6c85c50 100644
--- a/src/exchange/taler-exchange-httpd_refund.c
+++ b/src/exchange/taler-exchange-httpd_refund.c
@@ -54,8 +54,7 @@ verify_and_execute_refund (struct MHD_Connection *connection,
 
   rr.purpose.purpose = htonl (TALER_SIGNATURE_MERCHANT_REFUND);
   rr.purpose.size = htonl (sizeof (struct TALER_RefundRequestPS));
-  rr.h_contract = refund->h_contract;
-  rr.transaction_id = GNUNET_htonll (refund->transaction_id);
+  rr.h_proposal_data = refund->h_proposal_data;
   rr.coin_pub = refund->coin.coin_pub;
   rr.merchant = refund->merchant_pub;
   rr.rtransaction_id = GNUNET_htonll (refund->rtransaction_id);
@@ -123,8 +122,7 @@ TEH_REFUND_handler_refund (struct TEH_RequestHandler *rh,
   struct GNUNET_JSON_Specification spec[] = {
     TALER_JSON_spec_amount ("refund_amount", &refund.refund_amount),
     TALER_JSON_spec_amount ("refund_fee", &refund.refund_fee),
-    GNUNET_JSON_spec_fixed_auto ("H_contract", &refund.h_contract),
-    GNUNET_JSON_spec_uint64 ("transaction_id", &refund.transaction_id),
+    GNUNET_JSON_spec_fixed_auto ("h_proposal_data", &refund.h_proposal_data),
     GNUNET_JSON_spec_fixed_auto ("coin_pub", &refund.coin.coin_pub),
     GNUNET_JSON_spec_fixed_auto ("merchant_pub", &refund.merchant_pub),
     GNUNET_JSON_spec_uint64 ("rtransaction_id", &refund.rtransaction_id),
diff --git a/src/exchange/taler-exchange-httpd_responses.c 
b/src/exchange/taler-exchange-httpd_responses.c
index 2ecd3b4..1caef34 100644
--- a/src/exchange/taler-exchange-httpd_responses.c
+++ b/src/exchange/taler-exchange-httpd_responses.c
@@ -376,8 +376,7 @@ TEH_RESPONSE_reply_invalid_json (struct MHD_Connection 
*connection)
  * @param connection connection to the client
  * @param coin_pub public key of the coin
  * @param h_wire hash of wire details
- * @param h_contract hash of contract details
- * @param transaction_id transaction ID
+ * @param h_proposal_data hash of contract details
  * @param timestamp client's timestamp
  * @param refund_deadline until when this deposit be refunded
  * @param merchant merchant public key
@@ -388,8 +387,7 @@ int
 TEH_RESPONSE_reply_deposit_success (struct MHD_Connection *connection,
                                     const struct TALER_CoinSpendPublicKeyP 
*coin_pub,
                                     const struct GNUNET_HashCode *h_wire,
-                                    const struct GNUNET_HashCode *h_contract,
-                                    uint64_t transaction_id,
+                                    const struct GNUNET_HashCode 
*h_proposal_data,
                                     struct GNUNET_TIME_Absolute timestamp,
                                     struct GNUNET_TIME_Absolute 
refund_deadline,
                                     const struct TALER_MerchantPublicKeyP 
*merchant,
@@ -401,9 +399,8 @@ TEH_RESPONSE_reply_deposit_success (struct MHD_Connection 
*connection,
 
   dc.purpose.purpose = htonl (TALER_SIGNATURE_EXCHANGE_CONFIRM_DEPOSIT);
   dc.purpose.size = htonl (sizeof (struct TALER_DepositConfirmationPS));
-  dc.h_contract = *h_contract;
+  dc.h_proposal_data = *h_proposal_data;
   dc.h_wire = *h_wire;
-  dc.transaction_id = GNUNET_htonll (transaction_id);
   dc.timestamp = GNUNET_TIME_absolute_hton (timestamp);
   dc.refund_deadline = GNUNET_TIME_absolute_hton (refund_deadline);
   TALER_amount_hton (&dc.amount_without_fee,
@@ -452,11 +449,10 @@ compile_transaction_history (const struct 
TALER_EXCHANGEDB_TransactionList *tl)
         value = deposit->amount_with_fee;
         dr.purpose.purpose = htonl (TALER_SIGNATURE_WALLET_COIN_DEPOSIT);
         dr.purpose.size = htonl (sizeof (struct TALER_DepositRequestPS));
-        dr.h_contract = deposit->h_contract;
+        dr.h_proposal_data = deposit->h_proposal_data;
         dr.h_wire = deposit->h_wire;
         dr.timestamp = GNUNET_TIME_absolute_hton (deposit->timestamp);
         dr.refund_deadline = GNUNET_TIME_absolute_hton 
(deposit->refund_deadline);
-        dr.transaction_id = GNUNET_htonll (deposit->transaction_id);
         TALER_amount_hton (&dr.amount_with_fee,
                            &deposit->amount_with_fee);
         TALER_amount_hton (&dr.deposit_fee,
@@ -527,8 +523,7 @@ compile_transaction_history (const struct 
TALER_EXCHANGEDB_TransactionList *tl)
         }
         rr.purpose.purpose = htonl (TALER_SIGNATURE_MERCHANT_REFUND);
         rr.purpose.size = htonl (sizeof (struct TALER_RefundRequestPS));
-        rr.h_contract = refund->h_contract;
-        rr.transaction_id = GNUNET_htonll (refund->transaction_id);
+        rr.h_proposal_data = refund->h_proposal_data;
         rr.coin_pub = refund->coin.coin_pub;
         rr.merchant = refund->merchant_pub;
         rr.rtransaction_id = GNUNET_htonll (refund->rtransaction_id);
@@ -771,8 +766,7 @@ TEH_RESPONSE_reply_refund_success (struct MHD_Connection 
*connection,
 
   rc.purpose.purpose = htonl (TALER_SIGNATURE_EXCHANGE_CONFIRM_REFUND);
   rc.purpose.size = htonl (sizeof (struct TALER_RefundConfirmationPS));
-  rc.h_contract = refund->h_contract;
-  rc.transaction_id = GNUNET_htonll (refund->transaction_id);
+  rc.h_proposal_data = refund->h_proposal_data;
   rc.coin_pub = refund->coin.coin_pub;
   rc.merchant = refund->merchant_pub;
   rc.rtransaction_id = GNUNET_htonll (refund->rtransaction_id);
@@ -1167,23 +1161,21 @@ TEH_RESPONSE_reply_transfer_pending (struct 
MHD_Connection *connection,
  * them. Generates the 200 reply.
  *
  * @param connection connection to the client
- * @param h_contract hash of the contract
+ * @param h_proposal_data hash of the contract
  * @param h_wire hash of wire account details
  * @param coin_pub public key of the coin
  * @param coin_contribution how much did the coin we asked about
  *        contribute to the total transfer value? (deposit value minus fee)
- * @param transaction_id merchant transaction identifier
  * @param wtid raw wire transfer identifier
  * @param exec_time execution time of the wire transfer
  * @return MHD result code
  */
 int
 TEH_RESPONSE_reply_track_transaction (struct MHD_Connection *connection,
-                                      const struct GNUNET_HashCode *h_contract,
+                                      const struct GNUNET_HashCode 
*h_proposal_data,
                                       const struct GNUNET_HashCode *h_wire,
                                       const struct TALER_CoinSpendPublicKeyP 
*coin_pub,
                                       const struct TALER_Amount 
*coin_contribution,
-                                      uint64_t transaction_id,
                                       const struct 
TALER_WireTransferIdentifierRawP *wtid,
                                       struct GNUNET_TIME_Absolute exec_time)
 {
@@ -1194,10 +1186,9 @@ TEH_RESPONSE_reply_track_transaction (struct 
MHD_Connection *connection,
   cw.purpose.purpose = htonl (TALER_SIGNATURE_EXCHANGE_CONFIRM_WIRE);
   cw.purpose.size = htonl (sizeof (struct TALER_ConfirmWirePS));
   cw.h_wire = *h_wire;
-  cw.h_contract = *h_contract;
+  cw.h_proposal_data = *h_proposal_data;
   cw.wtid = *wtid;
   cw.coin_pub = *coin_pub;
-  cw.transaction_id = GNUNET_htonll (transaction_id);
   cw.execution_time = GNUNET_TIME_absolute_hton (exec_time);
   TALER_amount_hton (&cw.coin_contribution,
                      coin_contribution);
@@ -1223,6 +1214,7 @@ TEH_RESPONSE_reply_track_transaction (struct 
MHD_Connection *connection,
  * @param total total amount that was transferred
  * @param merchant_pub public key of the merchant
  * @param h_wire destination account
+ * @param wire_fee wire fee that was charged
  * @param exec_time execution time of the wire transfer
  * @param wdd_head linked list with details about the combined deposits
  * @return MHD result code
@@ -1232,6 +1224,7 @@ TEH_RESPONSE_reply_track_transfer_details (struct 
MHD_Connection *connection,
                                            const struct TALER_Amount *total,
                                            const struct 
TALER_MerchantPublicKeyP *merchant_pub,
                                            const struct GNUNET_HashCode 
*h_wire,
+                                           const struct TALER_Amount *wire_fee,
                                            struct GNUNET_TIME_Absolute 
exec_time,
                                            const struct 
TEH_TrackTransferDetail *wdd_head)
 {
@@ -1248,9 +1241,8 @@ TEH_RESPONSE_reply_track_transfer_details (struct 
MHD_Connection *connection,
   hash_context = GNUNET_CRYPTO_hash_context_start ();
   for (wdd_pos = wdd_head; NULL != wdd_pos; wdd_pos = wdd_pos->next)
   {
-    dd.h_contract = wdd_pos->h_contract;
+    dd.h_proposal_data = wdd_pos->h_proposal_data;
     dd.execution_time = GNUNET_TIME_absolute_hton (exec_time);
-    dd.transaction_id = GNUNET_htonll (wdd_pos->transaction_id);
     dd.coin_pub = wdd_pos->coin_pub;
     TALER_amount_hton (&dd.deposit_value,
                        &wdd_pos->deposit_value);
@@ -1261,9 +1253,8 @@ TEH_RESPONSE_reply_track_transfer_details (struct 
MHD_Connection *connection,
                                      sizeof (struct TALER_WireDepositDetailP));
     GNUNET_assert (0 ==
                    json_array_append_new (deposits,
-                                          json_pack ("{s:o, s:I, s:o, s:o, 
s:o}",
-                                                     "H_contract", 
GNUNET_JSON_from_data_auto (&wdd_pos->h_contract),
-                                                     "transaction_id", 
(json_int_t) wdd_pos->transaction_id,
+                                          json_pack ("{s:o, s:o, s:o, s:o}",
+                                                     "h_proposal_data", 
GNUNET_JSON_from_data_auto (&wdd_pos->h_proposal_data),
                                                      "coin_pub", 
GNUNET_JSON_from_data_auto (&wdd_pos->coin_pub),
                                                      "deposit_value", 
TALER_JSON_from_amount (&wdd_pos->deposit_value),
                                                      "deposit_fee", 
TALER_JSON_from_amount (&wdd_pos->deposit_fee))));
@@ -1272,6 +1263,8 @@ TEH_RESPONSE_reply_track_transfer_details (struct 
MHD_Connection *connection,
   wdp.purpose.size = htonl (sizeof (struct TALER_WireDepositDataPS));
   TALER_amount_hton (&wdp.total,
                      total);
+  TALER_amount_hton (&wdp.wire_fee,
+                     wire_fee);
   wdp.merchant_pub = *merchant_pub;
   wdp.h_wire = *h_wire;
   GNUNET_CRYPTO_hash_context_finish (hash_context,
@@ -1281,8 +1274,9 @@ TEH_RESPONSE_reply_track_transfer_details (struct 
MHD_Connection *connection,
                &sig);
   return TEH_RESPONSE_reply_json_pack (connection,
                                        MHD_HTTP_OK,
-                                       "{s:o, s:o, s:o, s:o, s:o, s:o, s:o}",
+                                       "{s:o, s:o, s:o, s:o, s:o, s:o, s:o, 
s:o}",
                                        "total", TALER_JSON_from_amount (total),
+                                       "wire_fee", TALER_JSON_from_amount 
(wire_fee),
                                        "merchant_pub", 
GNUNET_JSON_from_data_auto (merchant_pub),
                                        "H_wire", GNUNET_JSON_from_data_auto 
(h_wire),
                                        "execution_time", 
GNUNET_JSON_from_time_abs (exec_time),
diff --git a/src/exchange/taler-exchange-httpd_responses.h 
b/src/exchange/taler-exchange-httpd_responses.h
index 70d384f..179ae00 100644
--- a/src/exchange/taler-exchange-httpd_responses.h
+++ b/src/exchange/taler-exchange-httpd_responses.h
@@ -231,8 +231,7 @@ TEH_RESPONSE_reply_invalid_json (struct MHD_Connection 
*connectionx);
  * @param connection connection to the client
  * @param coin_pub public key of the coin
  * @param h_wire hash of wire details
- * @param h_contract hash of contract details
- * @param transaction_id transaction ID
+ * @param h_proposal_data hash of proposal data
  * @param timestamp client's timestamp
  * @param refund_deadline until when this deposit be refunded
  * @param merchant merchant public key
@@ -243,8 +242,7 @@ int
 TEH_RESPONSE_reply_deposit_success (struct MHD_Connection *connection,
                                     const struct TALER_CoinSpendPublicKeyP 
*coin_pub,
                                     const struct GNUNET_HashCode *h_wire,
-                                    const struct GNUNET_HashCode *h_contract,
-                                    uint64_t transaction_id,
+                                    const struct GNUNET_HashCode 
*h_proposal_data,
                                     struct GNUNET_TIME_Absolute timestamp,
                                     struct GNUNET_TIME_Absolute 
refund_deadline,
                                     const struct TALER_MerchantPublicKeyP 
*merchant,
@@ -337,22 +335,20 @@ TEH_RESPONSE_reply_transfer_pending (struct 
MHD_Connection *connection,
  * them. Generates the 200 reply.
  *
  * @param connection connection to the client
- * @param h_contract hash of the contract
+ * @param h_proposal_data hash of the proposal data
  * @param h_wire hash of wire account details
  * @param coin_pub public key of the coin
  * @param coin_contribution contribution of this coin to the total amount 
transferred
- * @param transaction_id merchant transaction identifier
  * @param wtid raw wire transfer identifier
  * @param exec_time execution time of the wire transfer
  * @return MHD result code
  */
 int
 TEH_RESPONSE_reply_track_transaction (struct MHD_Connection *connection,
-                                      const struct GNUNET_HashCode *h_contract,
+                                      const struct GNUNET_HashCode 
*h_proposal_data,
                                       const struct GNUNET_HashCode *h_wire,
                                       const struct TALER_CoinSpendPublicKeyP 
*coin_pub,
                                       const struct TALER_Amount 
*coin_contribution,
-                                      uint64_t transaction_id,
                                       const struct 
TALER_WireTransferIdentifierRawP *wtid,
                                       struct GNUNET_TIME_Absolute exec_time);
 
@@ -374,14 +370,9 @@ struct TEH_TrackTransferDetail
   struct TEH_TrackTransferDetail *prev;
 
   /**
-   * Hash of the contract
+   * Hash of the proposal data.
    */
-  struct GNUNET_HashCode h_contract;
-
-  /**
-   * Merchant's transaction ID.
-   */
-  uint64_t transaction_id;
+  struct GNUNET_HashCode h_proposal_data;
 
   /**
    * Coin's public key.
@@ -408,6 +399,7 @@ struct TEH_TrackTransferDetail
  * @param total total amount that was transferred
  * @param merchant_pub public key of the merchant
  * @param h_wire destination account
+ * @param wire_fee wire fee that was charged
  * @param exec_time execution time of the wire transfer
  * @param wdd_head linked list with details about the combined deposits
  * @return MHD result code
@@ -417,6 +409,7 @@ TEH_RESPONSE_reply_track_transfer_details (struct 
MHD_Connection *connection,
                                            const struct TALER_Amount *total,
                                            const struct 
TALER_MerchantPublicKeyP *merchant_pub,
                                            const struct GNUNET_HashCode 
*h_wire,
+                                           const struct TALER_Amount *wire_fee,
                                            struct GNUNET_TIME_Absolute 
exec_time,
                                            const struct 
TEH_TrackTransferDetail *wdd_head);
 
diff --git a/src/exchange/taler-exchange-httpd_tracking.c 
b/src/exchange/taler-exchange-httpd_tracking.c
index 04b5013..9d4f894 100644
--- a/src/exchange/taler-exchange-httpd_tracking.c
+++ b/src/exchange/taler-exchange-httpd_tracking.c
@@ -70,15 +70,13 @@ TEH_TRACKING_handler_track_transfer (struct 
TEH_RequestHandler *rh,
  * @param tps signed request to execute
  * @param merchant_pub public key from the merchant
  * @param merchant_sig signature from the merchant (to be checked)
- * @param transaction_id transaction ID (in host byte order)
  * @return MHD result code
  */
 static int
 check_and_handle_track_transaction_request (struct MHD_Connection *connection,
                                             const struct TALER_DepositTrackPS 
*tps,
                                             struct TALER_MerchantPublicKeyP 
*merchant_pub,
-                                            struct TALER_MerchantSignatureP 
*merchant_sig,
-                                            uint64_t transaction_id)
+                                            struct TALER_MerchantSignatureP 
*merchant_sig)
 {
   if (GNUNET_OK !=
       GNUNET_CRYPTO_eddsa_verify (TALER_SIGNATURE_MERCHANT_TRACK_TRANSACTION,
@@ -92,11 +90,10 @@ check_and_handle_track_transaction_request (struct 
MHD_Connection *connection,
                                                 "merchant_sig");
   }
   return TEH_DB_execute_track_transaction (connection,
-                                           &tps->h_contract,
+                                           &tps->h_proposal_data,
                                            &tps->h_wire,
                                            &tps->coin_pub,
-                                           merchant_pub,
-                                           transaction_id);
+                                           merchant_pub);
 }
 
 
@@ -120,13 +117,11 @@ TEH_TRACKING_handler_track_transaction (struct 
TEH_RequestHandler *rh,
   int res;
   json_t *json;
   struct TALER_DepositTrackPS tps;
-  uint64_t transaction_id;
   struct TALER_MerchantSignatureP merchant_sig;
   struct GNUNET_JSON_Specification spec[] = {
     GNUNET_JSON_spec_fixed_auto ("H_wire", &tps.h_wire),
-    GNUNET_JSON_spec_fixed_auto ("H_contract", &tps.h_contract),
+    GNUNET_JSON_spec_fixed_auto ("h_proposal_data", &tps.h_proposal_data),
     GNUNET_JSON_spec_fixed_auto ("coin_pub", &tps.coin_pub),
-    GNUNET_JSON_spec_uint64 ("transaction_id", &transaction_id),
     GNUNET_JSON_spec_fixed_auto ("merchant_pub", &tps.merchant),
     GNUNET_JSON_spec_fixed_auto ("merchant_sig", &merchant_sig),
     GNUNET_JSON_spec_end ()
@@ -151,12 +146,10 @@ TEH_TRACKING_handler_track_transaction (struct 
TEH_RequestHandler *rh,
   }
   tps.purpose.size = htonl (sizeof (struct TALER_DepositTrackPS));
   tps.purpose.purpose = htonl (TALER_SIGNATURE_MERCHANT_TRACK_TRANSACTION);
-  tps.transaction_id = GNUNET_htonll (transaction_id);
   res = check_and_handle_track_transaction_request (connection,
                                                     &tps,
                                                     &tps.merchant,
-                                                    &merchant_sig,
-                                                    transaction_id);
+                                                    &merchant_sig);
   GNUNET_JSON_parse_free (spec);
   json_decref (json);
   return res;
diff --git a/src/exchange/taler-exchange-httpd_validation.c 
b/src/exchange/taler-exchange-httpd_validation.c
index f5221fe..f8a1f7c 100644
--- a/src/exchange/taler-exchange-httpd_validation.c
+++ b/src/exchange/taler-exchange-httpd_validation.c
@@ -1,6 +1,6 @@
 /*
   This file is part of TALER
-  Copyright (C) 2016 GNUnet e.V.
+  Copyright (C) 2016, 2017 GNUnet e.V.
 
   TALER is free software; you can redistribute it and/or modify it under the
   terms of the GNU Affero General Public License as published by the Free 
Software
@@ -23,6 +23,7 @@
 #include <gnunet/gnunet_util_lib.h>
 #include "taler-exchange-httpd.h"
 #include "taler-exchange-httpd_validation.h"
+#include "taler-exchange-httpd_wire.h"
 #include "taler_wire_lib.h"
 
 
@@ -66,6 +67,52 @@ static struct Plugin *wire_tail;
 
 
 /**
+ * Load plugin @a name.
+ *
+ * @param cls pointer to `int` to set to #GNUNET_SYSERR on errors
+ * @param name name of the plugin to load
+ */
+static void
+load_plugin (void *cls,
+             const char *name)
+{
+  int *ret = cls;
+  struct Plugin *p;
+  json_t *fees;
+
+  p = GNUNET_new (struct Plugin);
+  p->type = GNUNET_strdup (name);
+  p->plugin = TALER_WIRE_plugin_load (cfg,
+                                      name);
+  if (NULL == p->plugin)
+  {
+    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                "Failed to load plugin %s\n",
+                name);
+    GNUNET_free (p->type);
+    GNUNET_free (p);
+    *ret = GNUNET_SYSERR;
+    return;
+  }
+  fees = TEH_WIRE_get_fees (name);
+  if (NULL == fees)
+  {
+    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                "Disabling method `%s' as wire transfer fees are not given 
correctly\n",
+                name);
+    GNUNET_free (p->type);
+    GNUNET_free (p);
+    *ret = GNUNET_SYSERR;
+    return;
+  }
+  json_decref (fees);
+  GNUNET_CONTAINER_DLL_insert (wire_head,
+                               wire_tail,
+                               p);
+}
+
+
+/**
  * Initialize validation subsystem.
  *
  * @param cfg configuration to use
@@ -74,47 +121,21 @@ static struct Plugin *wire_tail;
 int
 TEH_VALIDATION_init (const struct GNUNET_CONFIGURATION_Handle *cfg)
 {
-  struct Plugin *p;
-  char *wireformats;
-  const char *token;
-
-  /* Find out list of supported wire formats */
-  if (GNUNET_OK !=
-      GNUNET_CONFIGURATION_get_value_string (cfg,
-                                             "exchange",
-                                             "wireformat",
-                                             &wireformats))
-  {
-    GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
-                               "exchange",
-                               "wireformat");
-    return GNUNET_SYSERR;
-  }
-  for (token = strtok (wireformats,
-                       " ");
-       NULL != token;
-       token = strtok (NULL,
-                       " "))
+  int ret;
+
+  ret = GNUNET_OK;
+  TALER_WIRE_find_enabled (cfg,
+                           &load_plugin,
+                           &ret);
+  if (NULL == wire_head)
   {
-    p = GNUNET_new (struct Plugin);
-    p->type = GNUNET_strdup (token);
-    p->plugin = TALER_WIRE_plugin_load (cfg,
-                                        token);
-    if (NULL == p->plugin)
-    {
-      GNUNET_free (p);
-      GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                  "Failed to load plugin %s\n",
-                  token);
-      TEH_VALIDATION_done ();
-      return GNUNET_SYSERR;
-    }
-    GNUNET_CONTAINER_DLL_insert (wire_head,
-                                 wire_tail,
-                                 p);
+    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                "Failed to find properly configured wire transfer method\n");
+    ret = GNUNET_SYSERR;
   }
-  GNUNET_free (wireformats);
-  return GNUNET_OK;
+  if (GNUNET_OK != ret)
+    TEH_VALIDATION_done ();
+  return ret;
 }
 
 
@@ -194,17 +215,17 @@ json_t *
 TEH_VALIDATION_get_wire_methods (const char *prefix)
 {
   json_t *methods;
-  json_t *method;
-  struct Plugin *p;
-  struct TALER_WIRE_Plugin *plugin;
   char *account_name;
   char *emsg;
   enum TALER_ErrorCode ec;
 
   methods = json_object ();
-  for (p=wire_head;NULL != p;p = p->next)
+  for (struct Plugin *p=wire_head;NULL != p;p = p->next)
   {
-    plugin = p->plugin;
+    struct TALER_WIRE_Plugin *plugin = p->plugin;
+    json_t *method;
+    json_t *fees;
+
     GNUNET_asprintf (&account_name,
                      "%s-%s",
                      prefix,
@@ -226,6 +247,22 @@ TEH_VALIDATION_get_wire_methods (const char *prefix)
       json_decref (method);
       method = NULL;
     }
+    fees = TEH_WIRE_get_fees (p->type);
+    if (NULL == fees)
+    {
+      GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                  "Disabling method `%s' as wire transfer fees are not given 
correctly\n",
+                  p->type);
+      json_decref (method);
+      method = NULL;
+    }
+    else
+    {
+      json_object_set_new (method,
+                           "fees",
+                           fees);
+    }
+
     if (NULL != method)
       json_object_set_new (methods,
                            p->type,
diff --git a/src/exchange/taler-exchange-httpd_wire.c 
b/src/exchange/taler-exchange-httpd_wire.c
index 7857a5b..9c8b2ff 100644
--- a/src/exchange/taler-exchange-httpd_wire.c
+++ b/src/exchange/taler-exchange-httpd_wire.c
@@ -1,6 +1,6 @@
 /*
   This file is part of TALER
-  Copyright (C) 2015, 2016 GNUnet e.V. and INRIA
+  Copyright (C) 2015-2017 GNUnet e.V. and INRIA
 
   TALER is free software; you can redistribute it and/or modify it under the
   terms of the GNU Affero General Public License as published by the Free 
Software
@@ -24,6 +24,7 @@
 #include "taler-exchange-httpd_responses.h"
 #include "taler-exchange-httpd_validation.h"
 #include "taler-exchange-httpd_wire.h"
+#include "taler_json_lib.h"
 #include <jansson.h>
 
 /**
@@ -33,6 +34,76 @@ static json_t *wire_methods;
 
 
 /**
+ * Convert fee structure to JSON result to be returned
+ * as part of a /wire response.
+ *
+ * @param af fee structure to convert
+ * @return NULL on error, otherwise json data structure for /wire.
+ */
+static json_t *
+fees_to_json (struct TALER_EXCHANGEDB_AggregateFees *af)
+{
+  json_t *a;
+
+  a = json_array ();
+  while (NULL != af)
+  {
+    if ( (GNUNET_NO == GNUNET_TIME_round_abs (&af->start_date)) ||
+         (GNUNET_NO == GNUNET_TIME_round_abs (&af->end_date)) )
+    {
+      json_decref (a);
+      return NULL;
+    }
+    json_array_append_new (a,
+                           json_pack ("{s:o, s:o, s:o, s:o}",
+                                      "wire_fee", TALER_JSON_from_amount 
(&af->wire_fee),
+                                      "start_date", GNUNET_JSON_from_time_abs 
(af->start_date),
+                                      "end_date", GNUNET_JSON_from_time_abs 
(af->end_date),
+                                      "sig", GNUNET_JSON_from_data_auto 
(&af->master_sig)));
+    af = af->next;
+  }
+  return a;
+}
+
+
+/**
+ * Obtain fee structure for @a wire_plugin_name wire transfers.
+ *
+ * @param wire_plugin_name name of the plugin to load fees for
+ * @return JSON object (to be freed by caller) with fee structure
+ */
+json_t *
+TEH_WIRE_get_fees (const char *wire_plugin_name)
+{
+  struct TALER_EXCHANGEDB_AggregateFees *af;
+  json_t *j;
+  struct GNUNET_TIME_Absolute now;
+
+  af = TALER_EXCHANGEDB_fees_read (cfg,
+                                   wire_plugin_name);
+  now = GNUNET_TIME_absolute_get ();
+  while ( (NULL != af) &&
+          (af->end_date.abs_value_us < now.abs_value_us) )
+  {
+    struct TALER_EXCHANGEDB_AggregateFees *n = af->next;
+
+    GNUNET_free (af);
+    af = n;
+  }
+  if (NULL == af)
+  {
+    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                "Failed to find current wire transfer fees for `%s'\n",
+                wire_plugin_name);
+    return NULL;
+  }
+  j = fees_to_json (af);
+  TALER_EXCHANGEDB_fees_free (af);
+  return j;
+}
+
+
+/**
  * Handle a "/wire" request.
  *
  * @param rh context of the handler
diff --git a/src/exchange/taler-exchange-httpd_wire.h 
b/src/exchange/taler-exchange-httpd_wire.h
index d67c16a..a85fde6 100644
--- a/src/exchange/taler-exchange-httpd_wire.h
+++ b/src/exchange/taler-exchange-httpd_wire.h
@@ -27,6 +27,16 @@
 
 
 /**
+ * Obtain fee structure for @a wire_plugin_name wire transfers.
+ *
+ * @param wire_plugin_name name of the plugin to load fees for
+ * @return JSON object (to be freed by caller) with fee structure
+ */
+json_t *
+TEH_WIRE_get_fees (const char *wire_plugin_name);
+
+
+/**
  * Handle a "/wire" request.
  *
  * @param rh context of the handler
diff --git a/src/exchange/test-taler-exchange-aggregator-postgres.conf 
b/src/exchange/test-taler-exchange-aggregator-postgres.conf
index 0822bab..e70a933 100644
--- a/src/exchange/test-taler-exchange-aggregator-postgres.conf
+++ b/src/exchange/test-taler-exchange-aggregator-postgres.conf
@@ -1,8 +1,52 @@
+[PATHS]
+# Persistant data storage for the testcase
+TALER_TEST_HOME = test_taler_exchange_httpd_home/
+
+[taler]
+# Currency supported by the exchange (can only be one)
+CURRENCY = EUR
+
 [exchange]
-#The DB plugin to use
+# The DB plugin to use
 DB = postgres
 
+# HTTP port the exchange listens to
+PORT = 8081
+
+# Master public key used to sign the exchange's various keys
+MASTER_PUBLIC_KEY = 98NJW3CQHZQGQXTY3K85K531XKPAPAVV4Q5V8PYYRR00NJGZWNVG
+
+# Expected base URL of the exchange.
+BASE_URL = "https://exchange.taler.net/";
+
 [exchangedb-postgres]
 
 #The connection string the plugin has to use for connecting to the database
 DB_CONN_STR = postgres:///talercheck
+
+
+[exchange-wire-test]
+# Enable 'test' for testing of the actual coin operations.
+ENABLE = YES
+
+# Fees for the forseeable future...
+# If you see this after 2017, update to match the next 10 years...
+WIRE-FEE-2017 = EUR:0.01
+WIRE-FEE-2018 = EUR:0.01
+WIRE-FEE-2019 = EUR:0.01
+WIRE-FEE-2020 = EUR:0.01
+WIRE-FEE-2021 = EUR:0.01
+WIRE-FEE-2022 = EUR:0.01
+WIRE-FEE-2023 = EUR:0.01
+WIRE-FEE-2024 = EUR:0.01
+WIRE-FEE-2025 = EUR:0.01
+WIRE-FEE-2026 = EUR:0.01
+
+
+[exchange-wire-outgoing-test]
+# What is the main website of the bank?
+BANK_URI = "http://localhost:8082/";
+
+# From which account at the 'bank' should outgoing
+# wire transfers be made?
+EXCHANGE_ACCOUNT_NUMBER = 3
diff --git a/src/exchange/test_taler_exchange_aggregator.c 
b/src/exchange/test_taler_exchange_aggregator.c
index cd199e0..5a3974f 100644
--- a/src/exchange/test_taler_exchange_aggregator.c
+++ b/src/exchange/test_taler_exchange_aggregator.c
@@ -1,6 +1,6 @@
 /*
   This file is part of TALER
-  (C) 2016 Inria and GNUnet e.V.
+  (C) 2016, 2017 Inria and GNUnet e.V.
 
   TALER is free software; you can redistribute it and/or modify it under the
   terms of the GNU General Public License as published by the Free Software
@@ -111,6 +111,11 @@ struct Command
       uint64_t credit_account;
 
       /**
+       * Base URL of the exchange.
+       */
+      const char *exchange_base_url;
+
+      /**
        * Subject of the transfer, set by the command.
        */
       struct TALER_WireTransferIdentifierRawP wtid;
@@ -135,11 +140,6 @@ struct Command
       uint64_t merchant_account;
 
       /**
-       * Merchant's transaction ID.
-       */
-      uint64_t transaction_id;
-
-      /**
        * By when does the merchant request the funds to be wired.
        */
       struct GNUNET_TIME_Relative wire_deadline;
@@ -419,7 +419,7 @@ do_deposit (struct Command *cmd)
   /* contract is just picked at random;
      note: we may want to write this back to 'cmd' in the future. */
   GNUNET_CRYPTO_hash_create_random (GNUNET_CRYPTO_QUALITY_WEAK,
-                                    &deposit.h_contract);
+                                    &deposit.h_proposal_data);
   if ( (GNUNET_OK !=
         TALER_string_to_amount (cmd->details.deposit.amount_with_fee,
                                 &deposit.amount_with_fee)) ||
@@ -439,7 +439,6 @@ do_deposit (struct Command *cmd)
   GNUNET_assert (GNUNET_OK ==
                  TALER_JSON_hash (deposit.receiver_wire_account,
                                   &deposit.h_wire));
-  deposit.transaction_id = cmd->details.deposit.transaction_id;
   deposit.timestamp = GNUNET_TIME_absolute_get ();
   deposit.wire_deadline = GNUNET_TIME_relative_to_absolute 
(cmd->details.deposit.wire_deadline);
 
@@ -518,7 +517,7 @@ interpreter (void *cls)
                                    NULL, NULL, NULL,
                                    "taler-exchange-aggregator",
                                    "taler-exchange-aggregator",
-                                   "-c", "test_taler_exchange_httpd.conf",
+                                   "-c", config_filename,
                                    "-t", /* enable temporary tables */
                                    NULL);
       if (NULL == aggregator_proc)
@@ -562,10 +561,11 @@ interpreter (void *cls)
         }
         if (GNUNET_OK !=
             TALER_FAKEBANK_check (fb,
-                            &want_amount,
-                            cmd->details.expect_transaction.debit_account,
-                            cmd->details.expect_transaction.credit_account,
-                            &cmd->details.expect_transaction.wtid))
+                                  &want_amount,
+                                  
cmd->details.expect_transaction.debit_account,
+                                  
cmd->details.expect_transaction.credit_account,
+                                  
cmd->details.expect_transaction.exchange_base_url,
+                                  &cmd->details.expect_transaction.wtid))
         {
           fail (cmd);
           return;
@@ -606,7 +606,6 @@ run_test ()
       .label = "do-deposit-1",
       .details.deposit.merchant_name = "bob",
       .details.deposit.merchant_account = 4,
-      .details.deposit.transaction_id = 1,
       .details.deposit.wire_deadline = { 1000LL * 1000 * 0 }, /* 0s */
       .details.deposit.amount_with_fee = "EUR:1",
       .details.deposit.deposit_fee = "EUR:0.1"
@@ -621,7 +620,8 @@ run_test ()
       .label = "expect-deposit-1",
       .details.expect_transaction.debit_account = 3,
       .details.expect_transaction.credit_account = 4,
-      .details.expect_transaction.amount = "EUR:0.9"
+      .details.expect_transaction.exchange_base_url = 
"https://exchange.taler.net/";,
+      .details.expect_transaction.amount = "EUR:0.89"
     },
 
     {
@@ -645,7 +645,6 @@ run_test ()
       .label = "do-deposit-2a",
       .details.deposit.merchant_name = "bob",
       .details.deposit.merchant_account = 4,
-      .details.deposit.transaction_id = 2,
       .details.deposit.wire_deadline = { 1000LL * 1000 * 0 }, /* 0s */
       .details.deposit.amount_with_fee = "EUR:1",
       .details.deposit.deposit_fee = "EUR:0.1"
@@ -655,7 +654,6 @@ run_test ()
       .label = "do-deposit-2b",
       .details.deposit.merchant_name = "bob",
       .details.deposit.merchant_account = 4,
-      .details.deposit.transaction_id = 3,
       .details.deposit.wire_deadline = { 1000LL * 1000 * 0 }, /* 0s */
       .details.deposit.amount_with_fee = "EUR:1",
       .details.deposit.deposit_fee = "EUR:0.1"
@@ -669,7 +667,8 @@ run_test ()
       .label = "expect-deposit-2",
       .details.expect_transaction.debit_account = 3,
       .details.expect_transaction.credit_account = 4,
-      .details.expect_transaction.amount = "EUR:1.8"
+      .details.expect_transaction.exchange_base_url = 
"https://exchange.taler.net/";,
+      .details.expect_transaction.amount = "EUR:1.79"
     },
 
     {
@@ -683,7 +682,6 @@ run_test ()
       .label = "do-deposit-3a",
       .details.deposit.merchant_name = "bob",
       .details.deposit.merchant_account = 4,
-      .details.deposit.transaction_id = 4,
       .details.deposit.wire_deadline = { 1000LL * 1000 * 0 }, /* 0s */
       .details.deposit.amount_with_fee = "EUR:1",
       .details.deposit.deposit_fee = "EUR:0.1"
@@ -693,7 +691,6 @@ run_test ()
       .label = "do-deposit-3b",
       .details.deposit.merchant_name = "bob",
       .details.deposit.merchant_account = 5,
-      .details.deposit.transaction_id = 5,
       .details.deposit.wire_deadline = { 1000LL * 1000 * 0 }, /* 0s */
       .details.deposit.amount_with_fee = "EUR:1",
       .details.deposit.deposit_fee = "EUR:0.1"
@@ -703,7 +700,6 @@ run_test ()
       .label = "do-deposit-3c",
       .details.deposit.merchant_name = "alice",
       .details.deposit.merchant_account = 4,
-      .details.deposit.transaction_id = 1,
       .details.deposit.wire_deadline = { 1000LL * 1000 * 0 }, /* 0s */
       .details.deposit.amount_with_fee = "EUR:1",
       .details.deposit.deposit_fee = "EUR:0.1"
@@ -717,21 +713,24 @@ run_test ()
       .label = "expect-deposit-3a",
       .details.expect_transaction.debit_account = 3,
       .details.expect_transaction.credit_account = 4,
-      .details.expect_transaction.amount = "EUR:0.9"
+      .details.expect_transaction.exchange_base_url = 
"https://exchange.taler.net/";,
+      .details.expect_transaction.amount = "EUR:0.89"
     },
     {
       .opcode = OPCODE_EXPECT_TRANSACTION,
       .label = "expect-deposit-3b",
       .details.expect_transaction.debit_account = 3,
       .details.expect_transaction.credit_account = 4,
-      .details.expect_transaction.amount = "EUR:0.9"
+      .details.expect_transaction.exchange_base_url = 
"https://exchange.taler.net/";,
+      .details.expect_transaction.amount = "EUR:0.89"
     },
     {
       .opcode = OPCODE_EXPECT_TRANSACTION,
       .label = "expect-deposit-3c",
       .details.expect_transaction.debit_account = 3,
       .details.expect_transaction.credit_account = 5,
-      .details.expect_transaction.amount = "EUR:0.9"
+      .details.expect_transaction.exchange_base_url = 
"https://exchange.taler.net/";,
+      .details.expect_transaction.amount = "EUR:0.89"
     },
     {
       .opcode = OPCODE_EXPECT_TRANSACTIONS_EMPTY,
@@ -744,7 +743,6 @@ run_test ()
       .label = "do-deposit-4a",
       .details.deposit.merchant_name = "bob",
       .details.deposit.merchant_account = 4,
-      .details.deposit.transaction_id = 6,
       .details.deposit.wire_deadline = { 1000LL * 1000 * 5 }, /* 5s */
       .details.deposit.amount_with_fee = "EUR:0.2",
       .details.deposit.deposit_fee = "EUR:0.1"
@@ -754,7 +752,6 @@ run_test ()
       .label = "do-deposit-4b",
       .details.deposit.merchant_name = "bob",
       .details.deposit.merchant_account = 4,
-      .details.deposit.transaction_id = 7,
       .details.deposit.wire_deadline = { 1000LL * 1000 * 5 }, /* 5s */
       .details.deposit.amount_with_fee = "EUR:0.2",
       .details.deposit.deposit_fee = "EUR:0.1"
@@ -781,7 +778,8 @@ run_test ()
       .label = "expect-deposit-4",
       .details.expect_transaction.debit_account = 3,
       .details.expect_transaction.credit_account = 4,
-      .details.expect_transaction.amount = "EUR:0.2"
+      .details.expect_transaction.exchange_base_url = 
"https://exchange.taler.net/";,
+      .details.expect_transaction.amount = "EUR:0.19"
     },
 
     /* test picking all deposits at earliest deadline */
@@ -790,7 +788,6 @@ run_test ()
       .label = "do-deposit-5a",
       .details.deposit.merchant_name = "bob",
       .details.deposit.merchant_account = 4,
-      .details.deposit.transaction_id = 8,
       .details.deposit.wire_deadline = { 1000LL * 1000 * 10 }, /* 10s */
       .details.deposit.amount_with_fee = "EUR:0.2",
       .details.deposit.deposit_fee = "EUR:0.1"
@@ -800,7 +797,6 @@ run_test ()
       .label = "do-deposit-5b",
       .details.deposit.merchant_name = "bob",
       .details.deposit.merchant_account = 4,
-      .details.deposit.transaction_id = 9,
       .details.deposit.wire_deadline = { 1000LL * 1000 * 5 }, /* 5s */
       .details.deposit.amount_with_fee = "EUR:0.2",
       .details.deposit.deposit_fee = "EUR:0.1"
@@ -827,7 +823,8 @@ run_test ()
       .label = "expect-deposit-5",
       .details.expect_transaction.debit_account = 3,
       .details.expect_transaction.credit_account = 4,
-      .details.expect_transaction.amount = "EUR:0.2"
+      .details.expect_transaction.exchange_base_url = 
"https://exchange.taler.net/";,
+      .details.expect_transaction.amount = "EUR:0.19"
     },
 
     /* Test NEVER running 'tiny' unless they make up minimum unit */
@@ -836,7 +833,6 @@ run_test ()
       .label = "do-deposit-6a",
       .details.deposit.merchant_name = "bob",
       .details.deposit.merchant_account = 4,
-      .details.deposit.transaction_id = 10,
       .details.deposit.wire_deadline = { 1000LL * 1000 * 0 }, /* 0s */
       .details.deposit.amount_with_fee = "EUR:0.102",
       .details.deposit.deposit_fee = "EUR:0.1"
@@ -854,7 +850,6 @@ run_test ()
       .label = "do-deposit-6b",
       .details.deposit.merchant_name = "bob",
       .details.deposit.merchant_account = 4,
-      .details.deposit.transaction_id = 11,
       .details.deposit.wire_deadline = { 1000LL * 1000 * 0 }, /* 0s */
       .details.deposit.amount_with_fee = "EUR:0.102",
       .details.deposit.deposit_fee = "EUR:0.1"
@@ -864,7 +859,6 @@ run_test ()
       .label = "do-deposit-6c",
       .details.deposit.merchant_name = "bob",
       .details.deposit.merchant_account = 4,
-      .details.deposit.transaction_id = 12,
       .details.deposit.wire_deadline = { 1000LL * 1000 * 0 }, /* 0s */
       .details.deposit.amount_with_fee = "EUR:0.102",
       .details.deposit.deposit_fee = "EUR:0.1"
@@ -882,7 +876,6 @@ run_test ()
       .label = "do-deposit-6d",
       .details.deposit.merchant_name = "bob",
       .details.deposit.merchant_account = 4,
-      .details.deposit.transaction_id = 13,
       .details.deposit.wire_deadline = { 1000LL * 1000 * 0 }, /* 0s */
       .details.deposit.amount_with_fee = "EUR:0.102",
       .details.deposit.deposit_fee = "EUR:0.1"
@@ -900,9 +893,8 @@ run_test ()
       .label = "do-deposit-6e",
       .details.deposit.merchant_name = "bob",
       .details.deposit.merchant_account = 4,
-      .details.deposit.transaction_id = 14,
       .details.deposit.wire_deadline = { 1000LL * 1000 * 0 }, /* 0s */
-      .details.deposit.amount_with_fee = "EUR:0.102",
+      .details.deposit.amount_with_fee = "EUR:0.112",
       .details.deposit.deposit_fee = "EUR:0.1"
     },
     {
@@ -914,6 +906,7 @@ run_test ()
       .label = "expect-deposit-6",
       .details.expect_transaction.debit_account = 3,
       .details.expect_transaction.credit_account = 4,
+      .details.expect_transaction.exchange_base_url = 
"https://exchange.taler.net/";,
       .details.expect_transaction.amount = "EUR:0.01"
     },
 
@@ -923,7 +916,6 @@ run_test ()
       .label = "do-deposit-7a",
       .details.deposit.merchant_name = "bob",
       .details.deposit.merchant_account = 4,
-      .details.deposit.transaction_id = 15,
       .details.deposit.wire_deadline = { 1000LL * 1000 * 0 }, /* 0s */
       .details.deposit.amount_with_fee = "EUR:0.109",
       .details.deposit.deposit_fee = "EUR:0.1"
@@ -941,9 +933,8 @@ run_test ()
       .label = "do-deposit-7b",
       .details.deposit.merchant_name = "bob",
       .details.deposit.merchant_account = 4,
-      .details.deposit.transaction_id = 16,
       .details.deposit.wire_deadline = { 1000LL * 1000 * 0 }, /* 0s */
-      .details.deposit.amount_with_fee = "EUR:0.109",
+      .details.deposit.amount_with_fee = "EUR:0.119",
       .details.deposit.deposit_fee = "EUR:0.1"
     },
     {
@@ -955,6 +946,7 @@ run_test ()
       .label = "expect-deposit-7",
       .details.expect_transaction.debit_account = 3,
       .details.expect_transaction.credit_account = 4,
+      .details.expect_transaction.exchange_base_url = 
"https://exchange.taler.net/";,
       .details.expect_transaction.amount = "EUR:0.01"
     },
     /* Now check profit was actually taken */
@@ -963,7 +955,6 @@ run_test ()
       .label = "do-deposit-7c",
       .details.deposit.merchant_name = "bob",
       .details.deposit.merchant_account = 4,
-      .details.deposit.transaction_id = 17,
       .details.deposit.wire_deadline = { 1000LL * 1000 * 0 }, /* 0s */
       .details.deposit.amount_with_fee = "EUR:0.122",
       .details.deposit.deposit_fee = "EUR:0.1"
@@ -977,7 +968,8 @@ run_test ()
       .label = "expect-deposit-7",
       .details.expect_transaction.debit_account = 3,
       .details.expect_transaction.credit_account = 4,
-      .details.expect_transaction.amount = "EUR:0.02"
+      .details.expect_transaction.exchange_base_url = 
"https://exchange.taler.net/";,
+      .details.expect_transaction.amount = "EUR:0.01"
     },
 
     /* Test that aggregation would happen fully if wire deadline is long */
@@ -986,7 +978,6 @@ run_test ()
       .label = "do-deposit-8a",
       .details.deposit.merchant_name = "bob",
       .details.deposit.merchant_account = 4,
-      .details.deposit.transaction_id = 18,
       .details.deposit.wire_deadline = { 1000LL * 1000 * 5 }, /* 5s */
       .details.deposit.amount_with_fee = "EUR:0.109",
       .details.deposit.deposit_fee = "EUR:0.1"
@@ -1004,7 +995,6 @@ run_test ()
       .label = "do-deposit-8b",
       .details.deposit.merchant_name = "bob",
       .details.deposit.merchant_account = 4,
-      .details.deposit.transaction_id = 19,
       .details.deposit.wire_deadline = { 1000LL * 1000 * 5 }, /* 5s */
       .details.deposit.amount_with_fee = "EUR:0.109",
       .details.deposit.deposit_fee = "EUR:0.1"
@@ -1023,7 +1013,6 @@ run_test ()
       .label = "do-deposit-8c",
       .details.deposit.merchant_name = "bob",
       .details.deposit.merchant_account = 4,
-      .details.deposit.transaction_id = 20,
       .details.deposit.wire_deadline = { 1000LL * 1000 * 0 }, /* 0s */
       .details.deposit.amount_with_fee = "EUR:0.122",
       .details.deposit.deposit_fee = "EUR:0.1"
@@ -1037,7 +1026,8 @@ run_test ()
       .label = "expect-deposit-8",
       .details.expect_transaction.debit_account = 3,
       .details.expect_transaction.credit_account = 4,
-      .details.expect_transaction.amount = "EUR:0.04"
+      .details.expect_transaction.exchange_base_url = 
"https://exchange.taler.net/";,
+      .details.expect_transaction.amount = "EUR:0.03"
     },
 
 
@@ -1047,7 +1037,6 @@ run_test ()
       .label = "do-deposit-9a",
       .details.deposit.merchant_name = "bob",
       .details.deposit.merchant_account = 4,
-      .details.deposit.transaction_id = 21,
       .details.deposit.wire_deadline = { 1000LL * 1000 * 5 }, /* 5s */
       .details.deposit.amount_with_fee = "EUR:0.104",
       .details.deposit.deposit_fee = "EUR:0.1"
@@ -1065,7 +1054,6 @@ run_test ()
       .label = "do-deposit-9b",
       .details.deposit.merchant_name = "bob",
       .details.deposit.merchant_account = 4,
-      .details.deposit.transaction_id = 22,
       .details.deposit.wire_deadline = { 1000LL * 1000 * 5 }, /* 5s */
       .details.deposit.amount_with_fee = "EUR:0.105",
       .details.deposit.deposit_fee = "EUR:0.1"
@@ -1084,7 +1072,6 @@ run_test ()
       .label = "do-deposit-9c",
       .details.deposit.merchant_name = "bob",
       .details.deposit.merchant_account = 4,
-      .details.deposit.transaction_id = 23,
       .details.deposit.wire_deadline = { 1000LL * 1000 * 0 }, /* 0s */
       .details.deposit.amount_with_fee = "EUR:0.112",
       .details.deposit.deposit_fee = "EUR:0.1"
@@ -1099,7 +1086,8 @@ run_test ()
       .label = "expect-deposit-9",
       .details.expect_transaction.debit_account = 3,
       .details.expect_transaction.credit_account = 4,
-      .details.expect_transaction.amount = "EUR:0.02"
+      .details.expect_transaction.exchange_base_url = 
"https://exchange.taler.net/";,
+      .details.expect_transaction.amount = "EUR:0.01"
     },
 
     /* Everything tested, terminate with success */
@@ -1172,7 +1160,8 @@ run (void *cls)
     GNUNET_SCHEDULER_add_read_file (GNUNET_TIME_UNIT_FOREVER_REL,
                                    GNUNET_DISK_pipe_handle (sigpipe,
                                                             
GNUNET_DISK_PIPE_END_READ),
-                                   &maint_child_death, NULL);
+                                   &maint_child_death,
+                                    NULL);
   GNUNET_SCHEDULER_add_shutdown (&shutdown_action,
                                  NULL);
   timeout_task = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_MINUTES,
@@ -1214,6 +1203,7 @@ main (int argc,
 {
   const char *plugin_name;
   char *testname;
+  struct GNUNET_OS_Process *proc;
   struct GNUNET_CONFIGURATION_Handle *cfg;
   struct GNUNET_SIGNAL_Context *shc_chld;
 
@@ -1225,15 +1215,32 @@ main (int argc,
   }
   plugin_name++;
   (void) GNUNET_asprintf (&testname,
-                          "test-taler-exchange-aggregator-%s", plugin_name);
+                          "test-taler-exchange-aggregator-%s",
+                          plugin_name);
   (void) GNUNET_asprintf (&config_filename,
-                          "%s.conf", testname);
+                          "%s.conf",
+                          testname);
   /* these might get in the way */
   unsetenv ("XDG_DATA_HOME");
   unsetenv ("XDG_CONFIG_HOME");
   GNUNET_log_setup ("test_taler_exchange_aggregator",
                     "WARNING",
                     NULL);
+  proc = GNUNET_OS_start_process (GNUNET_NO,
+                                  GNUNET_OS_INHERIT_STD_ALL,
+                                  NULL, NULL, NULL,
+                                  "taler-exchange-keyup",
+                                  "taler-exchange-keyup",
+                                  "-c", config_filename,
+                                  NULL);
+  if (NULL == proc)
+  {
+    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+               "Failed to run `taler-exchange-keyup`, is your PATH 
correct?\n");
+    return 77;
+  }
+  GNUNET_OS_process_wait (proc);
+  GNUNET_OS_process_destroy (proc);
   cfg = GNUNET_CONFIGURATION_create ();
   if (GNUNET_OK !=
       GNUNET_CONFIGURATION_parse (cfg,
@@ -1244,13 +1251,16 @@ main (int argc,
     GNUNET_free (testname);
     return 2;
   }
-  sigpipe = GNUNET_DISK_pipe (GNUNET_NO, GNUNET_NO, GNUNET_NO, GNUNET_NO);
+  sigpipe = GNUNET_DISK_pipe (GNUNET_NO, GNUNET_NO,
+                              GNUNET_NO, GNUNET_NO);
   GNUNET_assert (NULL != sigpipe);
   shc_chld =
-    GNUNET_SIGNAL_handler_install (GNUNET_SIGCHLD, &sighandler_child_death);
+    GNUNET_SIGNAL_handler_install (GNUNET_SIGCHLD,
+                                   &sighandler_child_death);
   coin_pk = GNUNET_CRYPTO_rsa_private_key_create (1024);
   coin_pub = GNUNET_CRYPTO_rsa_private_key_get_public (coin_pk);
-  GNUNET_SCHEDULER_run (&run, cfg);
+  GNUNET_SCHEDULER_run (&run,
+                        cfg);
   GNUNET_CRYPTO_rsa_private_key_free (coin_pk);
   GNUNET_CRYPTO_rsa_public_key_free (coin_pub);
   GNUNET_SIGNAL_handler_uninstall (shc_chld);
diff --git a/src/exchange/test_taler_exchange_httpd.conf 
b/src/exchange/test_taler_exchange_httpd.conf
index 19f448f..945031d 100644
--- a/src/exchange/test_taler_exchange_httpd.conf
+++ b/src/exchange/test_taler_exchange_httpd.conf
@@ -9,11 +9,6 @@ CURRENCY = EUR
 
 [exchange]
 
-# Wire format supported by the exchange
-# We use 'test' for testing of the actual
-# coin operations.
-WIREFORMAT = test
-
 # HTTP port the exchange listens to
 PORT = 8081
 
@@ -23,15 +18,13 @@ MASTER_PUBLIC_KEY = 
98NJW3CQHZQGQXTY3K85K531XKPAPAVV4Q5V8PYYRR00NJGZWNVG
 # How to access our database
 DB = postgres
 
-# Is this is a testcase, use transient DB actions?
-TESTRUN = YES
-
-
-
 
 [exchangedb-postgres]
 DB_CONN_STR = "postgres:///talercheck"
 
+[exchange-wire-test]
+# Enable 'test' for testing of the actual coin operations.
+ENABLE = YES
 
 [exchange-wire-outgoing-test]
 # What is the main website of the bank?
diff --git a/src/exchange/test_taler_exchange_httpd.data 
b/src/exchange/test_taler_exchange_httpd.data
index 8a1d6ba..28f7064 100644
--- a/src/exchange/test_taler_exchange_httpd.data
+++ b/src/exchange/test_taler_exchange_httpd.data
@@ -39,7 +39,7 @@
 /admin/add/incoming 
{"reserve_pub":"BSEFVVNZ4C3724BPVKTJMQMD73HQREA5FWSS1C1BZ36ZFF2WBTK0","amount":"{\"currency\":\"EUR\",\"value\":5,\"fraction\":3}","execution_date":"\/Date(1436271156447)\/","wire":{"type":"test"}}
 #
 # Bogus denomination key
-/deposit 
{"f":{"currency":"EUR","value":5,"fraction":0},"H_contract":"NRT9E07FYT147V4VCDG0102P0YX0FZ11ZRG90F4X1HDV95M0J64ZVE4XQGNN9MJ3B5K3JX6TJ181KNGRYSZSTYZ5PQHBM1F9QKQ5B50","wire":{"bank":"dest
 
bank","type":"TEST","account":42},"timestamp":"/Date(1436823947)/","coin_pub":"2KCPBGZ77VGJT4DG99EZAY0GQ5TJ89DF53FWYR5RFRTK0CCXRMFG","denom_pub":"51B7ARKCD5HJTTV5F4G0M818E9SP280A40G2GVH04CR30E9S6GVK2DHM8S234C236CR32C9N8RW44E9M712KAH1R60VM2CJ16RT3GGA18RR36CA575144DJ58CTK0E9M8D2M2E9S8GTKGH1Q8S0KAC
 [...]
+/deposit 
{"f":{"currency":"EUR","value":5,"fraction":0},"h_proposal_data":"NRT9E07FYT147V4VCDG0102P0YX0FZ11ZRG90F4X1HDV95M0J64ZVE4XQGNN9MJ3B5K3JX6TJ181KNGRYSZSTYZ5PQHBM1F9QKQ5B50","wire":{"bank":"dest
 
bank","type":"TEST","account":42},"timestamp":"/Date(1436823947)/","coin_pub":"2KCPBGZ77VGJT4DG99EZAY0GQ5TJ89DF53FWYR5RFRTK0CCXRMFG","denom_pub":"51B7ARKCD5HJTTV5F4G0M818E9SP280A40G2GVH04CR30E9S6GVK2DHM8S234C236CR32C9N8RW44E9M712KAH1R60VM2CJ16RT3GGA18RR36CA575144DJ58CTK0E9M8D2M2E9S8GTKGH1Q8
 [...]
 #
 # missing coin_ev argument
 /withdraw/sign 
{"denom_pub":"51R7ARKCD5HJTTV5F4G0M818E9SP280A40G2GVH04CR30E9S6GVK2DHM8S234C236CR32C9N8RW44E9M712KAH1R60VM2CJ16RT3GGA18RR36CA575144DJ58CTK0E9M8D2M2E9S8GTKGH1Q8S0KACT174S3AD2670R4ADJ664W32C1N8N23CHA58MSK6DJ26WSMAD1P8H132CHP8GWKAG9K8RS46GJ6890M6GT28GSK4GJ66X2KCCA168RM4GA67113GDA28RR4AGA36RVK6GA460VKJDT58CVK6HA488R48E9R6D2KEH258N246HHJ850K4H9R8N0KEC9N68SM2EA48RR3JEA284SM6C9M6D130D228MSK6H1J6MSKCH1K8CR38CJ48MV36GJ38513CE9P60TM6CA56D1K8HHQ75244DA26WW4CG9M8MW3JE9M7133JGH35452081
 [...]
diff --git a/src/exchange/test_taler_exchange_httpd.sh 
b/src/exchange/test_taler_exchange_httpd.sh
index 6e51e06..7cd2e27 100755
--- a/src/exchange/test_taler_exchange_httpd.sh
+++ b/src/exchange/test_taler_exchange_httpd.sh
@@ -27,7 +27,7 @@ unset XDG_CONFIG_HOME
 # Setup keys.
 taler-exchange-keyup -c test_taler_exchange_httpd.conf
 # Run Exchange HTTPD (in background)
-taler-exchange-httpd -c test_taler_exchange_httpd.conf &
+taler-exchange-httpd -c test_taler_exchange_httpd.conf -i &
 # Give HTTP time to start
 sleep 5
 # Finally run test...
diff --git a/src/exchangedb/Makefile.am b/src/exchangedb/Makefile.am
index f6754e8..2122c17 100644
--- a/src/exchangedb/Makefile.am
+++ b/src/exchangedb/Makefile.am
@@ -44,6 +44,7 @@ lib_LTLIBRARIES = \
 libtalerexchangedb_la_SOURCES = \
   exchangedb_auditorkeys.c \
   exchangedb_denomkeys.c \
+  exchangedb_fees.c \
   exchangedb_signkeys.c \
   exchangedb_plugin.c
 
@@ -60,6 +61,7 @@ libtalerexchangedb_la_LDFLAGS = \
 check_PROGRAMS = \
   test-exchangedb-auditors \
   test-exchangedb-denomkeys \
+  test-exchangedb-fees \
   test-exchangedb-signkeys \
   test-exchangedb-postgres \
   test-perf-taler-exchangedb \
@@ -68,10 +70,11 @@ check_PROGRAMS = \
 AM_TESTS_ENVIRONMENT=export 
TALER_PREFIX=$${TALER_PREFIX:address@hidden@};export 
PATH=$${TALER_PREFIX:address@hidden@}/bin:$$PATH;
 TESTS = \
   test-exchangedb-auditors \
+  test-exchangedb-denomkeys \
+  test-exchangedb-fees \
   test-exchangedb-postgres \
   test-exchangedb-signkeys \
-  test-perf-taler-exchangedb \
-  test-exchangedb-denomkeys
+  test-perf-taler-exchangedb
 
 test_exchangedb_auditors_SOURCES = \
   test_exchangedb_auditors.c
@@ -87,6 +90,13 @@ test_exchangedb_denomkeys_LDADD = \
   $(top_srcdir)/src/util/libtalerutil.la \
   -lgnunetutil
 
+test_exchangedb_fees_SOURCES = \
+  test_exchangedb_fees.c
+test_exchangedb_fees_LDADD = \
+  libtalerexchangedb.la \
+  $(top_srcdir)/src/util/libtalerutil.la \
+  -lgnunetutil
+
 test_exchangedb_signkeys_SOURCES = \
   test_exchangedb_signkeys.c
 test_exchangedb_signkeys_LDADD = \
diff --git a/src/exchangedb/exchangedb.conf b/src/exchangedb/exchangedb.conf
index 19277ed..73e1603 100644
--- a/src/exchangedb/exchangedb.conf
+++ b/src/exchangedb/exchangedb.conf
@@ -5,3 +5,10 @@
 [exchangedb]
 # Where do we expect to find information about auditors?
 AUDITOR_BASE_DIR = ${TALER_DATA_HOME}/auditors/
+
+# Where do we expect to find information about wire transfer fees
+# for aggregate payments?  These are the amounts we charge (subtract)
+# the merchant per wire transfer.  The directory is expected to
+# contain files "$METHOD.fee" with the cost structure, where
+# $METHOD corresponds to a wire transfer method.
+WIREFEE_BASE_DIR = ${TALER_DATA_HOME}/exchange/wirefees/
diff --git a/src/exchangedb/exchangedb_denomkeys.c 
b/src/exchangedb/exchangedb_denomkeys.c
index 7e7a73a..de8dfa6 100644
--- a/src/exchangedb/exchangedb_denomkeys.c
+++ b/src/exchangedb/exchangedb_denomkeys.c
@@ -42,10 +42,11 @@ TALER_EXCHANGEDB_denomination_key_read (const char 
*filename,
   void *data;
   struct GNUNET_CRYPTO_RsaPrivateKey *priv;
 
-  if (GNUNET_OK != GNUNET_DISK_file_size (filename,
-                                          &size,
-                                          GNUNET_YES,
-                                          GNUNET_YES))
+  if (GNUNET_OK !=
+      GNUNET_DISK_file_size (filename,
+                             &size,
+                             GNUNET_YES,
+                             GNUNET_YES))
   {
     GNUNET_log (GNUNET_ERROR_TYPE_INFO,
                 "Skipping inaccessable denomination key file `%s'\n",
diff --git a/src/exchangedb/exchangedb_fees.c b/src/exchangedb/exchangedb_fees.c
new file mode 100644
index 0000000..e3e1671
--- /dev/null
+++ b/src/exchangedb/exchangedb_fees.c
@@ -0,0 +1,251 @@
+/*
+  This file is part of TALER
+  Copyright (C) 2017 GNUnet e.V.
+
+  TALER is free software; you can redistribute it and/or modify it under the
+  terms of the GNU General Public License as published by the Free Software
+  Foundation; either version 3, or (at your option) any later version.
+
+  TALER is distributed in the hope that it will be useful, but WITHOUT ANY
+  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+  A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License along with
+  TALER; see the file COPYING.  If not, see <http://www.gnu.org/licenses/>
+*/
+/**
+ * @file exchangedb/exchangedb_fees.c
+ * @brief Logic to read/write/convert aggregation wire fees (not other fees!)
+ * @author Christian Grothoff
+ */
+#include "platform.h"
+#include "taler_exchangedb_lib.h"
+
+
+GNUNET_NETWORK_STRUCT_BEGIN
+
+/**
+ * Structure for wire fees on disk.
+ */
+struct TALER_WireFeeDiskP
+{
+
+  /**
+   * Wire fee details.
+   */
+  struct TALER_MasterWireFeePS wf;
+
+
+  /**
+   * Signature affirming the above fee structure.
+   */
+  struct TALER_MasterSignatureP master_sig;
+
+};
+
+GNUNET_NETWORK_STRUCT_END
+
+
+/**
+ * Convert @a wd disk format to host format.
+ *
+ * @param wd aggregate fees, disk format
+ * @return fees in host format
+ */
+static struct TALER_EXCHANGEDB_AggregateFees *
+wd2af (const struct TALER_WireFeeDiskP *wd)
+{
+  struct TALER_EXCHANGEDB_AggregateFees *af;
+
+  af = GNUNET_new (struct TALER_EXCHANGEDB_AggregateFees);
+  af->start_date = GNUNET_TIME_absolute_ntoh (wd->wf.start_date);
+  af->end_date = GNUNET_TIME_absolute_ntoh (wd->wf.end_date);
+  TALER_amount_ntoh (&af->wire_fee,
+                     &wd->wf.wire_fee);
+  af->master_sig = wd->master_sig;
+  return af;
+}
+
+
+/**
+ * Read the current fee structure from disk.
+ *
+ * @param cfg configuration to use
+ * @param wireplugin name of the wire plugin to read fees for
+ * @return sorted list of aggregation fees, NULL on error
+ */
+struct TALER_EXCHANGEDB_AggregateFees *
+TALER_EXCHANGEDB_fees_read (const struct GNUNET_CONFIGURATION_Handle *cfg,
+                            const char *wireplugin)
+{
+  char *wirefee_base_dir;
+  char *fn;
+  struct GNUNET_DISK_FileHandle *fh;
+  struct TALER_WireFeeDiskP wd;
+  struct TALER_EXCHANGEDB_AggregateFees *af;
+  struct TALER_EXCHANGEDB_AggregateFees *endp;
+
+  if (GNUNET_OK !=
+      GNUNET_CONFIGURATION_get_value_filename (cfg,
+                                               "exchangedb",
+                                               "WIREFEE_BASE_DIR",
+                                               &wirefee_base_dir))
+    return NULL;
+  GNUNET_asprintf (&fn,
+                   "%s/%s.fee",
+                   wirefee_base_dir,
+                   wireplugin);
+  GNUNET_free (wirefee_base_dir);
+  fh = GNUNET_DISK_file_open (fn,
+                              GNUNET_DISK_OPEN_READ,
+                              GNUNET_DISK_PERM_NONE);
+  GNUNET_free (fn);
+  if (NULL == fh)
+    return NULL;
+
+  af = NULL;
+  endp = NULL;
+  while (sizeof (wd) ==
+         GNUNET_DISK_file_read (fh,
+                                &wd,
+                                sizeof (wd)))
+  {
+    struct TALER_EXCHANGEDB_AggregateFees *n;
+
+    n = wd2af (&wd);
+    if ( ( (NULL == af) ||
+           (endp->end_date.abs_value_us == n->start_date.abs_value_us) ) &&
+         (n->start_date.abs_value_us < n->end_date.abs_value_us) )
+    {
+      /* append to list */
+      if (NULL != endp)
+        endp->next = n;
+      else
+        af = n;
+      endp = n;
+    }
+    else
+    {
+      /* We expect file to be in chronological order! */
+      GNUNET_break (0);
+      GNUNET_DISK_file_close (fh);
+      GNUNET_free (n);
+      TALER_EXCHANGEDB_fees_free (af);
+      return NULL;
+    }
+  }
+  GNUNET_DISK_file_close (fh);
+  return af;
+}
+
+
+/**
+ * Convert @a af to @a wf.
+ *
+ * @param wireplugin name of the wire plugin the fees are for
+ * @param[in,out] af aggregate fees, host format (updated to round time)
+ * @param[out] wf aggregate fees, disk / signature format
+ */
+void
+TALER_EXCHANGEDB_fees_2_wf (const char *wireplugin,
+                            struct TALER_EXCHANGEDB_AggregateFees *af,
+                            struct TALER_MasterWireFeePS *wf)
+{
+  (void) GNUNET_TIME_round_abs (&af->start_date);
+  (void) GNUNET_TIME_round_abs (&af->end_date);
+  wf->purpose.size = htonl (sizeof (*wf));
+  wf->purpose.purpose = htonl (TALER_SIGNATURE_MASTER_WIRE_FEES);
+  GNUNET_CRYPTO_hash (wireplugin,
+                      strlen (wireplugin) + 1,
+                      &wf->h_wire_method);
+  wf->start_date = GNUNET_TIME_absolute_hton (af->start_date);
+  wf->end_date = GNUNET_TIME_absolute_hton (af->end_date);
+  TALER_amount_hton (&wf->wire_fee,
+                     &af->wire_fee);
+}
+
+
+/**
+ * Write given fee structure to disk.
+ *
+ * @param filename where to write the fees
+ * @param wireplugin which plugin the fees are about
+ * @param af fee structure to write
+ * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
+ */
+int
+TALER_EXCHANGEDB_fees_write (const char *filename,
+                             const char *wireplugin,
+                             struct TALER_EXCHANGEDB_AggregateFees *af)
+{
+  struct GNUNET_DISK_FileHandle *fh;
+  struct TALER_WireFeeDiskP wd;
+  struct TALER_EXCHANGEDB_AggregateFees *last;
+
+  if (GNUNET_OK !=
+      GNUNET_DISK_directory_create_for_file (filename))
+    return GNUNET_SYSERR;
+
+  fh = GNUNET_DISK_file_open (filename,
+                              GNUNET_DISK_OPEN_WRITE |
+                              GNUNET_DISK_OPEN_TRUNCATE |
+                              GNUNET_DISK_OPEN_CREATE,
+                              GNUNET_DISK_PERM_USER_READ |
+                              GNUNET_DISK_PERM_USER_WRITE);
+  if (NULL == fh)
+    return GNUNET_SYSERR;
+
+  last = NULL;
+  while (NULL != af)
+  {
+    if ( ( (NULL != last) &&
+           (last->end_date.abs_value_us != af->start_date.abs_value_us) ) ||
+         (af->start_date.abs_value_us >= af->end_date.abs_value_us) )
+    {
+      /* @a af malformed, refusing to write file that will be rejected */
+      GNUNET_break (0);
+      GNUNET_assert (GNUNET_OK ==
+                     GNUNET_DISK_file_close (fh));
+      return GNUNET_SYSERR;
+    }
+    TALER_EXCHANGEDB_fees_2_wf (wireplugin,
+                                af,
+                                &wd.wf);
+    wd.master_sig = af->master_sig;
+    af = af->next;
+    if (sizeof (wd) !=
+        GNUNET_DISK_file_write (fh,
+                                &wd,
+                                sizeof (wd)))
+    {
+      GNUNET_assert (GNUNET_OK ==
+                     GNUNET_DISK_file_close (fh));
+      return GNUNET_SYSERR;
+    }
+  }
+  GNUNET_assert (GNUNET_OK ==
+                 GNUNET_DISK_file_close (fh));
+  return GNUNET_OK;
+}
+
+
+/**
+ * Free @a af data structure
+ *
+ * @param af list to free
+ */
+void
+TALER_EXCHANGEDB_fees_free (struct TALER_EXCHANGEDB_AggregateFees *af)
+{
+  struct TALER_EXCHANGEDB_AggregateFees *next;
+
+  while (NULL != af)
+  {
+    next = af->next;
+    GNUNET_free (af);
+    af = next;
+  }
+}
+
+
+/* end of exchangedb_fees.c */
diff --git a/src/exchangedb/perf_taler_exchangedb_init.c 
b/src/exchangedb/perf_taler_exchangedb_init.c
index 1694dc0..967f747 100644
--- a/src/exchangedb/perf_taler_exchangedb_init.c
+++ b/src/exchangedb/perf_taler_exchangedb_init.c
@@ -209,7 +209,7 @@ PERF_TALER_EXCHANGEDB_deposit_init (const struct 
PERF_TALER_EXCHANGEDB_Coin *coi
   struct TALER_EXCHANGEDB_Deposit *deposit;
   struct TALER_CoinSpendSignatureP csig;
   struct TALER_MerchantPublicKeyP merchant_pub;
-  struct GNUNET_HashCode h_contract;
+  struct GNUNET_HashCode h_proposal_data;
   struct GNUNET_HashCode h_wire;
   const char wire[] = "{"
     "\"type\":\"SEPA\","
@@ -217,7 +217,6 @@ PERF_TALER_EXCHANGEDB_deposit_init (const struct 
PERF_TALER_EXCHANGEDB_Coin *coi
     "\"NAME\":\"GNUNET E.\","
     "\"BIC\":\"GENODEF1SRL\""
     "}";
-  static uint64_t transaction_id = 0;
   struct GNUNET_TIME_Absolute timestamp;
   struct GNUNET_TIME_Absolute refund_deadline;
   struct TALER_Amount amount_with_fee;
@@ -226,7 +225,7 @@ PERF_TALER_EXCHANGEDB_deposit_init (const struct 
PERF_TALER_EXCHANGEDB_Coin *coi
   GNUNET_assert (NULL !=
                  (deposit = GNUNET_malloc (sizeof (struct 
TALER_EXCHANGEDB_Deposit) + sizeof (wire))));
   GNUNET_CRYPTO_hash_create_random (GNUNET_CRYPTO_QUALITY_WEAK,
-                                    &h_contract);
+                                    &h_proposal_data);
   GNUNET_CRYPTO_hash_create_random (GNUNET_CRYPTO_QUALITY_WEAK,
                                     &h_wire);
   { //csig
@@ -234,10 +233,10 @@ PERF_TALER_EXCHANGEDB_deposit_init (const struct 
PERF_TALER_EXCHANGEDB_Coin *coi
     {
       struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
       struct GNUNET_HashCode h_wire;
-      struct GNUNET_HashCode h_contract;
+      struct GNUNET_HashCode h_proposal_data;
     } unsigned_data;
 
-    unsigned_data.h_contract = h_contract;
+    unsigned_data.h_proposal_data = h_proposal_data;
     unsigned_data.h_wire = h_wire;
     unsigned_data.purpose.size = htonl (sizeof (struct u32_presign));
     unsigned_data.purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_TEST);
@@ -274,10 +273,9 @@ PERF_TALER_EXCHANGEDB_deposit_init (const struct 
PERF_TALER_EXCHANGEDB_Coin *coi
     GNUNET_assert (NULL != coin->public_info.denom_sig.rsa_signature);
   }
   deposit->csig = csig;
-  deposit->h_contract = h_contract;
+  deposit->h_proposal_data = h_proposal_data;
   deposit->h_wire = h_wire;
   deposit->receiver_wire_account = json_loads (wire, 0, NULL);
-  deposit->transaction_id = transaction_id++;
   deposit->timestamp = timestamp;
   deposit->refund_deadline = refund_deadline;
   deposit->amount_with_fee = amount_with_fee;
diff --git a/src/exchangedb/plugin_exchangedb_postgres.c 
b/src/exchangedb/plugin_exchangedb_postgres.c
index a41dc4e..179d609 100644
--- a/src/exchangedb/plugin_exchangedb_postgres.c
+++ b/src/exchangedb/plugin_exchangedb_postgres.c
@@ -216,6 +216,8 @@ postgres_drop_tables (void *cls)
   SQLEXEC_ (conn,
             "DROP TABLE IF EXISTS aggregation_tracking;");
   SQLEXEC_ (conn,
+            "DROP TABLE IF EXISTS wire_fee;");
+  SQLEXEC_ (conn,
             "DROP TABLE IF EXISTS deposits;");
   SQLEXEC_ (conn,
             "DROP TABLE IF EXISTS refresh_out;");
@@ -427,7 +429,6 @@ postgres_create_tables (void *cls)
   SQLEXEC("CREATE TABLE IF NOT EXISTS deposits "
           "(deposit_serial_id BIGSERIAL PRIMARY KEY"
           ",coin_pub BYTEA NOT NULL REFERENCES known_coins (coin_pub) ON 
DELETE CASCADE"
-          ",transaction_id INT8 NOT NULL"
           ",amount_with_fee_val INT8 NOT NULL"
           ",amount_with_fee_frac INT4 NOT NULL"
           ",amount_with_fee_curr VARCHAR("TALER_CURRENCY_LEN_STR") NOT NULL"
@@ -435,17 +436,17 @@ postgres_create_tables (void *cls)
           ",refund_deadline INT8 NOT NULL"
           ",wire_deadline INT8 NOT NULL"
           ",merchant_pub BYTEA NOT NULL CHECK (LENGTH(merchant_pub)=32)"
-          ",h_contract BYTEA NOT NULL CHECK (LENGTH(h_contract)=64)"
+          ",h_proposal_data BYTEA NOT NULL CHECK (LENGTH(h_proposal_data)=64)"
           ",h_wire BYTEA NOT NULL CHECK (LENGTH(h_wire)=64)"
           ",coin_sig BYTEA NOT NULL CHECK (LENGTH(coin_sig)=64)"
           ",wire TEXT NOT NULL"
           ",tiny BOOLEAN NOT NULL DEFAULT false"
           ",done BOOLEAN NOT NULL DEFAULT false"
-          ",UNIQUE (coin_pub, transaction_id, merchant_pub)"
+          ",UNIQUE (coin_pub, h_proposal_data, merchant_pub)"
           ")");
-  /* Index for get_deposit statement on coin_pub, transaction_id and 
merchant_pub */
+  /* Index for get_deposit statement on coin_pub, h_proposal_data and 
merchant_pub */
   SQLEXEC_INDEX("CREATE INDEX deposits_coin_pub_index "
-                "ON deposits(coin_pub, transaction_id, merchant_pub)");
+                "ON deposits(coin_pub, h_proposal_data, merchant_pub)");
 
   /* Table with information about coins that have been refunded. (Technically
      one of the deposit operations that a coin was involved with is 
refunded.)*/
@@ -454,13 +455,12 @@ postgres_create_tables (void *cls)
          ",coin_pub BYTEA NOT NULL REFERENCES known_coins (coin_pub) ON DELETE 
CASCADE"
           ",merchant_pub BYTEA NOT NULL CHECK(LENGTH(merchant_pub)=32)"
           ",merchant_sig BYTEA NOT NULL CHECK(LENGTH(merchant_sig)=64)"
-          ",h_contract BYTEA NOT NULL CHECK(LENGTH(h_contract)=64)"
-          ",transaction_id INT8 NOT NULL"
+          ",h_proposal_data BYTEA NOT NULL CHECK(LENGTH(h_proposal_data)=64)"
           ",rtransaction_id INT8 NOT NULL"
           ",amount_with_fee_val INT8 NOT NULL"
           ",amount_with_fee_frac INT4 NOT NULL"
           ",amount_with_fee_curr VARCHAR("TALER_CURRENCY_LEN_STR") NOT NULL"
-          ",PRIMARY KEY (coin_pub, merchant_pub, transaction_id, 
rtransaction_id)" /* this combo must be unique, and we usually select by 
coin_pub */
+          ",PRIMARY KEY (coin_pub, merchant_pub, h_proposal_data, 
rtransaction_id)" /* this combo must be unique, and we usually select by 
coin_pub */
           ") ");
 
   /* Table for the tracking API, mapping from wire transfer identifiers
@@ -474,6 +474,23 @@ postgres_create_tables (void *cls)
   SQLEXEC_INDEX("CREATE INDEX aggregation_tracking_wtid_index "
                 "ON aggregation_tracking(wtid_raw)");
 
+
+  /* Table for the wire fees. */
+  SQLEXEC("CREATE TABLE IF NOT EXISTS wire_fee "
+          "(wire_method VARCHAR NOT NULL"
+          ",start_date INT8 NOT NULL"
+          ",end_date INT8 NOT NULL"
+          ",wire_fee_val INT8 NOT NULL"
+          ",wire_fee_frac INT4 NOT NULL"
+          ",wire_fee_curr VARCHAR("TALER_CURRENCY_LEN_STR") NOT NULL"
+          ",master_sig BYTEA NOT NULL CHECK (LENGTH(master_sig)=64)"
+          ",PRIMARY KEY (wire_method, start_date)" /* this combo must be 
unique */
+          ")");
+  /* Index for lookup_transactions statement on wtid */
+  SQLEXEC_INDEX("CREATE INDEX aggregation_tracking_wtid_index "
+                "ON aggregation_tracking(wtid_raw)");
+
+
   /* This table contains the pre-commit data for
      wire transfers the exchange is about to execute. */
   SQLEXEC("CREATE TABLE IF NOT EXISTS prewire "
@@ -862,8 +879,7 @@ postgres_prepare (PGconn *db_conn)
            "SELECT"
            " merchant_pub"
            ",merchant_sig"
-           ",h_contract"
-           ",transaction_id"
+           ",h_proposal_data"
            ",rtransaction_id"
            ",coin_pub"
            ",amount_with_fee_val"
@@ -880,8 +896,7 @@ postgres_prepare (PGconn *db_conn)
            "SELECT"
            " merchant_pub"
            ",merchant_sig"
-           ",h_contract"
-           ",transaction_id"
+           ",h_proposal_data"
            ",rtransaction_id"
            ",amount_with_fee_val"
            ",amount_with_fee_frac"
@@ -942,7 +957,6 @@ postgres_prepare (PGconn *db_conn)
   PREPARE ("insert_deposit",
            "INSERT INTO deposits "
            "(coin_pub"
-           ",transaction_id"
            ",amount_with_fee_val"
            ",amount_with_fee_frac"
            ",amount_with_fee_curr"
@@ -950,14 +964,14 @@ postgres_prepare (PGconn *db_conn)
            ",refund_deadline"
            ",wire_deadline"
            ",merchant_pub"
-           ",h_contract"
+           ",h_proposal_data"
            ",h_wire"
            ",coin_sig"
            ",wire"
            ") VALUES "
            "($1, $2, $3, $4, $5, $6, $7, $8, $9, $10,"
-           " $11, $12, $13);",
-           13, NULL);
+           " $11, $12);",
+           12, NULL);
 
   /* Used in #postgres_insert_refund() to store refund information */
   PREPARE ("insert_refund",
@@ -965,15 +979,14 @@ postgres_prepare (PGconn *db_conn)
            "(coin_pub "
            ",merchant_pub "
            ",merchant_sig "
-           ",h_contract "
-           ",transaction_id "
+           ",h_proposal_data "
            ",rtransaction_id "
            ",amount_with_fee_val "
            ",amount_with_fee_frac "
            ",amount_with_fee_curr "
            ") VALUES "
-           "($1, $2, $3, $4, $5, $6, $7, $8, $9);",
-           9, NULL);
+           "($1, $2, $3, $4, $5, $6, $7, $8);",
+           8, NULL);
 
   /* Fetch an existing deposit request, used to ensure idempotency
      during /deposit processing. Used in #postgres_have_deposit(). */
@@ -985,12 +998,12 @@ postgres_prepare (PGconn *db_conn)
            ",timestamp"
            ",refund_deadline"
            ",wire_deadline"
-           ",h_contract"
+           ",h_proposal_data"
            ",h_wire"
            " FROM deposits"
            " WHERE ("
            "  (coin_pub=$1) AND"
-           "  (transaction_id=$2) AND"
+           "  (h_proposal_data=$2) AND"
            "  (merchant_pub=$3)"
            " )",
            3, NULL);
@@ -1005,10 +1018,9 @@ postgres_prepare (PGconn *db_conn)
           ",merchant_pub"
           ",coin_pub"
           ",coin_sig"
-          ",transaction_id"
            ",refund_deadline"
            ",wire_deadline"
-           ",h_contract"
+           ",h_proposal_data"
            ",wire"
            ",done"
            ",deposit_serial_id"
@@ -1035,12 +1047,11 @@ postgres_prepare (PGconn *db_conn)
            "    JOIN denominations denom USING (denom_pub)"
            " WHERE ("
            "  (coin_pub=$1) AND"
-           "  (transaction_id=$2) AND"
-           "  (merchant_pub=$3) AND"
-           "  (h_contract=$4) AND"
-           "  (h_wire=$5)"
+           "  (merchant_pub=$2) AND"
+           "  (h_proposal_data=$3) AND"
+           "  (h_wire=$4)"
            " )",
-           5, NULL);
+           4, NULL);
 
   /* Used in #postgres_get_ready_deposit() */
   PREPARE ("deposits_get_ready",
@@ -1053,8 +1064,7 @@ postgres_prepare (PGconn *db_conn)
            ",denom.fee_deposit_frac"
            ",denom.fee_deposit_curr"
            ",wire_deadline"
-           ",transaction_id"
-           ",h_contract"
+           ",h_proposal_data"
            ",wire"
            ",merchant_pub"
            ",coin_pub"
@@ -1081,8 +1091,7 @@ postgres_prepare (PGconn *db_conn)
            ",denom.fee_deposit_frac"
            ",denom.fee_deposit_curr"
            ",wire_deadline"
-           ",transaction_id"
-           ",h_contract"
+           ",h_proposal_data"
            ",coin_pub"
            " FROM deposits"
            "    JOIN known_coins USING (coin_pub)"
@@ -1114,18 +1123,16 @@ postgres_prepare (PGconn *db_conn)
            "SELECT done"
            " FROM deposits"
            " WHERE coin_pub=$1"
-           " AND transaction_id=$2"
-           " AND merchant_pub=$3"
-           " AND h_contract=$4"
-           " AND h_wire=$5",
+           " AND merchant_pub=$2"
+           " AND h_proposal_data=$3"
+           " AND h_wire=$4",
            5, NULL);
 
   /* Used in #postgres_get_coin_transactions() to obtain information
      about how a coin has been spend with /deposit requests. */
   PREPARE ("get_deposit_with_coin_pub",
            "SELECT"
-           " transaction_id"
-           ",amount_with_fee_val"
+           " amount_with_fee_val"
            ",amount_with_fee_frac"
            ",amount_with_fee_curr"
            ",denom.fee_deposit_val"
@@ -1134,7 +1141,7 @@ postgres_prepare (PGconn *db_conn)
            ",timestamp"
            ",refund_deadline"
            ",merchant_pub"
-           ",h_contract"
+           ",h_proposal_data"
            ",h_wire"
            ",wire"
            ",coin_sig"
@@ -1204,11 +1211,11 @@ postgres_prepare (PGconn *db_conn)
   /* Used in #postgres_lookup_wire_transfer */
   PREPARE ("lookup_transactions",
            "SELECT"
-           " deposits.h_contract"
+           " deposits.h_proposal_data"
+           ",deposits.wire"
            ",deposits.h_wire"
            ",deposits.coin_pub"
            ",deposits.merchant_pub"
-           ",deposits.transaction_id"
            ",execution_time"
            ",deposits.amount_with_fee_val"
            ",deposits.amount_with_fee_frac"
@@ -1239,11 +1246,10 @@ postgres_prepare (PGconn *db_conn)
            "    JOIN known_coins USING (coin_pub)"
            "    JOIN denominations denom USING (denom_pub)"
            " WHERE coin_pub=$1"
-           "  AND h_contract=$2"
+           "  AND h_proposal_data=$2"
            "  AND h_wire=$3"
-           "  AND transaction_id=$4"
-           "  AND merchant_pub=$5",
-           5, NULL);
+           "  AND merchant_pub=$4",
+           4, NULL);
 
   /* Used in #postgres_insert_aggregation_tracking */
   PREPARE ("insert_aggregation_tracking",
@@ -1255,6 +1261,35 @@ postgres_prepare (PGconn *db_conn)
            "($1, $2, $3)",
            3, NULL);
 
+  /* Used in #postgres_get_wire_fee() */
+  PREPARE ("get_wire_fee",
+           "SELECT "
+           " start_date"
+           ",end_date"
+           ",wire_fee_val"
+           ",wire_fee_frac"
+           ",wire_fee_curr"
+           ",master_sig"
+           " FROM wire_fee"
+           " WHERE wire_method=$1"
+           " AND start_date <= $2"
+           " AND end_date > $2",
+           2, NULL);
+
+  /* Used in #postgres_insert_wire_fee */
+  PREPARE ("insert_wire_fee",
+           "INSERT INTO wire_fee "
+           "(wire_method"
+           ",start_date"
+           ",end_date"
+           ",wire_fee_val"
+           ",wire_fee_frac"
+           ",wire_fee_curr"
+           ",master_sig"
+           ") VALUES "
+           "($1, $2, $3, $4, $5, $6, $7)",
+           7, NULL);
+
 
   /* Used in #postgres_wire_prepare_data_insert() to store
      wire transfer information before actually committing it with the bank */
@@ -2229,7 +2264,7 @@ postgres_have_deposit (void *cls,
 {
   struct GNUNET_PQ_QueryParam params[] = {
     GNUNET_PQ_query_param_auto_from_type (&deposit->coin.coin_pub),
-    GNUNET_PQ_query_param_uint64 (&deposit->transaction_id),
+    GNUNET_PQ_query_param_auto_from_type (&deposit->h_proposal_data),
     GNUNET_PQ_query_param_auto_from_type (&deposit->merchant_pub),
     GNUNET_PQ_query_param_end
   };
@@ -2264,8 +2299,8 @@ postgres_have_deposit (void *cls,
                                           &deposit2.refund_deadline),
       GNUNET_PQ_result_spec_absolute_time ("wire_deadline",
                                           &deposit2.wire_deadline),
-      GNUNET_PQ_result_spec_auto_from_type ("h_contract",
-                                           &deposit2.h_contract),
+      GNUNET_PQ_result_spec_auto_from_type ("h_proposal_data",
+                                           &deposit2.h_proposal_data),
       GNUNET_PQ_result_spec_auto_from_type ("h_wire",
                                            &deposit2.h_wire),
       GNUNET_PQ_result_spec_end
@@ -2285,8 +2320,8 @@ postgres_have_deposit (void *cls,
           deposit2.timestamp.abs_value_us) ||
          (deposit->refund_deadline.abs_value_us !=
           deposit2.refund_deadline.abs_value_us) ||
-         (0 != memcmp (&deposit->h_contract,
-                       &deposit2.h_contract,
+         (0 != memcmp (&deposit->h_proposal_data,
+                       &deposit2.h_proposal_data,
                        sizeof (struct GNUNET_HashCode))) ||
          (0 != memcmp (&deposit->h_wire,
                        &deposit2.h_wire,
@@ -2358,9 +2393,8 @@ postgres_test_deposit_done (void *cls,
 {
   struct GNUNET_PQ_QueryParam params[] = {
     GNUNET_PQ_query_param_auto_from_type (&deposit->coin.coin_pub),
-    GNUNET_PQ_query_param_uint64 (&deposit->transaction_id),
     GNUNET_PQ_query_param_auto_from_type (&deposit->merchant_pub),
-    GNUNET_PQ_query_param_auto_from_type (&deposit->h_contract),
+    GNUNET_PQ_query_param_auto_from_type (&deposit->h_proposal_data),
     GNUNET_PQ_query_param_auto_from_type (&deposit->h_wire),
     GNUNET_PQ_query_param_end
   };
@@ -2494,25 +2528,22 @@ postgres_get_ready_deposit (void *cls,
     struct TALER_Amount amount_with_fee;
     struct TALER_Amount deposit_fee;
     struct GNUNET_TIME_Absolute wire_deadline;
-    struct GNUNET_HashCode h_contract;
+    struct GNUNET_HashCode h_proposal_data;
     struct TALER_MerchantPublicKeyP merchant_pub;
     struct TALER_CoinSpendPublicKeyP coin_pub;
-    uint64_t transaction_id;
     uint64_t serial_id;
     json_t *wire;
     struct GNUNET_PQ_ResultSpec rs[] = {
       GNUNET_PQ_result_spec_uint64 ("deposit_serial_id",
                                    &serial_id),
-      GNUNET_PQ_result_spec_uint64 ("transaction_id",
-                                   &transaction_id),
       TALER_PQ_result_spec_amount ("amount_with_fee",
                                    &amount_with_fee),
       TALER_PQ_result_spec_amount ("fee_deposit",
                                    &deposit_fee),
       GNUNET_PQ_result_spec_absolute_time ("wire_deadline",
                                           &wire_deadline),
-      GNUNET_PQ_result_spec_auto_from_type ("h_contract",
-                                           &h_contract),
+      GNUNET_PQ_result_spec_auto_from_type ("h_proposal_data",
+                                           &h_proposal_data),
       GNUNET_PQ_result_spec_auto_from_type ("merchant_pub",
                                            &merchant_pub),
       GNUNET_PQ_result_spec_auto_from_type ("coin_pub",
@@ -2537,8 +2568,7 @@ postgres_get_ready_deposit (void *cls,
                       &coin_pub,
                       &amount_with_fee,
                       &deposit_fee,
-                      transaction_id,
-                      &h_contract,
+                      &h_proposal_data,
                       wire_deadline,
                       wire);
     GNUNET_PQ_cleanup_result (rs);
@@ -2602,24 +2632,21 @@ postgres_iterate_matching_deposits (void *cls,
     struct TALER_Amount amount_with_fee;
     struct TALER_Amount deposit_fee;
     struct GNUNET_TIME_Absolute wire_deadline;
-    struct GNUNET_HashCode h_contract;
+    struct GNUNET_HashCode h_proposal_data;
     struct TALER_CoinSpendPublicKeyP coin_pub;
-    uint64_t transaction_id;
     uint64_t serial_id;
     int ret;
     struct GNUNET_PQ_ResultSpec rs[] = {
       GNUNET_PQ_result_spec_uint64 ("deposit_serial_id",
                                     &serial_id),
-      GNUNET_PQ_result_spec_uint64 ("transaction_id",
-                                    &transaction_id),
       TALER_PQ_result_spec_amount ("amount_with_fee",
                                    &amount_with_fee),
       TALER_PQ_result_spec_amount ("fee_deposit",
                                    &deposit_fee),
       GNUNET_PQ_result_spec_absolute_time ("wire_deadline",
                                            &wire_deadline),
-      GNUNET_PQ_result_spec_auto_from_type ("h_contract",
-                                            &h_contract),
+      GNUNET_PQ_result_spec_auto_from_type ("h_proposal_data",
+                                            &h_proposal_data),
       GNUNET_PQ_result_spec_auto_from_type ("coin_pub",
                                             &coin_pub),
       GNUNET_PQ_result_spec_end
@@ -2639,8 +2666,7 @@ postgres_iterate_matching_deposits (void *cls,
                       &coin_pub,
                       &amount_with_fee,
                       &deposit_fee,
-                      transaction_id,
-                      &h_contract,
+                      &h_proposal_data,
                       wire_deadline,
                       NULL);
     GNUNET_PQ_cleanup_result (rs);
@@ -2774,13 +2800,12 @@ postgres_insert_deposit (void *cls,
   int ret;
   struct GNUNET_PQ_QueryParam params[] = {
     GNUNET_PQ_query_param_auto_from_type (&deposit->coin.coin_pub),
-    GNUNET_PQ_query_param_uint64 (&deposit->transaction_id),
     TALER_PQ_query_param_amount (&deposit->amount_with_fee),
     GNUNET_PQ_query_param_absolute_time (&deposit->timestamp),
     GNUNET_PQ_query_param_absolute_time (&deposit->refund_deadline),
     GNUNET_PQ_query_param_absolute_time (&deposit->wire_deadline),
     GNUNET_PQ_query_param_auto_from_type (&deposit->merchant_pub),
-    GNUNET_PQ_query_param_auto_from_type (&deposit->h_contract),
+    GNUNET_PQ_query_param_auto_from_type (&deposit->h_proposal_data),
     GNUNET_PQ_query_param_auto_from_type (&deposit->h_wire),
     GNUNET_PQ_query_param_auto_from_type (&deposit->csig),
     TALER_PQ_query_param_json (deposit->receiver_wire_account),
@@ -2845,8 +2870,7 @@ postgres_insert_refund (void *cls,
     GNUNET_PQ_query_param_auto_from_type (&refund->coin.coin_pub),
     GNUNET_PQ_query_param_auto_from_type (&refund->merchant_pub),
     GNUNET_PQ_query_param_auto_from_type (&refund->merchant_sig),
-    GNUNET_PQ_query_param_auto_from_type (&refund->h_contract),
-    GNUNET_PQ_query_param_uint64 (&refund->transaction_id),
+    GNUNET_PQ_query_param_auto_from_type (&refund->h_proposal_data),
     GNUNET_PQ_query_param_uint64 (&refund->rtransaction_id),
     TALER_PQ_query_param_amount (&refund->refund_amount),
     GNUNET_PQ_query_param_end
@@ -3744,8 +3768,6 @@ postgres_get_coin_transactions (void *cls,
       deposit = GNUNET_new (struct TALER_EXCHANGEDB_Deposit);
       {
         struct GNUNET_PQ_ResultSpec rs[] = {
-          GNUNET_PQ_result_spec_uint64 ("transaction_id",
-                                        &deposit->transaction_id),
           TALER_PQ_result_spec_amount ("amount_with_fee",
                                        &deposit->amount_with_fee),
           TALER_PQ_result_spec_amount ("fee_deposit",
@@ -3756,8 +3778,8 @@ postgres_get_coin_transactions (void *cls,
                                                &deposit->refund_deadline),
           GNUNET_PQ_result_spec_auto_from_type ("merchant_pub",
                                                 &deposit->merchant_pub),
-          GNUNET_PQ_result_spec_auto_from_type ("h_contract",
-                                                &deposit->h_contract),
+          GNUNET_PQ_result_spec_auto_from_type ("h_proposal_data",
+                                                &deposit->h_proposal_data),
           GNUNET_PQ_result_spec_auto_from_type ("h_wire",
                                                 &deposit->h_wire),
           TALER_PQ_result_spec_json ("wire",
@@ -3902,10 +3924,8 @@ postgres_get_coin_transactions (void *cls,
                                                 &refund->merchant_pub),
           GNUNET_PQ_result_spec_auto_from_type ("merchant_sig",
                                                 &refund->merchant_sig),
-          GNUNET_PQ_result_spec_auto_from_type ("h_contract",
-                                                &refund->h_contract),
-          GNUNET_PQ_result_spec_uint64 ("transaction_id",
-                                        &refund->transaction_id),
+          GNUNET_PQ_result_spec_auto_from_type ("h_proposal_data",
+                                                &refund->h_proposal_data),
           GNUNET_PQ_result_spec_uint64 ("rtransaction_id",
                                         &refund->rtransaction_id),
           TALER_PQ_result_spec_amount ("amount_with_fee",
@@ -4002,24 +4022,26 @@ postgres_lookup_wire_transfer (void *cls,
   }
   for (i=0;i<nrows;i++)
   {
-    struct GNUNET_HashCode h_contract;
+    struct GNUNET_HashCode h_proposal_data;
     struct GNUNET_HashCode h_wire;
     struct TALER_CoinSpendPublicKeyP coin_pub;
     struct TALER_MerchantPublicKeyP merchant_pub;
-    uint64_t transaction_id;
     struct GNUNET_TIME_Absolute exec_time;
     struct TALER_Amount amount_with_fee;
     struct TALER_Amount deposit_fee;
+    json_t *wire;
+    json_t *t;
+    const char *wire_method;
     struct GNUNET_PQ_ResultSpec rs[] = {
-      GNUNET_PQ_result_spec_auto_from_type ("h_contract", &h_contract),
+      GNUNET_PQ_result_spec_auto_from_type ("h_proposal_data", 
&h_proposal_data),
+      TALER_PQ_result_spec_json ("wire", &wire),
       GNUNET_PQ_result_spec_auto_from_type ("h_wire", &h_wire),
       GNUNET_PQ_result_spec_auto_from_type ("coin_pub", &coin_pub),
       GNUNET_PQ_result_spec_auto_from_type ("merchant_pub", &merchant_pub),
-      GNUNET_PQ_result_spec_uint64 ("transaction_id", &transaction_id),
       GNUNET_PQ_result_spec_absolute_time ("execution_time", &exec_time),
       TALER_PQ_result_spec_amount ("amount_with_fee", &amount_with_fee),
       TALER_PQ_result_spec_amount ("fee_deposit", &deposit_fee),
-       GNUNET_PQ_result_spec_end
+      GNUNET_PQ_result_spec_end
     };
     if (GNUNET_OK !=
         GNUNET_PQ_extract_result (result,
@@ -4030,15 +4052,30 @@ postgres_lookup_wire_transfer (void *cls,
       PQclear (result);
       return GNUNET_SYSERR;
     }
+    t = json_object_get (wire, "type");
+    if (NULL == t)
+    {
+      GNUNET_break (0);
+      PQclear (result);
+      return GNUNET_SYSERR;
+    }
+    wire_method = json_string_value (t);
+    if (NULL == wire_method)
+    {
+      GNUNET_break (0);
+      PQclear (result);
+      return GNUNET_SYSERR;
+    }
     cb (cb_cls,
         &merchant_pub,
+        wire_method,
         &h_wire,
         exec_time,
-        &h_contract,
-        transaction_id,
+        &h_proposal_data,
         &coin_pub,
         &amount_with_fee,
         &deposit_fee);
+    GNUNET_PQ_cleanup_result (rs);
   }
   PQclear (result);
   return GNUNET_OK;
@@ -4052,11 +4089,10 @@ postgres_lookup_wire_transfer (void *cls,
  *
  * @param cls closure
  * @param session database connection
- * @param h_contract hash of the contract
+ * @param h_proposal_data hash of the proposal data
  * @param h_wire hash of merchant wire details
  * @param coin_pub public key of deposited coin
  * @param merchant_pub merchant public key
- * @param transaction_id transaction identifier
  * @param cb function to call with the result
  * @param cb_cls closure to pass to @a cb
  * @return #GNUNET_OK on success, #GNUNET_SYSERR on DB errors,
@@ -4065,20 +4101,18 @@ postgres_lookup_wire_transfer (void *cls,
 static int
 postgres_wire_lookup_deposit_wtid (void *cls,
                                    struct TALER_EXCHANGEDB_Session *session,
-                                  const struct GNUNET_HashCode *h_contract,
+                                  const struct GNUNET_HashCode 
*h_proposal_data,
                                   const struct GNUNET_HashCode *h_wire,
                                   const struct TALER_CoinSpendPublicKeyP 
*coin_pub,
                                   const struct TALER_MerchantPublicKeyP 
*merchant_pub,
-                                  uint64_t transaction_id,
                                   TALER_EXCHANGEDB_TrackTransactionCallback cb,
                                   void *cb_cls)
 {
   PGresult *result;
   struct GNUNET_PQ_QueryParam params[] = {
     GNUNET_PQ_query_param_auto_from_type (coin_pub),
-    GNUNET_PQ_query_param_auto_from_type (h_contract),
+    GNUNET_PQ_query_param_auto_from_type (h_proposal_data),
     GNUNET_PQ_query_param_auto_from_type (h_wire),
-    GNUNET_PQ_query_param_uint64 (&transaction_id),
     GNUNET_PQ_query_param_auto_from_type (merchant_pub),
     GNUNET_PQ_query_param_end
   };
@@ -4107,9 +4141,8 @@ postgres_wire_lookup_deposit_wtid (void *cls,
     {
       struct GNUNET_PQ_QueryParam params2[] = {
         GNUNET_PQ_query_param_auto_from_type (coin_pub),
-        GNUNET_PQ_query_param_uint64 (&transaction_id),
         GNUNET_PQ_query_param_auto_from_type (merchant_pub),
-        GNUNET_PQ_query_param_auto_from_type (h_contract),
+        GNUNET_PQ_query_param_auto_from_type (h_proposal_data),
         GNUNET_PQ_query_param_auto_from_type (h_wire),
         GNUNET_PQ_query_param_end
       };
@@ -4146,9 +4179,10 @@ postgres_wire_lookup_deposit_wtid (void *cls,
         GNUNET_PQ_result_spec_end
       };
 
-      if (GNUNET_OK != GNUNET_PQ_extract_result (result,
-                                                 rs,
-                                                 0))
+      if (GNUNET_OK !=
+          GNUNET_PQ_extract_result (result,
+                                    rs,
+                                    0))
       {
         GNUNET_break (0);
         PQclear (result);
@@ -4181,9 +4215,10 @@ postgres_wire_lookup_deposit_wtid (void *cls,
       TALER_PQ_result_spec_amount ("fee_deposit", &deposit_fee),
       GNUNET_PQ_result_spec_end
     };
-    if (GNUNET_OK != GNUNET_PQ_extract_result (result,
-                                               rs,
-                                               0))
+    if (GNUNET_OK !=
+        GNUNET_PQ_extract_result (result,
+                                  rs,
+                                  0))
     {
       GNUNET_break (0);
       PQclear (result);
@@ -4247,6 +4282,170 @@ postgres_insert_aggregation_tracking (void *cls,
 
 
 /**
+ * Obtain wire fee from database.
+ *
+ * @param cls closure
+ * @param session database connection
+ * @param type type of wire transfer the fee applies for
+ * @param date for which date do we want the fee?
+ * @param[out] start_date when does the fee go into effect
+ * @param[out] end_date when does the fee end being valid
+ * @param[out] wire_fee how high is the wire transfer fee
+ * @param[out] master_sig signature over the above by the exchange master key
+ * @return #GNUNET_OK on success, #GNUNET_NO if no fee is known
+ *         #GNUNET_SYSERR on failure
+ */
+static int
+postgres_get_wire_fee (void *cls,
+                       struct TALER_EXCHANGEDB_Session *session,
+                       const char *type,
+                       struct GNUNET_TIME_Absolute date,
+                       struct GNUNET_TIME_Absolute *start_date,
+                       struct GNUNET_TIME_Absolute *end_date,
+                       struct TALER_Amount *wire_fee,
+                       struct TALER_MasterSignatureP *master_sig)
+{
+  struct GNUNET_PQ_QueryParam params[] = {
+    GNUNET_PQ_query_param_string (type),
+    GNUNET_PQ_query_param_absolute_time (&date),
+    GNUNET_PQ_query_param_end
+  };
+  struct GNUNET_PQ_ResultSpec rs[] = {
+    GNUNET_PQ_result_spec_absolute_time ("start_date", start_date),
+    GNUNET_PQ_result_spec_absolute_time ("end_date", end_date),
+    TALER_PQ_result_spec_amount ("wire_fee", wire_fee),
+    GNUNET_PQ_result_spec_auto_from_type ("master_sig", master_sig),
+    GNUNET_PQ_result_spec_end
+  };
+  PGresult *result;
+  int nrows;
+
+  result = GNUNET_PQ_exec_prepared (session->conn,
+                                    "get_wire_fee",
+                                    params);
+  if (PGRES_TUPLES_OK !=
+      PQresultStatus (result))
+  {
+    BREAK_DB_ERR (result);
+    PQclear (result);
+    return GNUNET_SYSERR;
+  }
+  nrows = PQntuples (result);
+  if (0 == nrows)
+  {
+    /* no matches found */
+    PQclear (result);
+    return GNUNET_NO;
+  }
+  if (1 != nrows)
+  {
+    GNUNET_break (0);
+    return GNUNET_SYSERR;
+  }
+  if (GNUNET_OK !=
+      GNUNET_PQ_extract_result (result,
+                                rs,
+                                0))
+  {
+    PQclear (result);
+    GNUNET_break (0);
+    return GNUNET_SYSERR;
+  }
+  PQclear (result);
+  return GNUNET_OK;
+}
+
+
+/**
+ * Insert wire transfer fee into database.
+ *
+ * @param cls closure
+ * @param session database connection
+ * @param type type of wire transfer this fee applies for
+ * @param start_date when does the fee go into effect
+ * @param end_date when does the fee end being valid
+ * @param wire_fee how high is the wire transfer fee
+ * @param master_sig signature over the above by the exchange master key
+ * @return #GNUNET_OK on success, #GNUNET_NO if the record exists,
+ *         #GNUNET_SYSERR on failure
+ */
+static int
+postgres_insert_wire_fee (void *cls,
+                          struct TALER_EXCHANGEDB_Session *session,
+                          const char *type,
+                          struct GNUNET_TIME_Absolute start_date,
+                          struct GNUNET_TIME_Absolute end_date,
+                          const struct TALER_Amount *wire_fee,
+                          const struct TALER_MasterSignatureP *master_sig)
+{
+  struct GNUNET_PQ_QueryParam params[] = {
+    GNUNET_PQ_query_param_string (type),
+    GNUNET_PQ_query_param_absolute_time (&start_date),
+    GNUNET_PQ_query_param_absolute_time (&end_date),
+    TALER_PQ_query_param_amount (wire_fee),
+    GNUNET_PQ_query_param_auto_from_type (master_sig),
+    GNUNET_PQ_query_param_end
+  };
+  PGresult *result;
+  struct TALER_Amount wf;
+  struct TALER_MasterSignatureP sig;
+  struct GNUNET_TIME_Absolute sd;
+  struct GNUNET_TIME_Absolute ed;
+
+  if (GNUNET_OK ==
+      postgres_get_wire_fee (cls,
+                             session,
+                             type,
+                             start_date,
+                             &sd,
+                             &ed,
+                             &wf,
+                             &sig))
+  {
+    if (0 != memcmp (&sig,
+                     master_sig,
+                     sizeof (sig)))
+    {
+      GNUNET_break (0);
+      return GNUNET_SYSERR;
+    }
+    if (0 != TALER_amount_cmp (wire_fee,
+                               &wf))
+    {
+      GNUNET_break (0);
+      return GNUNET_SYSERR;
+    }
+    if ( (sd.abs_value_us != start_date.abs_value_us) ||
+         (ed.abs_value_us != end_date.abs_value_us) )
+    {
+      GNUNET_break (0);
+      return GNUNET_SYSERR;
+    }
+    /* equal record already exists */
+    return GNUNET_NO;
+  }
+
+  result = GNUNET_PQ_exec_prepared (session->conn,
+                                   "insert_wire_fee",
+                                   params);
+  if (PGRES_COMMAND_OK != PQresultStatus (result))
+  {
+    BREAK_DB_ERR (result);
+    PQclear (result);
+    return GNUNET_SYSERR;
+  }
+  if (0 != strcmp ("1", PQcmdTuples (result)))
+  {
+    GNUNET_break (0);
+    PQclear (result);
+    return GNUNET_SYSERR;
+  }
+  PQclear (result);
+  return GNUNET_OK;
+}
+
+
+/**
  * Function called to insert wire transfer commit data into the DB.
  *
  * @param cls closure
@@ -4520,7 +4719,6 @@ postgres_select_deposits_above_serial_id (void *cls,
     struct TALER_EXCHANGEDB_Deposit deposit;
     uint8_t done = 0;
     uint64_t rowid;
-
     struct GNUNET_PQ_ResultSpec rs[] = {
       TALER_PQ_result_spec_amount ("amount_with_fee",
                                    &deposit.amount_with_fee),
@@ -4532,14 +4730,12 @@ postgres_select_deposits_above_serial_id (void *cls,
                                            &deposit.coin.coin_pub),
       GNUNET_PQ_result_spec_auto_from_type ("coin_sig",
                                            &deposit.csig),
-      GNUNET_PQ_result_spec_uint64 ("transaction_id",
-                                    &deposit.transaction_id),
       GNUNET_PQ_result_spec_absolute_time ("refund_deadline",
                                            &deposit.refund_deadline),
       GNUNET_PQ_result_spec_absolute_time ("wire_deadline",
                                            &deposit.wire_deadline),
-      GNUNET_PQ_result_spec_auto_from_type ("h_contract",
-                                           &deposit.h_contract),
+      GNUNET_PQ_result_spec_auto_from_type ("h_proposal_data",
+                                           &deposit.h_proposal_data),
       TALER_PQ_result_spec_json ("wire",
                                  &deposit.receiver_wire_account),
       GNUNET_PQ_result_spec_auto_from_type ("done",
@@ -4563,12 +4759,12 @@ postgres_select_deposits_above_serial_id (void *cls,
         &deposit.coin.coin_pub,
         &deposit.csig,
         &deposit.amount_with_fee,
-        deposit.transaction_id,
-        &deposit.h_contract,
+        &deposit.h_proposal_data,
         deposit.refund_deadline,
         deposit.wire_deadline,
         deposit.receiver_wire_account,
         done);
+    GNUNET_PQ_cleanup_result (rs);
   }
   PQclear (result);
   return GNUNET_OK;
@@ -4662,6 +4858,7 @@ postgres_select_refreshs_above_serial_id (void *cls,
         &amount_with_fee,
         num_newcoins,
         noreveal_index);
+    GNUNET_PQ_cleanup_result (rs);
   }
   PQclear (result);
   return GNUNET_OK;
@@ -4723,10 +4920,8 @@ postgres_select_refunds_above_serial_id (void *cls,
                                             &refund.merchant_pub),
       GNUNET_PQ_result_spec_auto_from_type ("merchant_sig",
                                            &refund.merchant_sig),
-      GNUNET_PQ_result_spec_auto_from_type ("h_contract",
-                                           &refund.h_contract),
-      GNUNET_PQ_result_spec_uint64 ("transaction_id",
-                                    &refund.transaction_id),
+      GNUNET_PQ_result_spec_auto_from_type ("h_proposal_data",
+                                           &refund.h_proposal_data),
       GNUNET_PQ_result_spec_uint64 ("rtransaction_id",
                                     &refund.rtransaction_id),
       GNUNET_PQ_result_spec_auto_from_type ("coin_pub",
@@ -4751,10 +4946,10 @@ postgres_select_refunds_above_serial_id (void *cls,
         &refund.coin.coin_pub,
         &refund.merchant_pub,
         &refund.merchant_sig,
-        &refund.h_contract,
-        refund.transaction_id,
+        &refund.h_proposal_data,
         refund.rtransaction_id,
         &refund.refund_amount);
+    GNUNET_PQ_cleanup_result (rs);
   }
   PQclear (result);
   return GNUNET_OK;
@@ -4848,6 +5043,7 @@ postgres_select_reserves_in_above_serial_id (void *cls,
         sender_account_details,
         transfer_details,
         execution_date);
+    GNUNET_PQ_cleanup_result (rs);
   }
 
   PQclear (result);
@@ -4948,6 +5144,7 @@ postgres_select_reserves_out_above_serial_id (void *cls,
         &reserve_sig,
         execution_date,
         &amount_with_fee);
+    GNUNET_PQ_cleanup_result (rs);
   }
 
   PQclear (result);
@@ -5039,6 +5236,7 @@ postgres_select_prepare_above_serial_id (void *cls,
         buf,
         buf_size,
         finished);
+    GNUNET_PQ_cleanup_result (rs);
   }
 
   PQclear (result);
@@ -5132,6 +5330,8 @@ libtaler_plugin_exchangedb_postgres_init (void *cls)
   plugin->lookup_wire_transfer = &postgres_lookup_wire_transfer;
   plugin->wire_lookup_deposit_wtid = &postgres_wire_lookup_deposit_wtid;
   plugin->insert_aggregation_tracking = &postgres_insert_aggregation_tracking;
+  plugin->insert_wire_fee = &postgres_insert_wire_fee;
+  plugin->get_wire_fee = &postgres_get_wire_fee;
   plugin->wire_prepare_data_insert = &postgres_wire_prepare_data_insert;
   plugin->wire_prepare_data_mark_finished = 
&postgres_wire_prepare_data_mark_finished;
   plugin->wire_prepare_data_get = &postgres_wire_prepare_data_get;
diff --git a/src/exchangedb/test_exchangedb.c b/src/exchangedb/test_exchangedb.c
index bc46a8f..9b4cfde 100644
--- a/src/exchangedb/test_exchangedb.c
+++ b/src/exchangedb/test_exchangedb.c
@@ -1,6 +1,6 @@
 /*
   This file is part of TALER
-  Copyright (C) 2014, 2015, 2016 GNUnet e.V.
+  Copyright (C) 2014, 2015, 2016, 2017 GNUnet e.V.
 
   TALER is free software; you can redistribute it and/or modify it under the
   terms of the GNU General Public License as published by the Free Software
@@ -512,8 +512,7 @@ check_transfer_data (void *cls,
  * @param coin_pub public key of the coin
  * @param coin_sig signature from the coin
  * @param amount_with_fee amount that was deposited including fee
- * @param transaction_id unique transaction ID chosen by the merchant
- * @param h_contract hash of the contract between merchant and customer
+ * @param h_proposal_data hash of the proposal data known to merchant and 
customer
  * @param refund_deadline by which the merchant adviced that he might want
  *        to get a refund
  * @param wire_deadline by which the merchant adviced that he would like the
@@ -784,10 +783,10 @@ test_melting (struct TALER_EXCHANGEDB_Session *session)
 static void
 cb_wt_never (void *cls,
              const struct TALER_MerchantPublicKeyP *merchant_pub,
+             const char *wire_method,
              const struct GNUNET_HashCode *h_wire,
              struct GNUNET_TIME_Absolute exec_time,
-             const struct GNUNET_HashCode *h_contract,
-             uint64_t transaction_id,
+             const struct GNUNET_HashCode *h_proposal_data,
              const struct TALER_CoinSpendPublicKeyP *coin_pub,
              const struct TALER_Amount *coin_value,
              const struct TALER_Amount *coin_fee)
@@ -812,8 +811,7 @@ cb_wtid_never (void *cls,
 
 static struct TALER_MerchantPublicKeyP merchant_pub_wt;
 static struct GNUNET_HashCode h_wire_wt;
-static struct GNUNET_HashCode h_contract_wt;
-static uint64_t transaction_id_wt;
+static struct GNUNET_HashCode h_proposal_data_wt;
 static struct TALER_CoinSpendPublicKeyP coin_pub_wt;
 static struct TALER_Amount coin_value_wt;
 static struct TALER_Amount coin_fee_wt;
@@ -828,10 +826,10 @@ static struct TALER_WireTransferIdentifierRawP wtid_wt;
 static void
 cb_wt_check (void *cls,
              const struct TALER_MerchantPublicKeyP *merchant_pub,
+             const char *wire_method,
              const struct GNUNET_HashCode *h_wire,
              struct GNUNET_TIME_Absolute exec_time,
-             const struct GNUNET_HashCode *h_contract,
-             uint64_t transaction_id,
+             const struct GNUNET_HashCode *h_proposal_data,
              const struct TALER_CoinSpendPublicKeyP *coin_pub,
              const struct TALER_Amount *coin_value,
              const struct TALER_Amount *coin_fee)
@@ -840,14 +838,15 @@ cb_wt_check (void *cls,
   GNUNET_assert (0 == memcmp (merchant_pub,
                               &merchant_pub_wt,
                               sizeof (struct TALER_MerchantPublicKeyP)));
+  GNUNET_assert (0 == strcmp (wire_method,
+                              "SEPA"));
   GNUNET_assert (0 == memcmp (h_wire,
                               &h_wire_wt,
                               sizeof (struct GNUNET_HashCode)));
   GNUNET_assert (exec_time.abs_value_us == execution_time_wt.abs_value_us);
-  GNUNET_assert (0 == memcmp (h_contract,
-                              &h_contract_wt,
+  GNUNET_assert (0 == memcmp (h_proposal_data,
+                              &h_proposal_data_wt,
                               sizeof (struct GNUNET_HashCode)));
-  GNUNET_assert (transaction_id == transaction_id_wt);
   GNUNET_assert (0 == memcmp (coin_pub,
                               &coin_pub_wt,
                               sizeof (struct TALER_CoinSpendPublicKeyP)));
@@ -899,8 +898,7 @@ static uint64_t deposit_rowid;
  * @param coin_pub public key of the coin
  * @param amount_with_fee amount that was deposited including fee
  * @param deposit_fee amount the exchange gets to keep as transaction fees
- * @param transaction_id unique transaction ID chosen by the merchant
- * @param h_contract hash of the contract between merchant and customer
+ * @param h_proposal_data hash of the proposal data known to merchant and 
customer
  * @param wire_deadline by which the merchant adviced that he would like the
  *        wire transfer to be executed
  * @param wire wire details for the merchant, NULL from 
iterate_matching_deposits()
@@ -914,8 +912,7 @@ deposit_cb (void *cls,
             const struct TALER_CoinSpendPublicKeyP *coin_pub,
             const struct TALER_Amount *amount_with_fee,
             const struct TALER_Amount *deposit_fee,
-            uint64_t transaction_id,
-            const struct GNUNET_HashCode *h_contract,
+            const struct GNUNET_HashCode *h_proposal_data,
             struct GNUNET_TIME_Absolute wire_deadline,
             const json_t *wire)
 {
@@ -932,13 +929,12 @@ deposit_cb (void *cls,
                                &deposit->amount_with_fee)) ||
        (0 != TALER_amount_cmp (deposit_fee,
                                &deposit->deposit_fee)) ||
-       (0 != memcmp (h_contract,
-                     &deposit->h_contract,
+       (0 != memcmp (h_proposal_data,
+                     &deposit->h_proposal_data,
                      sizeof (struct GNUNET_HashCode))) ||
        (0 != memcmp (coin_pub,
                      &deposit->coin.coin_pub,
                      sizeof (struct TALER_CoinSpendPublicKeyP))) ||
-       (transaction_id != deposit->transaction_id) ||
        ( (NULL != wire) &&
          (0 != memcmp (&h_wire,
                        &deposit->h_wire,
@@ -951,6 +947,7 @@ deposit_cb (void *cls,
   return GNUNET_OK;
 }
 
+
 /**
  * Callback for #select_deposits_above_serial_id ()
  *
@@ -960,8 +957,7 @@ deposit_cb (void *cls,
  * @param coin_pub public key of the coin
  * @param coin_sig signature from the coin
  * @param amount_with_fee amount that was deposited including fee
- * @param transaction_id unique transaction ID chosen by the merchant
- * @param h_contract hash of the contract between merchant and customer
+ * @param h_proposal_data hash of the proposal data known to merchant and 
customer
  * @param refund_deadline by which the merchant adviced that he might want
  *        to get a refund
  * @param wire_deadline by which the merchant adviced that he would like the
@@ -970,15 +966,14 @@ deposit_cb (void *cls,
  * @param done flag set if the deposit was already executed (or not)
  * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop
  */
-int
+static int
 audit_deposit_cb (void *cls,
                   uint64_t rowid,
                   const struct TALER_MerchantPublicKeyP *merchant_pub,
                   const struct TALER_CoinSpendPublicKeyP *coin_pub,
                   const struct TALER_CoinSpendSignatureP *coin_sig,
                   const struct TALER_Amount *amount_with_fee,
-                  uint64_t transaction_id,
-                  const struct GNUNET_HashCode *h_contract,
+                  const struct GNUNET_HashCode *h_proposal_data,
                   struct GNUNET_TIME_Absolute refund_deadline,
                   struct GNUNET_TIME_Absolute wire_deadline,
                   const json_t *receiver_wire_account,
@@ -998,20 +993,19 @@ audit_deposit_cb (void *cls,
  * @param coin_pub public key of the coin
  * @param merchant_pub public key of the merchant
  * @param merchant_sig signature of the merchant
- * @param h_contract hash of the contract between merchant and customer
- * @param transaction_id original transaction ID chosen by the merchant
+ * @param h_proposal_data hash of the proposal data in
+ *                        the contract between merchant and customer
  * @param rtransaction_id refund transaction ID chosen by the merchant
  * @param amount_with_fee amount that was deposited including fee
  * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop
  */
-int
+static int
 audit_refund_cb (void *cls,
                  uint64_t rowid,
                  const struct TALER_CoinSpendPublicKeyP *coin_pub,
                  const struct TALER_MerchantPublicKeyP *merchant_pub,
                  const struct TALER_MerchantSignatureP *merchant_sig,
-                 const struct GNUNET_HashCode *h_contract,
-                 uint64_t transaction_id,
+                 const struct GNUNET_HashCode *h_proposal_data,
                  uint64_t rtransaction_id,
                  const struct TALER_Amount *amount_with_fee)
 {
@@ -1032,7 +1026,7 @@ audit_refund_cb (void *cls,
  * @param execution_date when did we receive the funds
  * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop
  */
-int
+static int
 audit_reserve_in_cb (void *cls,
                      uint64_t rowid,
                      const struct TALER_ReservePublicKeyP *reserve_pub,
@@ -1045,6 +1039,7 @@ audit_reserve_in_cb (void *cls,
   return GNUNET_OK;
 }
 
+
 /**
  * Function called with details about withdraw operations.
  *
@@ -1059,7 +1054,7 @@ audit_reserve_in_cb (void *cls,
  * @param amount_with_fee amount that was withdrawn
  * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop
  */
-int
+static int
 audit_reserve_out_cb (void *cls,
                       uint64_t rowid,
                       const struct GNUNET_HashCode *h_blind_ev,
@@ -1074,6 +1069,7 @@ audit_reserve_out_cb (void *cls,
   return GNUNET_OK;
 }
 
+
 /**
  * Test garbage collection.
  *
@@ -1123,6 +1119,99 @@ test_gc (struct TALER_EXCHANGEDB_Session *session)
 
 
 /**
+ * Test wire fee storage.
+ *
+ * @param session DB session to use
+ * @return #GNUNET_OK on success
+ */
+static int
+test_wire_fees (struct TALER_EXCHANGEDB_Session *session)
+{
+  struct GNUNET_TIME_Absolute start_date;
+  struct GNUNET_TIME_Absolute end_date;
+  struct TALER_Amount wire_fee;
+  struct TALER_MasterSignatureP master_sig;
+  struct GNUNET_TIME_Absolute sd;
+  struct GNUNET_TIME_Absolute ed;
+  struct TALER_Amount fee;
+  struct TALER_MasterSignatureP ms;
+
+  start_date = GNUNET_TIME_absolute_get ();
+  end_date = GNUNET_TIME_relative_to_absolute (GNUNET_TIME_UNIT_MINUTES);
+  GNUNET_assert (GNUNET_OK ==
+                 TALER_string_to_amount (CURRENCY ":1.424242",
+                                         &wire_fee));
+  GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_WEAK,
+                              &master_sig,
+                              sizeof (master_sig));
+  if (GNUNET_OK !=
+      plugin->insert_wire_fee (plugin->cls,
+                               session,
+                               "wire-method",
+                               start_date,
+                               end_date,
+                               &wire_fee,
+                               &master_sig))
+  {
+    GNUNET_break (0);
+    return GNUNET_SYSERR;
+  }
+  if (GNUNET_NO !=
+      plugin->insert_wire_fee (plugin->cls,
+                               session,
+                               "wire-method",
+                               start_date,
+                               end_date,
+                               &wire_fee,
+                               &master_sig))
+  {
+    GNUNET_break (0);
+    return GNUNET_SYSERR;
+  }
+  /* This must fail as 'end_date' is NOT in the
+     half-open interval [start_date,end_date) */
+  if (GNUNET_OK ==
+      plugin->get_wire_fee (plugin->cls,
+                            session,
+                            "wire-method",
+                            end_date,
+                            &sd,
+                            &ed,
+                            &fee,
+                            &ms))
+  {
+    GNUNET_break (0);
+    return GNUNET_SYSERR;
+  }
+  if (GNUNET_OK !=
+      plugin->get_wire_fee (plugin->cls,
+                            session,
+                            "wire-method",
+                            start_date,
+                            &sd,
+                            &ed,
+                            &fee,
+                            &ms))
+  {
+    GNUNET_break (0);
+    return GNUNET_SYSERR;
+  }
+  if ( (sd.abs_value_us != start_date.abs_value_us) ||
+       (ed.abs_value_us != end_date.abs_value_us) ||
+       (0 != TALER_amount_cmp (&fee,
+                               &wire_fee)) ||
+       (0 != memcmp (&ms,
+                     &master_sig,
+                     sizeof (ms))) )
+  {
+    GNUNET_break (0);
+    return GNUNET_SYSERR;
+  }
+  return GNUNET_OK;
+}
+
+
+/**
  * Main function that will be run by the scheduler.
  *
  * @param cls closure with config
@@ -1342,13 +1431,11 @@ run (void *cls)
   deposit.coin.denom_sig = cbc.sig;
   RND_BLK (&deposit.csig);
   RND_BLK (&deposit.merchant_pub);
-  RND_BLK (&deposit.h_contract);
+  RND_BLK (&deposit.h_proposal_data);
   wire = json_loads (json_wire_str, 0, NULL);
   TALER_JSON_hash (wire,
                    &deposit.h_wire);
   deposit.receiver_wire_account = wire;
-  deposit.transaction_id =
-      GNUNET_CRYPTO_random_u64 (GNUNET_CRYPTO_QUALITY_WEAK, UINT64_MAX);
   deposit.amount_with_fee = value;
   deposit.deposit_fee = fee_deposit;
   result = 8;
@@ -1421,12 +1508,6 @@ run (void *cls)
 
   result = 10;
   deposit2 = deposit;
-  deposit2.transaction_id++;     /* should fail if transaction id is different 
*/
-  FAILIF (GNUNET_NO !=
-          plugin->have_deposit (plugin->cls,
-                                session,
-                                &deposit2));
-  deposit2.transaction_id = deposit.transaction_id;
   RND_BLK (&deposit2.merchant_pub); /* should fail if merchant is different */
   FAILIF (GNUNET_NO !=
           plugin->have_deposit (plugin->cls,
@@ -1445,8 +1526,7 @@ run (void *cls)
   refund.coin = deposit.coin;
   refund.merchant_pub = deposit.merchant_pub;
   RND_BLK (&refund.merchant_sig);
-  refund.h_contract = deposit.h_contract;
-  refund.transaction_id = deposit.transaction_id;
+  refund.h_proposal_data = deposit.h_proposal_data;
   refund.rtransaction_id = GNUNET_CRYPTO_random_u64 
(GNUNET_CRYPTO_QUALITY_WEAK, UINT64_MAX);
   refund.refund_amount = deposit.amount_with_fee;
   refund.refund_fee = fee_refund;
@@ -1488,14 +1568,13 @@ run (void *cls)
         FAILIF (0 != memcmp (&have->merchant_pub,
                              &deposit.merchant_pub,
                              sizeof (struct TALER_MerchantPublicKeyP)));
-        FAILIF (0 != memcmp (&have->h_contract,
-                             &deposit.h_contract,
+        FAILIF (0 != memcmp (&have->h_proposal_data,
+                             &deposit.h_proposal_data,
                              sizeof (struct GNUNET_HashCode)));
         FAILIF (0 != memcmp (&have->h_wire,
                              &deposit.h_wire,
                              sizeof (struct GNUNET_HashCode)));
         /* Note: not comparing 'wire', seems truly redundant and would be 
tricky */
-        FAILIF (have->transaction_id != deposit.transaction_id);
         FAILIF (have->timestamp.abs_value_us != 
deposit.timestamp.abs_value_us);
         FAILIF (have->refund_deadline.abs_value_us != 
deposit.refund_deadline.abs_value_us);
         FAILIF (have->wire_deadline.abs_value_us != 
deposit.wire_deadline.abs_value_us);
@@ -1531,10 +1610,9 @@ run (void *cls)
         FAILIF (0 != memcmp (&have->merchant_sig,
                              &refund.merchant_sig,
                              sizeof (struct TALER_MerchantSignatureP)));
-        FAILIF (0 != memcmp (&have->h_contract,
-                             &refund.h_contract,
+        FAILIF (0 != memcmp (&have->h_proposal_data,
+                             &refund.h_proposal_data,
                              sizeof (struct GNUNET_HashCode)));
-        FAILIF (have->transaction_id != refund.transaction_id);
         FAILIF (have->rtransaction_id != refund.rtransaction_id);
         FAILIF (0 != TALER_amount_cmp (&have->refund_amount,
                                        &refund.refund_amount));
@@ -1559,9 +1637,8 @@ run (void *cls)
   memset (&wtid, 42, sizeof (wtid));
   merchant_pub_wt = deposit.merchant_pub;
   h_wire_wt = deposit.h_wire;
-  h_contract_wt = deposit.h_contract;
+  h_proposal_data_wt = deposit.h_proposal_data;
   coin_pub_wt = deposit.coin.coin_pub;
-  transaction_id_wt = deposit.transaction_id;
   execution_time_wt = GNUNET_TIME_absolute_get ();
   coin_value_wt = deposit.amount_with_fee;
   coin_fee_wt = fee_deposit;
@@ -1575,16 +1652,21 @@ run (void *cls)
                                         &wtid_wt,
                                         &cb_wt_never,
                                         NULL));
-  FAILIF (GNUNET_NO !=
-          plugin->wire_lookup_deposit_wtid (plugin->cls,
-                                            session,
-                                            &h_contract_wt,
-                                            &h_wire_wt,
-                                            &coin_pub_wt,
-                                            &merchant_pub_wt,
-                                            transaction_id_wt + 1 /* want 
UNKNOWN transaction here, hence + 1 */,
-                                            &cb_wtid_never,
-                                            NULL));
+
+  {
+    struct GNUNET_HashCode h_proposal_data_wt2 = h_proposal_data_wt;
+
+    h_proposal_data_wt2.bits[0]++;
+    FAILIF (GNUNET_NO !=
+            plugin->wire_lookup_deposit_wtid (plugin->cls,
+                                              session,
+                                              &h_proposal_data_wt2,
+                                              &h_wire_wt,
+                                              &coin_pub_wt,
+                                              &merchant_pub_wt,
+                                              &cb_wtid_never,
+                                              NULL));
+  }
   /* insert WT data */
   FAILIF (GNUNET_OK !=
           plugin->insert_aggregation_tracking (plugin->cls,
@@ -1601,15 +1683,16 @@ run (void *cls)
   FAILIF (GNUNET_OK !=
           plugin->wire_lookup_deposit_wtid (plugin->cls,
                                             session,
-                                            &h_contract_wt,
+                                            &h_proposal_data_wt,
                                             &h_wire_wt,
                                             &coin_pub_wt,
                                             &merchant_pub_wt,
-                                            transaction_id_wt,
                                             &cb_wtid_check,
                                             &cb_wtid_never));
   FAILIF (GNUNET_OK !=
           test_gc (session));
+  FAILIF (GNUNET_OK !=
+          test_wire_fees (session));
 
   result = 0;
 
diff --git a/src/exchangedb/test_exchangedb_fees.c 
b/src/exchangedb/test_exchangedb_fees.c
new file mode 100644
index 0000000..2bee774
--- /dev/null
+++ b/src/exchangedb/test_exchangedb_fees.c
@@ -0,0 +1,147 @@
+/*
+  This file is part of TALER
+  Copyright (C) 2017 Inria & GNUnet e. V.
+
+  TALER is free software; you can redistribute it and/or modify it under the
+  terms of the GNU General Public License as published by the Free Software
+  Foundation; either version 3, or (at your option) any later version.
+
+  TALER is distributed in the hope that it will be useful, but WITHOUT ANY
+  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+  A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License along with
+  TALER; see the file COPYING.  If not, see <http://www.gnu.org/licenses/>
+*/
+/**
+ * @file exchangedb/test_exchangedb_fees.c
+ * @brief test cases for functions in exchangedb/exchangedb_fees.c
+ * @author Christian Grothoff
+ */
+#include "platform.h"
+#include "gnunet/gnunet_util_lib.h"
+#include "taler_signatures.h"
+#include "taler_exchangedb_lib.h"
+
+
+/**
+ * Sign @a af with @a priv
+ *
+ * @param[in|out] af fee structure to sign
+ * @param priv private key to use for signing
+ */
+static void
+sign_af (struct TALER_EXCHANGEDB_AggregateFees *af,
+         const struct GNUNET_CRYPTO_EddsaPrivateKey *priv)
+{
+  struct TALER_MasterWireFeePS wf;
+
+  TALER_EXCHANGEDB_fees_2_wf ("test",
+                              af,
+                              &wf);
+  GNUNET_assert (GNUNET_OK ==
+                 GNUNET_CRYPTO_eddsa_sign (priv,
+                                           &wf.purpose,
+                                           &af->master_sig.eddsa_signature));
+}
+
+
+int
+main (int argc,
+      const char *const argv[])
+{
+  struct GNUNET_CONFIGURATION_Handle *cfg;
+  struct TALER_EXCHANGEDB_AggregateFees *af;
+  struct TALER_EXCHANGEDB_AggregateFees *n;
+  struct TALER_MasterPublicKeyP master_pub;
+  struct GNUNET_CRYPTO_EddsaPrivateKey *priv;
+  char *tmpdir;
+  char *tmpfile = NULL;
+  int ret;
+  unsigned int year;
+
+  GNUNET_log_setup ("test-exchangedb-fees",
+                    "WARNING",
+                    NULL);
+  tmpdir = GNUNET_DISK_mkdtemp ("test_exchangedb_fees");
+  if (NULL == tmpdir)
+    return 77; /* skip test */
+  priv = GNUNET_CRYPTO_eddsa_key_create ();
+  GNUNET_CRYPTO_eddsa_key_get_public (priv,
+                                      &master_pub.eddsa_pub);
+  cfg = GNUNET_CONFIGURATION_create ();
+  GNUNET_CONFIGURATION_set_value_string (cfg,
+                                         "exchangedb",
+                                         "WIREFEE_BASE_DIR",
+                                         tmpdir);
+  GNUNET_asprintf (&tmpfile,
+                   "%s/%s.fee",
+                   tmpdir,
+                   "test");
+  ret = 0;
+  af = GNUNET_new (struct TALER_EXCHANGEDB_AggregateFees);
+  year = GNUNET_TIME_get_current_year ();
+  af->start_date = GNUNET_TIME_year_to_time (year);
+  af->end_date = GNUNET_TIME_year_to_time (year + 1);
+  GNUNET_assert (GNUNET_OK ==
+                 TALER_string_to_amount ("EUR:1.0",
+                                         &af->wire_fee));
+  sign_af (af,
+           priv);
+  n = GNUNET_new (struct TALER_EXCHANGEDB_AggregateFees);
+  n->start_date = GNUNET_TIME_year_to_time (year + 1);
+  n->end_date = GNUNET_TIME_year_to_time (year + 2);
+  GNUNET_assert (GNUNET_OK ==
+                 TALER_string_to_amount ("EUR:0.1",
+                                         &n->wire_fee));
+  sign_af (n,
+           priv);
+  af->next = n;
+
+  if (GNUNET_OK !=
+      TALER_EXCHANGEDB_fees_write (tmpfile,
+                                   "test",
+                                   af))
+  {
+    GNUNET_break (0);
+    ret = 1;
+  }
+  TALER_EXCHANGEDB_fees_free (af);
+  GNUNET_free (tmpfile);
+  af = TALER_EXCHANGEDB_fees_read (cfg,
+                                   "test");
+  if (NULL == af)
+  {
+    GNUNET_break (0);
+    ret = 1;
+  }
+  else
+  {
+    for (struct TALER_EXCHANGEDB_AggregateFees *p = af;
+         NULL != p;
+         p = p->next)
+    {
+      struct TALER_MasterWireFeePS wf;
+
+      TALER_EXCHANGEDB_fees_2_wf ("test",
+                                  p,
+                                  &wf);
+      if (GNUNET_OK !=
+          GNUNET_CRYPTO_eddsa_verify (TALER_SIGNATURE_MASTER_WIRE_FEES,
+                                      &wf.purpose,
+                                      &p->master_sig.eddsa_signature,
+                                      &master_pub.eddsa_pub))
+      {
+        GNUNET_break (0);
+        ret = 1;
+      }
+    }
+    TALER_EXCHANGEDB_fees_free (af);
+  }
+
+  (void) GNUNET_DISK_directory_remove (tmpdir);
+  GNUNET_free (tmpdir);
+  GNUNET_free (priv);
+  GNUNET_CONFIGURATION_destroy (cfg);
+  return ret;
+}
diff --git a/src/include/platform.h b/src/include/platform.h
index 0757227..607bd73 100644
--- a/src/include/platform.h
+++ b/src/include/platform.h
@@ -51,6 +51,11 @@
 /* Do not use deprecated functions from gcrypt */
 #define GCRYPT_NO_DEPRECATED 1
 
+/* Ignore MHD deprecations for now as we want to be compatible
+   to "ancient" MHD releases. */
+#define MHD_NO_DEPRECATION 1
+
+
 #endif  /* PLATFORM_H_ */
 
 /* end of platform.h */
diff --git a/src/include/taler_amount_lib.h b/src/include/taler_amount_lib.h
index 5a59c10..555894f 100644
--- a/src/include/taler_amount_lib.h
+++ b/src/include/taler_amount_lib.h
@@ -252,6 +252,20 @@ TALER_amount_add (struct TALER_Amount *sum,
 
 
 /**
+ * Divide an amount by a float.  Note that this function
+ * may introduce a rounding error!
+ *
+ * @param result where to store @a dividend / @a divisor
+ * @param dividend amount to divide
+ * @param divisor by what to divide, must be positive
+ */
+void
+TALER_amount_divide (struct TALER_Amount *result,
+                     const struct TALER_Amount *dividend,
+                     uint32_t divisor);
+
+
+/**
  * Normalize the given amount.
  *
  * @param amount amount to normalize
diff --git a/src/include/taler_bank_service.h b/src/include/taler_bank_service.h
index 221e9b0..e5ea421 100644
--- a/src/include/taler_bank_service.h
+++ b/src/include/taler_bank_service.h
@@ -57,8 +57,9 @@ typedef void
  * to the operators of the bank.
  *
  * @param ctx curl context for the event loop
- * @param bank_base_url URL of the bank
- * @param reserve_pub public key of the reserve
+ * @param bank_base_url URL of the bank (used to execute this request)
+ * @param exchange_base_url base URL of the exchange (for tracking)
+ * @param wtid wire transfer identifier for the transfer
  * @param amount amount that was deposited
  * @param execution_date when did we receive the amount
  * @param debit_account_no account number to withdraw from (53 bits at most)
@@ -72,6 +73,7 @@ typedef void
 struct TALER_BANK_AdminAddIncomingHandle *
 TALER_BANK_admin_add_incoming (struct GNUNET_CURL_Context *ctx,
                                const char *bank_base_url,
+                               const char *exchange_base_url,
                                const struct TALER_WireTransferIdentifierRawP 
*wtid,
                                const struct TALER_Amount *amount,
                                uint64_t debit_account_no,
diff --git a/src/include/taler_crypto_lib.h b/src/include/taler_crypto_lib.h
index 269c1c6..c5ddeb0 100644
--- a/src/include/taler_crypto_lib.h
+++ b/src/include/taler_crypto_lib.h
@@ -361,9 +361,9 @@ struct TALER_CoinPublicInfo
 struct TALER_TrackTransferDetails
 {
   /**
-   * Hash of the contract.
+   * Hash of the proposal data.
    */
-  struct GNUNET_HashCode h_contract;
+  struct GNUNET_HashCode h_proposal_data;
 
   /**
    * Which coin was deposited?
@@ -380,11 +380,6 @@ struct TALER_TrackTransferDetails
    */
   struct TALER_Amount coin_fee;
 
-  /**
-   * Merchant's transaction identifier.
-   */
-  uint64_t transaction_id;
-
 };
 
 
diff --git a/src/include/taler_error_codes.h b/src/include/taler_error_codes.h
index 5bd9bde..c8a030f 100644
--- a/src/include/taler_error_codes.h
+++ b/src/include/taler_error_codes.h
@@ -343,7 +343,7 @@ enum TALER_ErrorCode
 
   /**
    * The hash of the given wire address does not match the hash
-   * specified in the contract.
+   * specified in the proposal data.
    * This response is provided
    * with HTTP status code MHD_HTTP_BAD_REQUEST.
    */
@@ -779,6 +779,19 @@ enum TALER_ErrorCode
    */
   TALER_EC_TRACK_TRANSFER_WTID_NOT_FOUND = 1702,
 
+  /**
+   * The exchange did not find information about the wire transfer
+   * fees it charged. This response is
+   * provided with HTTP status code MHD_HTTP_INTERNAL_SERVER_ERROR.
+   */
+  TALER_EC_TRACK_TRANSFER_WIRE_FEE_NOT_FOUND = 1703,
+
+  /**
+   * The exchange found a wire fee that was above the total transfer
+   * value (and thus could not have been charged). This response is
+   * provided with HTTP status code MHD_HTTP_INTERNAL_SERVER_ERROR.
+   */
+  TALER_EC_TRACK_TRANSFER_WIRE_FEE_INCONSISTENT = 1704,
 
   /**
    * The exchange found internally inconsistent fee data when
@@ -978,6 +991,35 @@ enum TALER_ErrorCode
    */
   TALER_EC_PAY_OFFER_EXPIRED = 2121,
 
+  /**
+   * The "merchant" field is missing in the proposal data.
+   * This response is
+   * provided with HTTP status code MHD_HTTP_BAD_REQUEST.
+   */
+  TALER_EC_PAY_MERCHANT_FIELD_MISSING = 2122,
+
+  /**
+   * Failed computing a hash code (likely server out-of-memory).
+   * This response is
+   * provided with HTTP status code MHD_HTTP_INTERNAL_SERVER_ERROR.
+   */
+  TALER_EC_PAY_FAILED_COMPUTE_PROPOSAL_HASH = 2123,
+
+  /**
+   * Failed to locate merchant's account information matching the
+   * wire hash given in the proposal.
+   * This response is
+   * provided with HTTP status code MHD_HTTP_INTERNAL_SERVER_ERROR.
+   */
+  TALER_EC_PAY_WIRE_HASH_UNKNOWN = 2124,
+
+  /**
+   * We got different currencies for the wire fee and the maximum wire
+   * fee.  This response is provided with HTTP status code
+   * MHD_HTTP_INTERNAL_SERVER_ERROR.
+   */
+  TALER_EC_PAY_WIRE_FEE_CURRENCY_MISSMATCH = 2125,
+
 
   /**
    * Integer overflow with sepcified timestamp argument detected.
@@ -994,6 +1036,12 @@ enum TALER_ErrorCode
   TALER_EC_HISTORY_DB_FETCH_ERROR = 2201,
 
   /**
+   * Instance used to retrieve history is unknown to the
+   * merchant.
+   */
+  TALER_EC_HISTORY_INSTANCE_UNKNOWN = 2202,
+
+  /**
    * We failed to contact the exchange for the /track/transaction
    * request.  This response is provided with HTTP status code
    * MHD_HTTP_SERVICE_UNAVAILABLE.
@@ -1139,23 +1187,22 @@ enum TALER_ErrorCode
 
   /**
    * The backend encountered an error while trying to store the
-   * pair <contract, h_contract> into the database. 
+   * h_proposal_data into the database.
    * The response is provided with HTTP status code 
MHD_HTTP_INTERNAL_SERVER_ERROR.
    */
-  TALER_EC_MAP_IN_STORE_DB_ERROR = 2501,
+  TALER_EC_PROPOSAL_STORE_DB_ERROR = 2501,
 
   /**
    * The backend encountered an error while trying to retrieve the
-   * contract from database.  Likely to be an internal error.
+   * proposal data from database.  Likely to be an internal error.
    */
-  TALER_EC_MAP_OUT_GET_FROM_DB_ERROR = 2502,
+  TALER_EC_PROPOSAL_LOOKUP_DB_ERROR = 2502,
 
 
   /**
-   * The backend encountered an error while trying to retrieve the
-   * contract from database.  Likely to be an internal error.
+   * The proposal being looked up is not found on this merchant.
    */
-  TALER_EC_MAP_OUT_CONTRACT_UNKNOWN = 2503,
+  TALER_EC_PROPOSAL_LOOKUP_NOT_FOUND = 2503,
 
   /* ********** /test API error codes ************* */
 
diff --git a/src/include/taler_exchange_service.h 
b/src/include/taler_exchange_service.h
index e368f95..3b90584 100644
--- a/src/include/taler_exchange_service.h
+++ b/src/include/taler_exchange_service.h
@@ -341,6 +341,69 @@ TALER_EXCHANGE_get_denomination_key_by_hash (const struct 
TALER_EXCHANGE_Keys *k
 
 
 /**
+ * Sorted list of fees to be paid for aggregate wire transfers.
+ */
+struct TALER_EXCHANGE_WireAggregateFees
+{
+  /**
+   * This is a linked list.
+   */
+  struct TALER_EXCHANGE_WireAggregateFees *next;
+
+  /**
+   * Fee to be paid.
+   */
+  struct TALER_Amount wire_fee;
+
+  /**
+   * Time when this fee goes into effect (inclusive)
+   */
+  struct GNUNET_TIME_Absolute start_date;
+
+  /**
+   * Time when this fee stops being in effect (exclusive).
+   */
+  struct GNUNET_TIME_Absolute end_date;
+
+  /**
+   * Signature affirming the above fee structure.
+   */
+  struct TALER_MasterSignatureP master_sig;
+};
+
+
+/**
+ * Function called with information about the wire fees
+ * for each wire method.
+ *
+ * @param cls closure
+ * @param wire_method name of the wire method (i.e. "sepa")
+ * @param fees fee structure for this method
+ */
+typedef void
+(*TALER_EXCHANGE_WireFeeCallback)(void *cls,
+                                  const char *wire_method,
+                                  const struct 
TALER_EXCHANGE_WireAggregateFees *fees);
+
+
+/**
+ * Obtain information about wire fees encoded in @a obj
+ * by wire method.
+ *
+ * @param master_pub public key to use to verify signatures, NULL to not verify
+ * @param obj wire information as encoded in the 
#TALER_EXCHANGE_WireResultCallback
+ * @param cb callback to invoke for the fees
+ * @param cb_cls closure for @a cb
+ * @return #GNUNET_OK in success, #GNUNET_SYSERR if @a obj is ill-formed
+ */
+int
+TALER_EXCHANGE_wire_get_fees (const struct TALER_MasterPublicKeyP *master_pub,
+                              const json_t *obj,
+                              TALER_EXCHANGE_WireFeeCallback cb,
+                              void *cb_cls);
+
+
+/**
  * @brief A Wire format inquiry handle
  */
 struct TALER_EXCHANGE_WireHandle;
@@ -451,12 +514,11 @@ typedef void
  * @param wire_deadline execution date, until which the merchant would like 
the exchange to settle the balance (advisory, the exchange cannot be
  *        forced to settle in the past or upon very short notice, but of 
course a well-behaved exchange will limit aggregation based on the advice 
received)
  * @param wire_details the merchant’s account details, in a format supported 
by the exchange
- * @param h_contract hash of the contact of the merchant with the customer 
(further details are never disclosed to the exchange)
+ * @param h_proposal_data hash of the contact of the merchant with the 
customer (further details are never disclosed to the exchange)
  * @param coin_pub coin’s public key
  * @param denom_pub denomination key with which the coin is signed
  * @param denom_sig exchange’s unblinded signature of the coin
  * @param timestamp timestamp when the contract was finalized, must match 
approximately the current time of the exchange
- * @param transaction_id transaction id for the transaction between merchant 
and customer
  * @param merchant_pub the public key of the merchant (used to identify the 
merchant for refund requests)
  * @param refund_deadline date until which the merchant can issue a refund to 
the customer via the exchange (can be zero if refunds are not allowed); must 
not be after the @a wire_deadline
  * @param coin_sig the signature made with purpose 
#TALER_SIGNATURE_WALLET_COIN_DEPOSIT made by the customer with the coin’s 
private key.
@@ -470,12 +532,11 @@ TALER_EXCHANGE_deposit (struct TALER_EXCHANGE_Handle 
*exchange,
                         const struct TALER_Amount *amount,
                         struct GNUNET_TIME_Absolute wire_deadline,
                         json_t *wire_details,
-                        const struct GNUNET_HashCode *h_contract,
+                        const struct GNUNET_HashCode *h_proposal_data,
                         const struct TALER_CoinSpendPublicKeyP *coin_pub,
                         const struct TALER_DenominationSignature *denom_sig,
                         const struct TALER_DenominationPublicKey *denom_pub,
                         struct GNUNET_TIME_Absolute timestamp,
-                        uint64_t transaction_id,
                         const struct TALER_MerchantPublicKeyP *merchant_pub,
                         struct GNUNET_TIME_Absolute refund_deadline,
                         const struct TALER_CoinSpendSignatureP *coin_sig,
@@ -539,8 +600,7 @@ typedef void
  *        (as that fee is still being subtracted), and smaller than the amount
  *        (with deposit fee) of the original deposit contribution of this coin
  * @param refund_fee fee applicable to this coin for the refund
- * @param h_contract hash of the contact of the merchant with the customer 
that is being refunded
- * @param transaction_id transaction id for the transaction being refunded, 
must match @a h_contract
+ * @param h_proposal_data hash of the contact of the merchant with the 
customer that is being refunded
  * @param coin_pub coin’s public key of the coin from the original deposit 
operation
  * @param rtransaction_id transaction id for the transaction between merchant 
and customer (of refunding operation);
  *                        this is needed as we may first do a partial refund 
and later a full refund.  If both
@@ -556,8 +616,7 @@ struct TALER_EXCHANGE_RefundHandle *
 TALER_EXCHANGE_refund (struct TALER_EXCHANGE_Handle *exchange,
                       const struct TALER_Amount *amount,
                       const struct TALER_Amount *refund_fee,
-                      const struct GNUNET_HashCode *h_contract,
-                      uint64_t transaction_id,
+                      const struct GNUNET_HashCode *h_proposal_data,
                       const struct TALER_CoinSpendPublicKeyP *coin_pub,
                       uint64_t rtransaction_id,
                       const struct TALER_MerchantPrivateKeyP *merchant_priv,
@@ -1134,6 +1193,7 @@ struct TALER_EXCHANGE_TrackTransferHandle;
  * @param execution_time time when the exchange claims to have performed the 
wire transfer
  * @param total_amount total amount of the wire transfer, or NULL if the 
exchange could
  *             not provide any @a wtid (set only if @a http_status is 
#MHD_HTTP_OK)
+ * @param wire_fee wire fee that was charged by the exchange
  * @param details_length length of the @a details array
  * @param details array with details about the combined transactions
  */
@@ -1146,6 +1206,7 @@ typedef void
                                         const struct GNUNET_HashCode *h_wire,
                                         struct GNUNET_TIME_Absolute 
execution_time,
                                         const struct TALER_Amount 
*total_amount,
+                                        const struct TALER_Amount *wire_fee,
                                         unsigned int details_length,
                                         const struct 
TALER_TrackTransferDetails *details);
 
@@ -1217,9 +1278,8 @@ typedef void
  * @param exchange the exchange to query
  * @param merchant_priv the merchant's private key
  * @param h_wire hash of merchant's wire transfer details
- * @param h_contract hash of the contract
+ * @param h_proposal_data hash of the proposal data
  * @param coin_pub public key of the coin
- * @param transaction_id transaction identifier
  * @param cb function to call with the result
  * @param cb_cls closure for @a cb
  * @return handle to abort request
@@ -1228,9 +1288,8 @@ struct TALER_EXCHANGE_TrackTransactionHandle *
 TALER_EXCHANGE_track_transaction (struct TALER_EXCHANGE_Handle *exchange,
                                   const struct TALER_MerchantPrivateKeyP 
*merchant_priv,
                                   const struct GNUNET_HashCode *h_wire,
-                                  const struct GNUNET_HashCode *h_contract,
+                                  const struct GNUNET_HashCode 
*h_proposal_data,
                                   const struct TALER_CoinSpendPublicKeyP 
*coin_pub,
-                                  uint64_t transaction_id,
                                   TALER_EXCHANGE_TrackTransactionCallback cb,
                                   void *cb_cls);
 
diff --git a/src/include/taler_exchangedb_lib.h 
b/src/include/taler_exchangedb_lib.h
index 4ebe484..e405747 100644
--- a/src/include/taler_exchangedb_lib.h
+++ b/src/include/taler_exchangedb_lib.h
@@ -1,6 +1,6 @@
 /*
   This file is part of TALER
-  Copyright (C) 2014, 2015, 2016 Inria & GNUnet e.V.
+  Copyright (C) 2014-2017 Inria & GNUnet e.V.
 
   TALER is free software; you can redistribute it and/or modify it under the
   terms of the GNU General Public License as published by the Free Software
@@ -25,6 +25,7 @@
 
 #include "taler_signatures.h"
 
+
 /**
  * Subdirectroy under the exchange's base directory which contains
  * the exchange's signing keys.
@@ -297,4 +298,83 @@ void
 TALER_EXCHANGEDB_plugin_unload (struct TALER_EXCHANGEDB_Plugin *plugin);
 
 
+/**
+ * Sorted list of fees to be paid for aggregate wire transfers.
+ */
+struct TALER_EXCHANGEDB_AggregateFees
+{
+  /**
+   * This is a linked list.
+   */
+  struct TALER_EXCHANGEDB_AggregateFees *next;
+
+  /**
+   * Fee to be paid.
+   */
+  struct TALER_Amount wire_fee;
+
+  /**
+   * Time when this fee goes into effect (inclusive)
+   */
+  struct GNUNET_TIME_Absolute start_date;
+
+  /**
+   * Time when this fee stops being in effect (exclusive).
+   */
+  struct GNUNET_TIME_Absolute end_date;
+
+  /**
+   * Signature affirming the above fee structure.
+   */
+  struct TALER_MasterSignatureP master_sig;
+};
+
+
+/**
+ * Read the current fee structure from disk.
+ *
+ * @param cfg configuration to use
+ * @param wireplugin name of the wire plugin to read fees for
+ * @return sorted list of aggregation fees, NULL on error
+ */
+struct TALER_EXCHANGEDB_AggregateFees *
+TALER_EXCHANGEDB_fees_read (const struct GNUNET_CONFIGURATION_Handle *cfg,
+                            const char *wireplugin);
+
+
+/**
+ * Convert @a af to @a wf.
+ *
+ * @param wireplugin name of the wire plugin the fees are for
+ * @param[in,out] af aggregate fees, host format (updated to round time)
+ * @param[out] wf aggregate fees, disk / signature format
+ */
+void
+TALER_EXCHANGEDB_fees_2_wf (const char *wireplugin,
+                            struct TALER_EXCHANGEDB_AggregateFees *af,
+                            struct TALER_MasterWireFeePS *wf);
+
+
+/**
+ * Write given fee structure to disk.
+ *
+ * @param filename where to write the fees
+ * @param wireplugin name of the plugin for which we write the fees
+ * @param af fee structure to write
+ * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
+ */
+int
+TALER_EXCHANGEDB_fees_write (const char *filename,
+                             const char *wireplugin,
+                             struct TALER_EXCHANGEDB_AggregateFees *af);
+
+
+/**
+ * Free @a af data structure
+ *
+ * @param af list to free
+ */
+void
+TALER_EXCHANGEDB_fees_free (struct TALER_EXCHANGEDB_AggregateFees *af);
+
 #endif
diff --git a/src/include/taler_exchangedb_plugin.h 
b/src/include/taler_exchangedb_plugin.h
index 19fb1d0..2beb0e3 100644
--- a/src/include/taler_exchangedb_plugin.h
+++ b/src/include/taler_exchangedb_plugin.h
@@ -1,6 +1,6 @@
 /*
   This file is part of TALER
-  Copyright (C) 2014, 2015, 2016 GNUnet e.V.
+  Copyright (C) 2014-2017 GNUnet e.V.
 
   TALER is free software; you can redistribute it and/or modify it under the
   terms of the GNU General Public License as published by the Free Software
@@ -223,8 +223,8 @@ struct TALER_EXCHANGEDB_Deposit
   /**
    * ECDSA signature affirming that the customer intends
    * this coin to be deposited at the merchant identified
-   * by @e h_wire in relation to the contract identified
-   * by @e h_contract.
+   * by @e h_wire in relation to the proposal data identified
+   * by @e h_proposal_data.
    */
   struct TALER_CoinSpendSignatureP csig;
 
@@ -235,10 +235,10 @@ struct TALER_EXCHANGEDB_Deposit
   struct TALER_MerchantPublicKeyP merchant_pub;
 
   /**
-   * Hash over the contract between merchant and customer
+   * Hash over the proposa data between merchant and customer
    * (remains unknown to the Exchange).
    */
-  struct GNUNET_HashCode h_contract;
+  struct GNUNET_HashCode h_proposal_data;
 
   /**
    * Hash of the (canonical) representation of @e wire, used
@@ -254,12 +254,6 @@ struct TALER_EXCHANGEDB_Deposit
   json_t *receiver_wire_account;
 
   /**
-   * Merchant-generated transaction ID to detect duplicate
-   * transactions.
-   */
-  uint64_t transaction_id;
-
-  /**
    * Time when this request was generated.  Used, for example, to
    * assess when (roughly) the income was achieved for tax purposes.
    * Note that the Exchange will only check that the timestamp is not "too
@@ -332,17 +326,10 @@ struct TALER_EXCHANGEDB_Refund
   struct TALER_MerchantSignatureP merchant_sig;
 
   /**
-   * Hash over the contract between merchant and customer
+   * Hash over the proposal data between merchant and customer
    * (remains unknown to the Exchange).
    */
-  struct GNUNET_HashCode h_contract;
-
-  /**
-   * Merchant-generated transaction ID to detect duplicate
-   * transactions, of the original transaction that is being
-   * refunded.
-   */
-  uint64_t transaction_id;
+  struct GNUNET_HashCode h_proposal_data;
 
   /**
    * Merchant-generated REFUND transaction ID to detect duplicate
@@ -562,8 +549,7 @@ struct TALER_EXCHANGEDB_Session;
  * @param coin_pub public key of the coin
  * @param amount_with_fee amount that was deposited including fee
  * @param deposit_fee amount the exchange gets to keep as transaction fees
- * @param transaction_id unique transaction ID chosen by the merchant
- * @param h_contract hash of the contract between merchant and customer
+ * @param h_proposal_data hash of the proposal data known to merchant and 
customer
  * @param wire_deadline by which the merchant adviced that he would like the
  *        wire transfer to be executed
  * @param receiver_wire_account wire details for the merchant, NULL from 
iterate_matching_deposits()
@@ -576,8 +562,7 @@ typedef int
                                     const struct TALER_CoinSpendPublicKeyP 
*coin_pub,
                                     const struct TALER_Amount *amount_with_fee,
                                     const struct TALER_Amount *deposit_fee,
-                                    uint64_t transaction_id,
-                                    const struct GNUNET_HashCode *h_contract,
+                                    const struct GNUNET_HashCode 
*h_proposal_data,
                                     struct GNUNET_TIME_Absolute wire_deadline,
                                     const json_t *receiver_wire_account);
 
@@ -609,8 +594,7 @@ typedef void
  * @param coin_pub public key of the coin
  * @param coin_sig signature from the coin
  * @param amount_with_fee amount that was deposited including fee
- * @param transaction_id unique transaction ID chosen by the merchant
- * @param h_contract hash of the contract between merchant and customer
+ * @param h_proposal_data hash of the proposal data known to merchant and 
customer
  * @param refund_deadline by which the merchant adviced that he might want
  *        to get a refund
  * @param wire_deadline by which the merchant adviced that he would like the
@@ -626,8 +610,7 @@ typedef int
                                     const struct TALER_CoinSpendPublicKeyP 
*coin_pub,
                                     const struct TALER_CoinSpendSignatureP 
*coin_sig,
                                     const struct TALER_Amount *amount_with_fee,
-                                    uint64_t transaction_id,
-                                    const struct GNUNET_HashCode *h_contract,
+                                    const struct GNUNET_HashCode 
*h_proposal_data,
                                     struct GNUNET_TIME_Absolute 
refund_deadline,
                                     struct GNUNET_TIME_Absolute wire_deadline,
                                     const json_t *receiver_wire_account,
@@ -644,8 +627,7 @@ typedef int
  * @param coin_pub public key of the coin
  * @param coin_sig signature from the coin
  * @param amount_with_fee amount that was deposited including fee
- * @param transaction_id unique transaction ID chosen by the merchant
- * @param h_contract hash of the contract between merchant and customer
+ * @param h_proposal_data hash of the proposal data known to merchant and 
customer
  * @param refund_deadline by which the merchant adviced that he might want
  *        to get a refund
  * @param wire_deadline by which the merchant adviced that he would like the
@@ -673,8 +655,7 @@ typedef int
  * @param coin_pub public key of the coin
  * @param merchant_pub public key of the merchant
  * @param merchant_sig signature of the merchant
- * @param h_contract hash of the contract between merchant and customer
- * @param transaction_id original transaction ID chosen by the merchant
+ * @param h_proposal_data hash of the proposal data known to merchant and 
customer
  * @param rtransaction_id refund transaction ID chosen by the merchant
  * @param amount_with_fee amount that was deposited including fee
  * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop
@@ -685,8 +666,7 @@ typedef int
                                    const struct TALER_CoinSpendPublicKeyP 
*coin_pub,
                                    const struct TALER_MerchantPublicKeyP 
*merchant_pub,
                                    const struct TALER_MerchantSignatureP 
*merchant_sig,
-                                   const struct GNUNET_HashCode *h_contract,
-                                   uint64_t transaction_id,
+                                   const struct GNUNET_HashCode 
*h_proposal_data,
                                    uint64_t rtransaction_id,
                                    const struct TALER_Amount *amount_with_fee);
 
@@ -782,10 +762,10 @@ typedef void
  *
  * @param cls closure
  * @param merchant_pub public key of the merchant (should be same for all 
callbacks with the same @e cls)
+ * @param wire_method which wire plugin was used for the transfer?
  * @param h_wire hash of wire transfer details of the merchant (should be same 
for all callbacks with the same @e cls)
  * @param exec_time execution time of the wire transfer (should be same for 
all callbacks with the same @e cls)
- * @param h_contract which contract was this payment about
- * @param transaction_id merchant's transaction ID for the payment
+ * @param h_proposal_data which proposal was this payment about
  * @param coin_pub which public key was this payment about
  * @param coin_value amount contributed by this coin in total (with fee)
  * @param coin_fee applicable fee for this coin
@@ -793,10 +773,10 @@ typedef void
 typedef void
 (*TALER_EXCHANGEDB_WireTransferDataCallback)(void *cls,
                                              const struct 
TALER_MerchantPublicKeyP *merchant_pub,
+                                             const char *wire_method,
                                              const struct GNUNET_HashCode 
*h_wire,
                                              struct GNUNET_TIME_Absolute 
exec_time,
-                                             const struct GNUNET_HashCode 
*h_contract,
-                                             uint64_t transaction_id,
+                                             const struct GNUNET_HashCode 
*h_proposal_data,
                                              const struct 
TALER_CoinSpendPublicKeyP *coin_pub,
                                              const struct TALER_Amount 
*coin_value,
                                              const struct TALER_Amount 
*coin_fee);
@@ -1504,11 +1484,10 @@ struct TALER_EXCHANGEDB_Plugin
    *
    * @param cls closure
    * @param session database connection
-   * @param h_contract hash of the contract
+   * @param h_proposal_data hash of the proposal data
    * @param h_wire hash of merchant wire details
    * @param coin_pub public key of deposited coin
    * @param merchant_pub merchant public key
-   * @param transaction_id transaction identifier
    * @param cb function to call with the result
    * @param cb_cls closure to pass to @a cb
    * @return #GNUNET_OK on success, #GNUNET_SYSERR on DB errors,
@@ -1517,11 +1496,10 @@ struct TALER_EXCHANGEDB_Plugin
   int
   (*wire_lookup_deposit_wtid)(void *cls,
                               struct TALER_EXCHANGEDB_Session *session,
-                             const struct GNUNET_HashCode *h_contract,
+                             const struct GNUNET_HashCode *h_proposal_data,
                              const struct GNUNET_HashCode *h_wire,
                              const struct TALER_CoinSpendPublicKeyP *coin_pub,
                              const struct TALER_MerchantPublicKeyP 
*merchant_pub,
-                             uint64_t transaction_id,
                              TALER_EXCHANGEDB_TrackTransactionCallback cb,
                              void *cb_cls);
 
@@ -1545,6 +1523,54 @@ struct TALER_EXCHANGEDB_Plugin
 
 
   /**
+   * Insert wire transfer fee into database.
+   *
+   * @param cls closure
+   * @param session database connection
+   * @param wire_method which wire method is the fee about?
+   * @param start_date when does the fee go into effect
+   * @param end_date when does the fee end being valid
+   * @param wire_fee how high is the wire transfer fee
+   * @param master_sig signature over the above by the exchange master key
+   * @return #GNUNET_OK on success, #GNUNET_NO if the record exists,
+   *         #GNUNET_SYSERR on failure
+   */
+  int
+  (*insert_wire_fee)(void *cls,
+                     struct TALER_EXCHANGEDB_Session *session,
+                     const char *wire_method,
+                     struct GNUNET_TIME_Absolute start_date,
+                     struct GNUNET_TIME_Absolute end_date,
+                     const struct TALER_Amount *wire_fee,
+                     const struct TALER_MasterSignatureP *master_sig);
+
+
+  /**
+   * Obtain wire fee from database.
+   *
+   * @param cls closure
+   * @param session database connection
+   * @param type type of wire transfer the fee applies for
+   * @param date for which date do we want the fee?
+   * @param[out] start_date when does the fee go into effect
+   * @param[out] end_date when does the fee end being valid
+   * @param[out] wire_fee how high is the wire transfer fee
+   * @param[out] master_sig signature over the above by the exchange master key
+   * @return #GNUNET_OK on success, #GNUNET_NO if no fee is known
+   *         #GNUNET_SYSERR on failure
+   */
+  int
+  (*get_wire_fee) (void *cls,
+                   struct TALER_EXCHANGEDB_Session *session,
+                   const char *type,
+                   struct GNUNET_TIME_Absolute date,
+                   struct GNUNET_TIME_Absolute *start_date,
+                   struct GNUNET_TIME_Absolute *end_date,
+                   struct TALER_Amount *wire_fee,
+                   struct TALER_MasterSignatureP *master_sig);
+
+
+  /**
    * Function called to insert wire transfer commit data into the DB.
    *
    * @param cls closure
diff --git a/src/include/taler_fakebank_lib.h b/src/include/taler_fakebank_lib.h
index d2267cf..f584cb8 100644
--- a/src/include/taler_fakebank_lib.h
+++ b/src/include/taler_fakebank_lib.h
@@ -71,15 +71,18 @@ TALER_FAKEBANK_check_empty (struct TALER_FAKEBANK_Handle 
*h);
  * @param want_amount transfer amount desired
  * @param want_debit account that should have been debited
  * @param want_debit account that should have been credited
+ * @param exchange_base_url expected base URL of the exchange,
+ *        i.e. "https://example.com/";; may include a port
  * @param[out] wtid set to the wire transfer identifier
  * @return #GNUNET_OK on success
  */
 int
 TALER_FAKEBANK_check (struct TALER_FAKEBANK_Handle *h,
-                const struct TALER_Amount *want_amount,
-                uint64_t want_debit,
-                uint64_t want_credit,
-                struct TALER_WireTransferIdentifierRawP *wtid);
+                      const struct TALER_Amount *want_amount,
+                      uint64_t want_debit,
+                      uint64_t want_credit,
+                      const char *exchange_base_url,
+                      struct TALER_WireTransferIdentifierRawP *wtid);
 
 
 /**
diff --git a/src/include/taler_signatures.h b/src/include/taler_signatures.h
index dae730d..ac20f34 100644
--- a/src/include/taler_signatures.h
+++ b/src/include/taler_signatures.h
@@ -1,6 +1,6 @@
 /*
   This file is part of TALER
-  Copyright (C) 2014, 2015, 2016 GNUnet e.V.
+  Copyright (C) 2014-2017 GNUnet e.V.
 
   TALER is free software; you can redistribute it and/or modify it under the
   terms of the GNU General Public License as published by the Free Software
@@ -78,6 +78,11 @@
  */
 #define TALER_SIGNATURE_MASTER_TEST_DETAILS 1027
 
+/**
+ * Fees charged per (aggregate) wire transfer to the merchant.
+ */
+#define TALER_SIGNATURE_MASTER_WIRE_FEES 1028
+
 
 /*********************************************/
 /* Exchange online signatures (with signing key) */
@@ -266,7 +271,7 @@ struct TALER_DepositRequestPS
   /**
    * Hash over the contract for which this deposit is made.
    */
-  struct GNUNET_HashCode h_contract GNUNET_PACKED;
+  struct GNUNET_HashCode h_proposal_data GNUNET_PACKED;
 
   /**
    * Hash over the wiring information of the merchant.
@@ -296,18 +301,6 @@ struct TALER_DepositRequestPS
   struct GNUNET_TIME_AbsoluteNBO refund_deadline;
 
   /**
-   * Merchant-generated transaction ID to detect duplicate
-   * transactions.  The merchant must communicate a merchant-unique ID
-   * to the customer for each transaction.  Note that different coins
-   * that are part of the same transaction can use the same
-   * transaction ID.  The transaction ID is useful for later disputes,
-   * and the merchant's contract offer (@e h_contract) with the
-   * customer should include the offer's term and transaction ID
-   * signed with a key from the merchant.
-   */
-  uint64_t transaction_id GNUNET_PACKED;
-
-  /**
    * Amount to be deposited, including deposit fee charged by the
    * exchange.  This is the total amount that the coin's value at the exchange
    * will be reduced by.
@@ -356,7 +349,7 @@ struct TALER_DepositConfirmationPS
   /**
    * Hash over the contract for which this deposit is made.
    */
-  struct GNUNET_HashCode h_contract GNUNET_PACKED;
+  struct GNUNET_HashCode h_proposal_data GNUNET_PACKED;
 
   /**
    * Hash over the wiring information of the merchant.
@@ -364,12 +357,6 @@ struct TALER_DepositConfirmationPS
   struct GNUNET_HashCode h_wire GNUNET_PACKED;
 
   /**
-   * Merchant-generated transaction ID to detect duplicate
-   * transactions.
-   */
-  uint64_t transaction_id GNUNET_PACKED;
-
-  /**
    * Time when this confirmation was generated.
    */
   struct GNUNET_TIME_AbsoluteNBO timestamp;
@@ -417,14 +404,10 @@ struct TALER_RefundRequestPS
   struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
 
   /**
-   * Hash over the contract which is being refunded.
+   * Hash over the proposal data to identify the contract
+   * which is being refunded.
    */
-  struct GNUNET_HashCode h_contract GNUNET_PACKED;
-
-  /**
-   * Merchant-generated transaction ID of the orginal transaction.
-   */
-  uint64_t transaction_id GNUNET_PACKED;
+  struct GNUNET_HashCode h_proposal_data GNUNET_PACKED;
 
   /**
    * The coin's public key.  This is the value that must have been
@@ -475,14 +458,10 @@ struct TALER_RefundConfirmationPS
   struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
 
   /**
-   * Hash over the contract which is being refunded.
-   */
-  struct GNUNET_HashCode h_contract GNUNET_PACKED;
-
-  /**
-   * Merchant-generated transaction ID of the orginal transaction.
+   * Hash over the proposal data to identify the contract
+   * which is being refunded.
    */
-  uint64_t transaction_id GNUNET_PACKED;
+  struct GNUNET_HashCode h_proposal_data GNUNET_PACKED;
 
   /**
    * The coin's public key.  This is the value that must have been
@@ -905,6 +884,44 @@ struct TALER_MasterWireDetailsPS
 };
 
 
+
+/**
+ * @brief Information signed by the exchange's master
+ * key stating the wire fee to be paid per wire transfer.
+ */
+struct TALER_MasterWireFeePS
+{
+
+  /**
+   * Purpose is #TALER_SIGNATURE_MASTER_WIRE_FEES.
+   */
+  struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
+
+  /**
+   * Hash over the wire method (yes, H("test") or H("sepa")), in lower
+   * case, including 0-terminator.  Used to uniquely identify which
+   * wire method these fees apply to.
+   */
+  struct GNUNET_HashCode h_wire_method;
+
+  /**
+   * Start date when the fee goes into effect.
+   */
+  struct GNUNET_TIME_AbsoluteNBO start_date;
+
+  /**
+   * End date when the fee stops being in effect (exclusive)
+   */
+  struct GNUNET_TIME_AbsoluteNBO end_date;
+
+  /**
+   * Fee charged to the merchant per wire transfer.
+   */
+  struct TALER_AmountNBO wire_fee;
+
+};
+
+
 /**
  * @brief Format used to generate the signature on a request to obtain
  * the wire transfer identifier associated with a deposit.
@@ -917,9 +934,9 @@ struct TALER_DepositTrackPS
   struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
 
   /**
-   * Hash over the contract for which this deposit is made.
+   * Hash over the proposal data of the contract for which this deposit is 
made.
    */
-  struct GNUNET_HashCode h_contract GNUNET_PACKED;
+  struct GNUNET_HashCode h_proposal_data GNUNET_PACKED;
 
   /**
    * Hash over the wiring information of the merchant.
@@ -927,18 +944,6 @@ struct TALER_DepositTrackPS
   struct GNUNET_HashCode h_wire GNUNET_PACKED;
 
   /**
-   * Merchant-generated transaction ID to detect duplicate
-   * transactions.  The merchant must communicate a merchant-unique ID
-   * to the customer for each transaction.  Note that different coins
-   * that are part of the same transaction can use the same
-   * transaction ID.  The transaction ID is useful for later disputes,
-   * and the merchant's contract offer (@e h_contract) with the
-   * customer should include the offer's term and transaction ID
-   * signed with a key from the merchant.
-   */
-  uint64_t transaction_id GNUNET_PACKED;
-
-  /**
    * The Merchant's public key.  The deposit inquiry request is to be
    * signed by the corresponding private key (using EdDSA).
    */
@@ -963,7 +968,7 @@ struct TALER_WireDepositDetailP
   /**
    * Hash of the contract
    */
-  struct GNUNET_HashCode h_contract;
+  struct GNUNET_HashCode h_proposal_data;
 
   /**
    * Time when the wire transfer was performed by the exchange.
@@ -971,11 +976,6 @@ struct TALER_WireDepositDetailP
   struct GNUNET_TIME_AbsoluteNBO execution_time;
 
   /**
-   * Merchant's transaction ID in NBO.
-   */
-  uint64_t transaction_id GNUNET_PACKED;
-
-  /**
    * Coin's public key.
    */
   struct TALER_CoinSpendPublicKeyP coin_pub;
@@ -1011,6 +1011,11 @@ struct TALER_WireDepositDataPS
   struct TALER_AmountNBO total;
 
   /**
+   * Wire fee that was charged.
+   */
+  struct TALER_AmountNBO wire_fee;
+
+  /**
    * Public key of the merchant (for all aggregated transactions).
    */
   struct TALER_MerchantPublicKeyP merchant_pub;
@@ -1031,51 +1036,19 @@ struct TALER_WireDepositDataPS
 /**
  * The contract sent by the merchant to the wallet.
  */
-struct TALER_ContractPS
+struct TALER_ProposalDataPS
 {
   /**
-   * Purpose header for the signature over the contract with
-   * purpose #TALER_SIGNATURE_MERCHANT_CONTRACT.
+   * Purpose header for the signature over the proposal data
+   * with purpose #TALER_SIGNATURE_MERCHANT_CONTRACT.
    */
   struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
 
   /**
-   * Merchant-generated transaction ID to detect duplicate
-   * transactions, in big endian.  The merchant must communicate a
-   * merchant-unique ID to the customer for each transaction.  Note
-   * that different coins that are part of the same transaction can
-   * use the same transaction ID.  The transaction ID is useful for
-   * later disputes, and the merchant's contract offer (@e h_contract)
-   * with the customer should include the offer's term and transaction
-   * ID signed with a key from the merchant.  This field must match
-   * the corresponding field in the JSON contract.
-   */
-  uint64_t transaction_id GNUNET_PACKED;
-
-  /**
-   * The total amount to be paid to the merchant. Note that if deposit
-   * fees are higher than @e max_fee, the actual total must be higher
-   * to cover the additional fees.  This field must match the
-   * corresponding field in the JSON contract.
-   */
-  struct TALER_AmountNBO total_amount;
-
-  /**
-   * The maximum fee the merchant is willing to cover.  This field
-   * must match the corresponding field in the JSON contract.
-   */
-  struct TALER_AmountNBO max_fee;
-
-  /**
    * Hash of the JSON contract in UTF-8 including 0-termination,
    * using JSON_COMPACT | JSON_SORT_KEYS
    */
-  struct GNUNET_HashCode h_contract;
-
-  /**
-   * Key of the merchant who is signing this contract
-   */
-  struct TALER_MerchantPublicKeyP merchant_pub;
+  struct GNUNET_HashCode hash;
 };
 
 /**
@@ -1093,9 +1066,9 @@ struct PaymentResponsePS
   struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
 
   /**
-   * Hash of the contract associated with this confirmation
+   * Hash of the proposal data associated with this confirmation
    */
-  struct GNUNET_HashCode h_contract;
+  struct GNUNET_HashCode h_proposal_data;
 };
 
 
@@ -1119,7 +1092,7 @@ struct TALER_ConfirmWirePS
   /**
    * Hash over the contract for which this deposit is made.
    */
-  struct GNUNET_HashCode h_contract GNUNET_PACKED;
+  struct GNUNET_HashCode h_proposal_data GNUNET_PACKED;
 
   /**
    * Raw value (binary encoding) of the wire transfer subject.
@@ -1133,18 +1106,6 @@ struct TALER_ConfirmWirePS
   struct TALER_CoinSpendPublicKeyP coin_pub;
 
   /**
-   * Merchant-generated transaction ID to detect duplicate
-   * transactions, in big endian.  The merchant must communicate a
-   * merchant-unique ID to the customer for each transaction.  Note
-   * that different coins that are part of the same transaction can
-   * use the same transaction ID.  The transaction ID is useful for
-   * later disputes, and the merchant's contract offer (@e h_contract)
-   * with the customer should include the offer's term and transaction
-   * ID signed with a key from the merchant.
-   */
-  uint64_t transaction_id GNUNET_PACKED;
-
-  /**
    * When did the exchange execute this transfer? Note that the
    * timestamp may not be exactly the same on the wire, i.e.
    * because the wire has a different timezone or resolution.
diff --git a/src/include/taler_wire_lib.h b/src/include/taler_wire_lib.h
index b67f620..68c36e8 100644
--- a/src/include/taler_wire_lib.h
+++ b/src/include/taler_wire_lib.h
@@ -45,4 +45,28 @@ void
 TALER_WIRE_plugin_unload (struct TALER_WIRE_Plugin *plugin);
 
 
+/**
+ * Signature of a function to be called on each enabled
+ * wire plugin.
+ *
+ * @param cls closure
+ * @param name name of the enabled plugin
+ */
+typedef void
+(*TALER_WIRE_EnabledCallback)(void *cls,
+                              const char *name);
+
+
+/**
+ * Check which wire plugins are enabled in @a cfg and call @a cb for each one.
+ *
+ * @param cfg configuration to use
+ * @param cb callback to invoke
+ * @param cb_cls closure for @a cb
+ */
+void
+TALER_WIRE_find_enabled (const struct GNUNET_CONFIGURATION_Handle *cfg,
+                         TALER_WIRE_EnabledCallback cb,
+                         void *cb_cls);
+
 #endif
diff --git a/src/include/taler_wire_plugin.h b/src/include/taler_wire_plugin.h
index 6c06e82..7a34603 100644
--- a/src/include/taler_wire_plugin.h
+++ b/src/include/taler_wire_plugin.h
@@ -155,6 +155,7 @@ struct TALER_WIRE_Plugin
    * @param cls the @e cls of this struct with the plugin-specific state
    * @param wire valid wire account information
    * @param amount amount to transfer, already rounded
+   * @param exchange_base_url base URL of this exchange
    * @param wtid wire transfer identifier to use
    * @param ptc function to call with the prepared data to persist
    * @param ptc_cls closure for @a ptc
@@ -164,6 +165,7 @@ struct TALER_WIRE_Plugin
   (*prepare_wire_transfer) (void *cls,
                             const json_t *wire,
                             const struct TALER_Amount *amount,
+                            const char *exchange_base_url,
                             const struct TALER_WireTransferIdentifierRawP 
*wtid,
                             TALER_WIRE_PrepareTransactionCallback ptc,
                             void *ptc_cls);
diff --git a/src/util/amount.c b/src/util/amount.c
index 407232a..7684ddf 100644
--- a/src/util/amount.c
+++ b/src/util/amount.c
@@ -565,4 +565,32 @@ TALER_amount_to_string (const struct TALER_Amount *amount)
 }
 
 
+/**
+ * Divide an amount by a float.  Note that this function
+ * may introduce a rounding error!
+ *
+ * @param result where to store @a dividend / @a divisor
+ * @param dividend amount to divide
+ * @param divisor by what to divide, must be positive
+ */
+void
+TALER_amount_divide (struct TALER_Amount *result,
+                     const struct TALER_Amount *dividend,
+                     uint32_t divisor)
+{
+  uint64_t modr;
+
+  GNUNET_assert (0 != divisor);
+  *result = *dividend;
+  if (1 == divisor)
+    return;
+  modr = result->value % divisor;
+  result->value /= divisor;
+  /* modr is a 32-bit value, so we can safely multiply by (<32-bit) base and 
add fraction! */
+  modr = (modr * TALER_AMOUNT_FRAC_BASE) + result->fraction;
+  GNUNET_assert (modr < TALER_AMOUNT_FRAC_BASE * divisor);
+  result->fraction = (uint32_t) (modr / divisor);
+}
+
+
 /* end of amount.c */
diff --git a/src/util/test_amount.c b/src/util/test_amount.c
index e176d21..3854297 100644
--- a/src/util/test_amount.c
+++ b/src/util/test_amount.c
@@ -197,6 +197,43 @@ main(int argc,
                 TALER_amount_subtract (&a3, &a1, &a2));
   GNUNET_assert (UINT64_MAX - 1 == a3.value);
   GNUNET_assert (TALER_AMOUNT_FRAC_BASE - 1 == a3.fraction);
+
+  /* test division */
+  GNUNET_assert (GNUNET_OK ==
+                TALER_string_to_amount ("EUR:3.33",
+                                        &a1));
+  TALER_amount_divide (&a2,
+                       &a1,
+                       1);
+  GNUNET_assert (0 == strcasecmp ("EUR",
+                                 a2.currency));
+  GNUNET_assert (3 == a2.value);
+  GNUNET_assert (TALER_AMOUNT_FRAC_BASE / 100 * 33 == a2.fraction);
+
+  TALER_amount_divide (&a2,
+                       &a1,
+                       3);
+  GNUNET_assert (0 == strcasecmp ("EUR",
+                                 a2.currency));
+  GNUNET_assert (1 == a2.value);
+  GNUNET_assert (TALER_AMOUNT_FRAC_BASE / 100 * 11 == a2.fraction);
+
+  TALER_amount_divide (&a2,
+                       &a1,
+                       2);
+  GNUNET_assert (0 == strcasecmp ("EUR",
+                                 a2.currency));
+  GNUNET_assert (1 == a2.value);
+  GNUNET_assert (TALER_AMOUNT_FRAC_BASE / 1000 * 665 == a2.fraction);
+  TALER_amount_divide (&a2,
+                       &a1,
+                       TALER_AMOUNT_FRAC_BASE * 2);
+  GNUNET_assert (0 == strcasecmp ("EUR",
+                                 a2.currency));
+  GNUNET_assert (0 == a2.value);
+  GNUNET_assert (1 == a2.fraction);
+
+
   return 0;
 }
 
diff --git a/src/wire/plugin_wire_sepa.c b/src/wire/plugin_wire_sepa.c
index cc00bca..e15eabb 100644
--- a/src/wire/plugin_wire_sepa.c
+++ b/src/wire/plugin_wire_sepa.c
@@ -1,6 +1,6 @@
 /*
   This file is part of TALER
-  Copyright (C) 2016 GNUnet e.V. & Inria
+  Copyright (C) 2016, 2017 GNUnet e.V. & Inria
 
   TALER is free software; you can redistribute it and/or modify it under the
   terms of the GNU General Public License as published by the Free Software
@@ -72,7 +72,7 @@ sepa_amount_round (void *cls,
   if (0 == delta)
     return GNUNET_NO;
   amount->fraction -= delta;
-  return GNUNET_SYSERR;
+  return GNUNET_OK;
 }
 
 
@@ -658,6 +658,7 @@ sepa_sign_wire_details (void *cls,
  * @param cls the @e cls of this struct with the plugin-specific state
  * @param wire valid wire account information
  * @param amount amount to transfer, already rounded
+ * @param exchange_base_url base URL of the exchange (for tracking)
  * @param wtid wire transfer identifier to use
  * @param psc function to call with the prepared data to persist
  * @param psc_cls closure for @a psc
@@ -667,6 +668,7 @@ static struct TALER_WIRE_PrepareHandle *
 sepa_prepare_wire_transfer (void *cls,
                             const json_t *wire,
                             const struct TALER_Amount *amount,
+                            const char *exchange_base_url,
                             const struct TALER_WireTransferIdentifierRawP 
*wtid,
                             TALER_WIRE_PrepareTransactionCallback psc,
                             void *psc_cls)
diff --git a/src/wire/plugin_wire_template.c b/src/wire/plugin_wire_template.c
index 416eb9c..aa4e1a3 100644
--- a/src/wire/plugin_wire_template.c
+++ b/src/wire/plugin_wire_template.c
@@ -120,6 +120,7 @@ template_wire_validate (void *cls,
  * @param cls the @e cls of this struct with the plugin-specific state
  * @param wire valid wire account information
  * @param amount amount to transfer, already rounded
+ * @param exchange_base_url base URL of the exchange (for tracking)
  * @param wtid wire transfer identifier to use
  * @param ptc function to call with the prepared data to persist
  * @param ptc_cls closure for @a ptc
@@ -129,6 +130,7 @@ static struct TALER_WIRE_PrepareHandle *
 template_prepare_wire_transfer (void *cls,
                                 const json_t *wire,
                                 const struct TALER_Amount *amount,
+                                const char *exchange_base_url,
                                 const struct TALER_WireTransferIdentifierRawP 
*wtid,
                                 TALER_WIRE_PrepareTransactionCallback ptc,
                                 void *ptc_cls)
diff --git a/src/wire/plugin_wire_test.c b/src/wire/plugin_wire_test.c
index 7b52dee..84bff98 100644
--- a/src/wire/plugin_wire_test.c
+++ b/src/wire/plugin_wire_test.c
@@ -86,6 +86,11 @@ struct TALER_WIRE_PrepareHandle
   json_t *wire;
 
   /**
+   * Base URL to use for the exchange.
+   */
+  char *exchange_base_url;
+
+  /**
    * Function to call with the serialized data.
    */
   TALER_WIRE_PrepareTransactionCallback ptc;
@@ -397,7 +402,9 @@ struct BufFormatP
    */
   struct TALER_AmountNBO amount;
 
-  /* followed by serialized 'wire' JSON data */
+  /* followed by serialized 'wire' JSON data (0-terminated) */
+
+  /* followed by 0-terminated base URL */
 
 };
 GNUNET_NETWORK_STRUCT_END
@@ -417,6 +424,7 @@ test_prepare_wire_transfer_cancel (void *cls,
   if (NULL != pth->task)
     GNUNET_SCHEDULER_cancel (pth->task);
   json_decref (pth->wire);
+  GNUNET_free (pth->exchange_base_url);
   GNUNET_free (pth);
 }
 
@@ -432,7 +440,8 @@ do_prepare (void *cls)
 {
   struct TALER_WIRE_PrepareHandle *pth = cls;
   char *wire_enc;
-  size_t len;
+  size_t len_w;
+  size_t len_b;
   struct BufFormatP bf;
 
   pth->task = NULL;
@@ -449,19 +458,23 @@ do_prepare (void *cls)
                                        pth);
     return;
   }
-  len = strlen (wire_enc) + 1;
+  len_w = strlen (wire_enc) + 1;
+  len_b = strlen (pth->exchange_base_url) + 1;
   bf.wtid = pth->wtid;
   TALER_amount_hton (&bf.amount,
                      &pth->amount);
   {
-    char buf[sizeof (struct BufFormatP) + len];
+    char buf[sizeof (struct BufFormatP) + len_w + len_b];
 
     memcpy (buf,
             &bf,
             sizeof (struct BufFormatP));
     memcpy (&buf[sizeof (struct BufFormatP)],
             wire_enc,
-            len);
+            len_w);
+    memcpy (&buf[sizeof (struct BufFormatP) + len_w],
+            pth->exchange_base_url,
+            len_b);
 
     /* finally give the state back */
     pth->ptc (pth->ptc_cls,
@@ -485,6 +498,7 @@ do_prepare (void *cls)
  * @param cls the @e cls of this struct with the plugin-specific state
  * @param wire valid wire account information
  * @param amount amount to transfer, already rounded
+ * @param exchange_base_url base URL of this exchange
  * @param wtid wire transfer identifier to use
  * @param ptc function to call with the prepared data to persist
  * @param ptc_cls closure for @a ptc
@@ -494,6 +508,7 @@ static struct TALER_WIRE_PrepareHandle *
 test_prepare_wire_transfer (void *cls,
                             const json_t *wire,
                             const struct TALER_Amount *amount,
+                            const char *exchange_base_url,
                             const struct TALER_WireTransferIdentifierRawP 
*wtid,
                             TALER_WIRE_PrepareTransactionCallback ptc,
                             void *ptc_cls)
@@ -515,6 +530,7 @@ test_prepare_wire_transfer (void *cls,
   pth = GNUNET_new (struct TALER_WIRE_PrepareHandle);
   pth->tc = tc;
   pth->wire = json_incref ((json_t *) wire);
+  pth->exchange_base_url = GNUNET_strdup (exchange_base_url);
   pth->wtid = *wtid;
   pth->ptc = ptc;
   pth->ptc_cls = ptc_cls;
@@ -650,6 +666,8 @@ test_execute_wire_transfer (void *cls,
   json_int_t account_no;
   struct BufFormatP bf;
   char *emsg;
+  const char *json_s;
+  const char *exchange_base_url;
 
   if (NULL == tc->ctx)
   {
@@ -658,7 +676,14 @@ test_execute_wire_transfer (void *cls,
     return NULL; /* not initialized with configuration, cannot do transfers */
   }
   if ( (buf_size <= sizeof (struct BufFormatP)) ||
-       ('\0' != buf[buf_size -1]) )
+       ('\0' != buf[buf_size - 1]) )
+  {
+    GNUNET_break (0);
+    return NULL;
+  }
+  json_s = &buf[sizeof (struct BufFormatP)];
+  exchange_base_url = &json_s[strlen (json_s) + 1];
+  if (exchange_base_url > &buf[buf_size - 1])
   {
     GNUNET_break (0);
     return NULL;
@@ -668,7 +693,7 @@ test_execute_wire_transfer (void *cls,
           sizeof (bf));
   TALER_amount_ntoh (&amount,
                      &bf.amount);
-  wire = json_loads (&buf[sizeof (struct BufFormatP)],
+  wire = json_loads (json_s,
                      JSON_REJECT_DUPLICATES,
                      NULL);
   if (NULL == wire)
@@ -697,6 +722,7 @@ test_execute_wire_transfer (void *cls,
   eh->cc_cls = cc_cls;
   eh->aaih = TALER_BANK_admin_add_incoming (tc->ctx,
                                             tc->bank_uri,
+                                            exchange_base_url,
                                             &bf.wtid,
                                             &amount,
                                             (uint64_t) 
tc->exchange_account_outgoing_no,
diff --git a/src/wire/test_wire_plugin.c b/src/wire/test_wire_plugin.c
index 0828a06..0e24120 100644
--- a/src/wire/test_wire_plugin.c
+++ b/src/wire/test_wire_plugin.c
@@ -1,6 +1,6 @@
 /*
   This file is part of TALER
-  (C) 2015, 2016 GNUnet e.V. and Inria
+  (C) 2015, 2016, 2017 GNUnet e.V. and Inria
 
   TALER is free software; you can redistribute it and/or modify it under the
   terms of the GNU General Public License as published by the Free Software
@@ -52,6 +52,10 @@ struct TestBlock {
    */
   const char *round_out;
 
+  /**
+   * Currency to give to the plugin.
+   */ 
+  const char *currency;
 };
 
 
@@ -65,15 +69,17 @@ static struct TestBlock tests[] = {
     .json_proto = "{  \"type\":\"sepa\", \"iban\":\"DE67830654080004822650\", 
\"name\":\"GNUnet e.V.\", \"bic\":\"GENODEF1SLR\" }",
     .round_in = "EUR:0.123456",
     .round_out = "EUR:0.12",
+    .currency = "EUR"
   },
   {
     .plugin_name = "test",
     .json_proto = "{  \"type\":\"test\", \"bank_uri\":\"http://localhost/\";, 
\"account_number\":42 }",
     .round_in = "KUDOS:0.123456",
     .round_out = "KUDOS:0.12",
+    .currency = "KUDOS"
   },
   {
-    NULL, NULL, NULL, NULL
+    NULL, NULL, NULL, NULL, NULL
   }
 };
 
@@ -192,6 +198,7 @@ run_test (const struct TestBlock *test,
     return GNUNET_SYSERR;
   }
   memset (&in, 0, sizeof (in));
+  GNUNET_log_skip (GNUNET_ERROR_TYPE_ERROR, 1);
   if (GNUNET_SYSERR !=
       plugin->amount_round (plugin->cls,
                             &in))
@@ -229,6 +236,10 @@ main (int argc,
   ret = GNUNET_OK;
   for (i=0;NULL != (test = &tests[i])->plugin_name;i++)
   {
+    GNUNET_CONFIGURATION_set_value_string (cfg,
+                                          "taler",
+                                          "CURRENCY",
+                                          test->currency);
     plugin = TALER_WIRE_plugin_load (cfg,
                                      test->plugin_name);
     GNUNET_assert (NULL != plugin);
@@ -239,20 +250,20 @@ main (int argc,
     TALER_WIRE_plugin_unload (plugin);
     if (GNUNET_OK != ret)
     {
-      fprintf (stdout,
-               "%s FAILED\n",
-               test->plugin_name);
+      GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                 "%s FAILED\n",
+                 test->plugin_name);
       break;
     }
     else
     {
-      fprintf (stdout,
-               "%s PASS\n",
-               test->plugin_name);
+      GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
+                 "%s PASS\n",
+                 test->plugin_name);
     }
   }
   GNUNET_CONFIGURATION_destroy (cfg);
-  if (GNUNET_NO == ret)
+  if (GNUNET_OK != ret)
     return 1;
   return 0;
 }
diff --git a/src/wire/wire-sepa.conf b/src/wire/wire-sepa.conf
index b7c0915..88d2ac0 100644
--- a/src/wire/wire-sepa.conf
+++ b/src/wire/wire-sepa.conf
@@ -1,5 +1,11 @@
+# This file is in the public domain.
+#
 # Configuration for SEPA wire plugin.
 
+[exchange-wire-sepa]
+# Set to "YES" to activate the 'sepa' plugin.
+ENABLE = NO
+
 [exchange-wire-incoming-sepa]
 # This is the response we give out for the /wire request.  It provides
 # wallets with the bank information for transfers to the exchange.
diff --git a/src/wire/wire-test.conf b/src/wire/wire-test.conf
index fc03f1b..fcc1564 100644
--- a/src/wire/wire-test.conf
+++ b/src/wire/wire-test.conf
@@ -1,5 +1,11 @@
 # This file is in the public domain.
 #
+# Configuration for TEST wire plugin.
+#
+[exchange-wire-test]
+# Set to "YES" to activate the 'test' plugin.
+ENABLE = NO
+
 [exchange-wire-incoming-test]
 # This is the response we give out for the /wire request.  It provides
 # wallets with the bank information for transfers to the exchange.
diff --git a/src/wire/wire.c b/src/wire/wire.c
index 4d53b0d..c799334 100644
--- a/src/wire/wire.c
+++ b/src/wire/wire.c
@@ -1,6 +1,6 @@
 /*
   This file is part of TALER
-  (C) 2015, 2016 GNUnet e.V.
+  (C) 2015, 2016, 2017 GNUnet e.V.
 
   TALER is free software; you can redistribute it and/or modify it under the
   terms of the GNU General Public License as published by the Free Software
@@ -69,4 +69,80 @@ TALER_WIRE_plugin_unload (struct TALER_WIRE_Plugin *plugin)
 }
 
 
+/**
+ * Closure of #check_for_wire.
+ */
+struct FindEnabledWireContext
+{
+  /**
+   * Configuration we are usign.
+   */
+  const struct GNUNET_CONFIGURATION_Handle *cfg;
+
+  /**
+   * Callback to invoke.
+   */
+  TALER_WIRE_EnabledCallback cb;
+
+  /**
+   * Closure for @e cb.
+   */
+  void *cb_cls;
+};
+
+
+/**
+ * Check if @a section begins with "exchange-wire-", and if
+ * so if the "ENABLE" option is set to "YES".  If both are
+ * true, call the callback from the context with the
+ * rest of the section name.
+ *
+ * @param cls our `struct FindEnabledWireContext`
+ * @param section name of a section in the configuration
+ */
+static void
+check_for_wire (void *cls,
+                const char *section)
+{
+  struct FindEnabledWireContext *ctx = cls;
+  const char *name;
+
+  if (0 != strncasecmp (section,
+                        "exchange-wire-",
+                        strlen ("exchange-wire-")))
+    return;
+  if (GNUNET_YES !=
+      GNUNET_CONFIGURATION_get_value_yesno (ctx->cfg,
+                                            section,
+                                            "ENABLE"))
+    return;
+  name = &section[strlen ("exchange-wire-")];
+  ctx->cb (ctx->cb_cls,
+           name);
+}
+
+
+/**
+ * Check which wire plugins are enabled in @a cfg and call @a cb for each one.
+ *
+ * @param cfg configuration to use
+ * @param cb callback to invoke
+ * @param cb_cls closure for @a cb
+ */
+void
+TALER_WIRE_find_enabled (const struct GNUNET_CONFIGURATION_Handle *cfg,
+                         TALER_WIRE_EnabledCallback cb,
+                         void *cb_cls)
+{
+  struct FindEnabledWireContext ctx;
+
+  ctx.cfg = cfg;
+  ctx.cb = cb;
+  ctx.cb_cls = cb_cls;
+  GNUNET_CONFIGURATION_iterate_sections (cfg,
+                                         &check_for_wire,
+                                         &ctx);
+}
+
+
 /* end of wire.c */

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]