Table 7: Pay agreement.
Agreement Field Description
ValidateCondition(option, Validation function for
condition) returns boolean; payment options’ conditions.
clientCredit Initial client’s credit.
serverCredit Initial server’s credit.
OrderAgr Order agreement, see Table 5.
specify odds, bet funds, race, the chosen horse, and
bookie’s signature required to approve the result. The
condition, supplied along with the option when it is
deposited, would be winner’s name and race, signed
by the bookie specified by the option.
Payment evidences and Validation. Payment
layer evidences include balance statements, along-
side with evidences of client or third-party’s deposits
of payment orders, issued to the pay client. We re-
mark that for simplicity of management the state-
ments could be incremental, and enclosed within
each payment transactions. Validation of payment
layer evidences is straightforward, provided undis-
puted (signed) server balance statement, for the previ-
ous payment transaction, and comparing amount and
validity of current transaction evidences which in-
cludes server supplied evidences of payment options
deposits, to the balance statement of the current (dis-
puted) transaction.
Multi-party payments. Payments which involve
multiple PSPs could be facilitated by additional,
multi-party, e-commerce layer. The layer would
maintain an open, decentralized payment network,
which is to provide interoperability among many
PSPs without requiring global trust in each PSP, by
means of payment routing tables (PRTs) and agree-
ments, that would allow automatic dispute resolution,
involving multiple PSPs along a payment path. For
further details see (Herzberg, 2003).
5 BREAKDOWN AND USE-CASES
We present few concise use-cases, which together
with the presented attestation and payment layer
APIs, would clarify how one should implement
payment-layer machines (client and server) and com-
mon validation functionality, for a payment protocol.
We plan to publish full implementation of our order
and pay layer protocol, including Validate predicates
in a separate paper.
1. Ordering goods or services. We begin with a
trivial flow of a set of successful orders, as shown in
Figure 1. Two trading principals, client and server,
use a signed pay agreement to establish a payment
channel. Over the payment channel they progress
with a set of request and response pairs, where each
such pair, is a successfully completed order. The or-
der request may be requests for goods or services,
such as, request for a payment option, and the re-
sponse contains either a refuse, or the requested
goods. The returning goods and services could be
validated to match the order and the payed amount,
by the client, or any party, e.g., an arbiter, using the
pay agreement between the server and the client.
2. Ordering and depositing an option. An option
acquisition and deposit, is between two trading par-
ties, namely, server and client. The process begins
with ordering an option, where the server removes
funds from client’s account to pending, and issues the
option. The option response arrives to the client, in a
form of EOO. When the client deposits such option,
as EOO, server validates that it’s an EOO issued by
itself, validates the option condition, and if the condi-
tion is upheld, and option didn’t expire, commits the
funds transfer from pending to self. Then, a receipt
and the goods specified by the option, are sent, in a
response message, to the client.
3. Notarized failure of ordering goods or ser-
vices. We show failed flow of orders, and describe
the recovery within the next order, in Figure 5. We
begin with the simpler case; in case A, shown in the
figure, an order response has failed, with notarization,
for server. When the next order arrives, the server in-
cludes with the response, the EOFS, for the previous
(failed) response, and includes an updated balance
statement. The client, which was aware of only one
successfully processed order, receives the response
and the enclosed EOFS, for the failed response, vali-
dates the EOFS, and concludes that both orders were
processed, and update its account and balances ac-
cordingly.
The next case, described as figure’s case B, as op-
posed to case A, a client’s request fails, possibly, be-
cause server unavailability, and thus client is issued
an EOFS. This EOFS
2
is enclosed with the next, third
order, order
3
request. The server, would process all
previous failed orders, enclosed with the request. For
instance, if the failed order was a deposit of an option,
it needs still to be deposited, and the deposit time to be
taken from the EOFS. As for failed orders, pay agree-
ment may specify special fees or fines for server’s un-
availability.
Also, notice the incremental nature of EOFSes,
where, for each failing request or response, the next,
request or response, respectively, will include all the
previous EOFS-es.
4. Communication failures. For benefit of hon-
est parties we supply means of recovery from non-
notarized communication failures. Consider the case
in Figure 4; a client (or similarly a server) issuing an
order request, receives in return a communication fail-
ure (instead of an EOD). The client could not possibly
know whether the channel had failed, before the re-
LAYERED ARCHITECTURE FOR SECURE E-COMMERCE APPLICATIONS
123