nient for both the provider and the client since it im-
plies exchanging less keys and calling less functions.
3.2 Block Validation Time and
Transaction Delay
The process of creating a new reference of products,
exchanging keys and uploading data, can take several
minutes or even hours on Ethereum. Therefore the
contract cannot be functional for products that have a
really fast depreciation rate, unless the client buys (or
subscribes to) the reference beforehand and gets the
keys. Afterwards the provider progressively uploads
the data as soon as it is available. In this setting the
client will be able to access critical information in real
time without any delay. At the end of the offer time,
if the provider did not upload at least the minimum
number N of information agreed upon, the client can
raise a dispute and claim his funds.
Furthermore, getting the absolute time in a smart
contract depends on the block it was mined in. This
could raise security problems and multiple exploita-
tion opportunities. For example a malicious node
could mine a block and alter the time it was mined,
making a dispute in favor of a client instead of a
provider. Fortunately block timestamps cannot be
tempered a lot. A block with an abnormal timestamp
is rejected by the network (Goldberg, 2018). On the
long run the timestamp could be offset by a few min-
utes which could be acceptable.
3.3 Smart Contract Versatility and
Organisation
For clarity and ease of use, the protocol mechanism
was distributed over three solidity files:
• “Depreciation Contract.sol” contains mainly all
the needed variables for the protocol inside the
structure “DataReference”.
• “Client Depreciation Contract.sol” inherits from
the previous contract, and implements all the
functions needed for the client.
• “Provider Depreciation Contract.sol” inherits
from “Client Depreciation Contract.sol” (con-
sequently from “Depreciation Contract.sol”)
and implements all the functions related to
the provider, such as creating a new reference,
withdrawing funds, setting keys, and viewing the
clients’ addresses.
To make use of the protocol, it is sufficient to only
deploy the “Provider Depreciation Contract.sol”
once and define the contract’s interface and address
in a fourth contract that contains the data types for our
application. In our case we simulated an exchange of
space tracking data. The fourth contract “TLE.sol”
helps to store Two Line Elements data (TLEs)(Kelso,
2019) which is equivalent to a representation of a
space object’s location and velocity vector at a given
time. The satellite’s name (or line 0) is not encrypted
and the Two-Line Orbital Element Set Format (lines
1-2) are encrypted and stored in 49 bytes for minimal
gas usage. For developing and testing purposes,
“TLE.sol” inherits but does not implement the
interface of “Provider Depreciation Contract.sol”.
Nevertheless, defining the interface is straightforward
and will drastically cut gas usage for deployment
(refer to section 4). Hence it is possible to include
multiple structures and data types inside one refe-
rence. In our case this could be useful to share TLEs
along with telescope images using IPFS (Benet,
2014).
4 BENCHMARKS AND RESULTS
All possible scenarios proved to be correctly func-
tional and gas usage was recorded on Ethereum-
Client Besu. The initial deployment of the smart con-
tract costs 3 675 449 gas. Note that deployment oc-
curs only once, meaning one common contract can
handle selling all future products from any provider
for any future application.
The only functions a client needs are detailed in
Fig. 3 with their gas costs. Keep in mind that a client
only needs to call each function once. This brings the
client to a grand total of 181 600 gas (roughly 1.02
USD at the time of writing). But keep in mind that
most probably clients will not need to raise a dispute.
On the other hand the provider has to call some
functions several times (indicated in fig-4) depending
on what she intends to sell and to how many clients.
The general case is described in Fig. 4. Furthermore,
the gas usage for uploading data varies depending on
its length.
Ideally P can sell information in bulk to multi-
ple clients. All in all, an example of selling 10 TLEs
(∼ 96 bytes each) to 50 clients, would cost P roughly
6 300 000 gas (40.19 USD at the time of writing)
which averages out to 126 000 gas per client (0.8
USD at the time of writing). The results seem to com-
pare favorably to other solutions (Dziembowski et al.,
2018) which needs to deploy a new contract for each
pair provider/client.
Finally, keep in mind that these tests were done
for the TLE crowdsourcing usecase. Gas costs can be
greatly optimized, a simple idea would be to imple-
Enabling Monetization of Depreciating Data on Blockchains
505