commit 7e21b985ebb1e4c68e459e3f4a49e1202c0a0f7b parent effa824a4de6f09a999a578f30ba3e341d380b31 Author: Emmanuel Benoist <emmanuel.benoist@bfh.ch> Date: Thu, 2 Jun 2022 01:56:49 +0200 first version (not finished, no conclusion and no bibliography) Diffstat:
16 files changed, 620 insertions(+), 0 deletions(-)
diff --git a/article-brains22/biblio.bib b/article-brains22/biblio.bib @@ -0,0 +1,65 @@ +@article{nakamoto2008bitcoin, + title = {Bitcoin whitepaper}, + author = {Nakamoto, Satoshi}, + journal = {URL: https://bitcoin. org/bitcoin. pdf-(: 17.07. 2019)}, + year = {2008} +} + +@inproceedings{gervais2016security, + title = {On the security and performance of proof of work blockchains}, + author = {Gervais, Arthur and Karame, Ghassan O and W{\"u}st, Karl and Glykantzis, Vasileios and Ritzdorf, Hubert and Capkun, Srdjan}, + booktitle = {Proceedings of the 2016 ACM SIGSAC conference on computer and communications security}, + pages = {3--16}, + year = {2016} +} + +@techreport{RFC8905, + author = {F. Dold and C. Grothoff}, + title = {The 'payto' URI Scheme for Payments}, + howpublished = {Internet Requests for Comments}, + type = {RFC}, + number = {8905}, + year = {2020}, + month = {October}, + issn = {2070-1721}, + publisher = {RFC Editor}, + institution = {RFC Editor} +} + +@techreport{BIP125, + author = {David A. Harding and Peter Todd}, + title = {Opt-in Full Replace-by-Fee Signaling}, + type = {BIP}, + number = {125}, + year = {2015}, + month = {December}, + institution = {Bitcoin Improvement Proposals} +} + +@techreport{BIP173, + author = {Pieter Wuille and Greg Maxwell}, + title = {Base32 address format for native v0-16 witness outputs}, + type = {BIP}, + number = {173}, + year = {2017}, + month = {Mars}, + institution = {Bitcoin Improvement Proposals} +} + + +@article{bartoletti2019journey, + title = {A journey into bitcoin metadata}, + author = {Bartoletti, Massimo and Bellomy, Bryn and Pompianu, Livio}, + journal = {Journal of Grid Computing}, + volume = {17}, + number = {1}, + pages = {3--22}, + year = {2019}, + publisher = {Springer} +} +@misc{visafactsheet, + title = {Visa fact sheet}, + author = {Visa}, + note = {\url{https://www.visa.co.uk/dam/VCOM/download/corporate/media/visanet-technology/aboutvisafactsheet.pdf}}, + note = {Accessed: 6-1-2022}, +} +\ No newline at end of file diff --git a/article-brains22/depolymerizer.tex b/article-brains22/depolymerizer.tex @@ -0,0 +1,247 @@ +\documentclass[conference]{IEEEtran} +\IEEEoverridecommandlockouts +% The preceding line is only needed to identify funding in the first footnote. If that is unneeded, please comment it out. +\usepackage{cite} +\usepackage{amsmath,amssymb,amsfonts} +\usepackage{algorithmic} +\usepackage{graphicx} +\usepackage{textcomp} +\usepackage{xcolor} + +%\usepackage[tmargin=1in,bmargin=1in,lmargin=1.25in,rmargin=1.25in]{geometry} +% \usepackage[utf8]{inputenc} +\usepackage{bytefield} +% \usepackage{graphics} +% \usepackage{parskip} +\usepackage{tikz} +% \usepackage{float} +% \usepackage{authblk} +% \usepackage{acro} + + \usetikzlibrary{positioning,fit} + + +\def\BibTeX{{\rm B\kern-.05em{\sc i\kern-.025em b}\kern-.08em + T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}} + +\title{Depolymerizer, tokenizing the blockchains} +\author{\IEEEauthorblockN{1\textsuperscript{st} Antoine d'Aligny} +\IEEEauthorblockA{student \\ +\textit{EFREI Paris}\\ +Villejuif, France \\ +antoinedaligny@outlook.fr\\} +\and +\IEEEauthorblockN{2\textsuperscript{nd} Emmanuel Benoist} +\IEEEauthorblockA{\textit{School of Engineering and Computer Science} \\ +\textit{Bern University of Applied Sciences}\\ +Biel, Switzerland\\} +\and +\IEEEauthorblockN{3\textsuperscript{rd} Christian Grothoff} +\IEEEauthorblockA{\textit{School of Engineering and Computer Science} \\ +\textit{Bern University of Applied Sciences}\\ +Biel, Switzerland} +} +\begin{document} +\maketitle + +\begin{abstract} +GNU Taler is an electronic payment system implemented as free software. The goal of this project is to enable payment with blockchain-based cryptocurrency in GNU Taler. + +By proving that blockchains can be used as a settlement layer for GNU Taler, we show that it is not only capable of handling bank money, but also widely used cryptocurrencies. + +For cryptocurrencies owners, this integration offers a new solution for instant and low-cost payments that can scale beyond blockchains limitations while preserving or enhancing privacy. + +To achieve this goal, we need to understand how blockchain-based cryptocurrencies work, what their limitations are, and how to mitigate them so that they can serve as a settlement layer. + +\end{abstract} +\section{Introduction} + +Electronic payments are currently very widespread. We also have with currencies like Bitcoin \cite{nakamoto2008bitcoin} and Ethereum \cite{} two very used currencies. However, it is not possible to use these two currencies in everyday life to buy bread, pay for a beer or a snack in a vending machine. A transaction in Bitcoin or Ethereum has to be entered in a block and then one has to wait for a certain number of blocks for this transaction to be considered valid. To have a serious validation, it is necessary to wait approximately one hour. The distributed character and the validation of blockchains do not allow fast transactions. + + + +Block size and number of blocks are two factors limiting the amount of transactions per second. The number of transactions per second is currently very small (less than 10 for Bitcoin or 30 for Ethereum). This makes it impossible to use these two systems as a means of payment in the daily life of users, since millions of users will need to send transactions daily. + +We developed a way to integrate the GNU Taler electronic payment system to make payments for Distributed Ledger Technology (DLT) based currencies. The GNU Taler system is based on cryptographic tokens distributed by an exchange that can be used for instant payment. The users pay the merchants using their tokens, the merchants can then send the received tokens back to a wallet on the blockchain. + +Our solution allows to use the GNU Taler system to make payments in Bitcoin and Ethereum. An exchange is created, to which the user transfers an amount in crypto-currency. In return, the user receives tokens corresponding to this amount and can dispose of them at will in any store that accepts these tokens. The transaction is then instantaneous. The merchant can then convert the obtained tokens into the original DLT. + + +We present the GNU Taler payment system in section \ref{sec:taler}. Then in section \ref{sec:architecture} we present the depolymerizer system which allows to transform Bitcoin and Ethereum assets into GNU Taler tokens and vice versa. We also present in section \ref{sec:features} the different specificities of our system allowing to solve the inherent problems of blockchains. + +\section{GNU Taler}\label{sec:taler} +The GNU Taler system has been designed as an electronic payment system for FIAT currencies (Fig.~\ref{fig:taler}). In a normal configuration, customers who want to use GNU Taler use a wallet. To get tokens into their wallet, the users make a bank transfer to an exchange. The exchange issues tokens %(based on a blind signature) +to the users who stores them in their wallet. + +\begin{figure}[hb] + \begin{center} + \input{figures/taler_arch.tex} + \end{center} + \caption{GNU Taler overview}\label{fig:taler} +\end{figure} + +The GNU Taler system is based on four entities. The consumer who wants to buy goods from a merchant. The exchange that signs the user's tokens and collects the merchant's tokens. And the whole system is supervised by an auditor who checks that all transactions are regular. + + +When a users need tokens, they make a money transfer to the exchange. Then they generate tokens and have them signed by the exchange. The signature is blind, so the exchange does not know the ID of the tokens it has signed \cite{chaum2021issue}. + +The user transfers the tokens to the seller. The seller then presents them to the exchange. The exchange can verify the signature but cannot know by which consumer it was created (because of the blind signature). If the tokens are valid, the merchant's account is credited with the amount of the received tokens. + +The GNU-Taler tokens use asymmetric cryptography. The client creating a token generates a private key, public key pair. The public key is sent blind to the exchange, which signs it blind. During a payment, the customer transfers the real public key, the signature of the exchange and signs with his private key the transfer. The merchant sends this information to the exchange so that his account is credited. + + +\section{Architecture}\label{sec:architecture} +The depolymerizer project consists of providing an exchange for Bitcoin and Ethereum. We have developed a system that allows owners of digital currencies to deposit this currency in an exchange, to get tokens in exchange, and then to pay with these tokens. The transactions between customers and merchants are done in the GNU Taler system and not in the blockchain. Figure~\ref{fig:offchain} shows how the depolymerizer allows funds to be transferred to GNU Taler and then transactions to be made outside the blockchain. + +\begin{figure}[hb] + \begin{center} + \input{figures/settlement_layer.tex} + \end{center} + \caption{Blockchain settlement layer with Depolymerizer}\label{fig:offchain} +\end{figure} + +The system consists of several components. The Figure \ref{fig:architecture} shows the interactions between the Taler exchange, the Wire Gateway, the DLT Adapter and the DLT Full Node. Since the last two components are DLT-specific, there is an Adapter and a Full Node for Bitcoin and an Adapter and a Full Node for Ethereum. + +At the center of this architecture is a database that collects the incoming and outgoing transactions in the system (those made on the blockchain). These transactions are called credits and debits in our accounts. When a credit is found, tokens must be distributed to a customer. When a merchant deposits tokens, we must debit our account to transfer the money back to the merchant's DLT account. + + + + + + +\begin{figure}[hb] + \begin{center} + \input{figures/depolymerizer_arch.tex} + \end{center} + \caption{Depolymerizer architecture}\label{fig:architecture} +\end{figure} + +When a user wants to withdraw tokens, he has to credit our account on the DLT. As all users' money is transferred to the same address, the user must add information allowing to assign this money to this client. The client sends a transaction that contains both the money and his public key. This public key will be used to validate the new tokens. While meta-information is easy to add in Ethereum, for Bitcoin we use a multi-output transaction system. The main output is our account, the other outputs (whose value is negligible) correspond to the public key. + +When the clients want to create the tokens corresponding to the transfer they made, they sign the new tokens with the private key corresponding to the public key indicated during the transfer. + +The Taler exchange retrieves the new token request. It checks that the public key used during the money transfer matches the signature used for the request. Then it signs the new coins blind and sends them back to the user. The user removes the blind factor from his coins and can use them. + +The Taler exchange will also be responsible for collecting the coins that the merchants receive. The money is then transferred to the address given by the merchant in the DLT. + + +\section{Special features} \label{sec:features} +The biggest risk for our system is to believe an amount transferred, to validate the creation of coins and to see later that the original money transfer is not valid. Since the tokens can not be revocated (because they were signed blind), the exchange will lose money. + + +\begin{figure}[ht] + \begin{center} + \input{figures/fork.tex} + \end{center} + \caption{Blockchain fork}\label{fig:fork} +\end{figure} + +This can happen with DLT systems in the case of a fork. If a transaction is included in a block (for instance D1 in Fig. \ref{fig:fork}). We could believe that it is valid. But if a fork happens that does not contain D1, our transaction may not appear in the new blocks. Moreover we can also have in one of the new blocks D2 a transaction using the money at the origin of our transaction and thus making our transaction invalid. + +To solve this problem, we wait a certain number of blocks before validating a transaction. This number depends on the DLT and also depends on the history of forks. Waiting is not a problem, because for privacy reasons, we should not withdraw the coins at the time of use to avoid correlations between withdrawals and expenses that could attack the privacy of the system. + +\section{Advantages} + + +The depolymerizer system allows to turn Bitcoin or Ethereum funds temporarily into tokens. The tokens are very quickly exchangeable and can be used for daily payments. + +While the number of transactions on blockchains is limited by the size of the blocks, their frequency and thus the size of the blockchain, the GNU Taler payment system has no intrinsic limit. Marco Boss \cite{} has successfully configured a GNU Taler exchange to process 50,000 tokens per second. Since each transaction uses a limited number of tokens (less than the binary logarithm of the amount spent) an exchange can therefore process at least 10,000 transactions per second. +This is comparable to the Visa network, which claims to be able to process 65,000 messages per second (a transaction is also several messages). \cite{visafactsheet}. + +% https://www.visa.co.uk/dam/VCOM/download/corporate/media/visanet-technology/aboutvisafactsheet.pdf + +Blockchain-based systems are also dependent on their distributed aspect. Since there is no central instance to validate a transaction, the system waits for the transaction to be inserted into a block and then for that block to be confirmed by adding more blocks. This makes instantaneous transactions impossible with the Bitcoin and Ethereum systems. So you can never use these two systems directly to pay for coffee or bread, and a Bitcoin or Ethereum snake machine cannot work. Thanks to Depolymerizer, one can use GNU Taler to pay for services in real time. The customer can pay and the merchant can deliver the goods without waiting. + + +\section{Conclusion}\label{sec:conclusion} + + + +\bibliographystyle{IEEEtran} +\bibliography{biblio} +\end{document} + + + + + +\begin{figure}[ht] + \begin{center} + \input{figures/conf_delay.tex} + \end{center} + \caption{Reorganisation mitigation using confirmation delay} +\end{figure} + +\begin{figure}[ht] + \begin{center} + \input{figures/harmless_reorg.tex} + \end{center} + \caption{Harmless reorganisation} +\end{figure} + +\begin{figure}[ht] + \begin{center} + \input{figures/conflict.tex} + \end{center} + \caption{Reorganisation with conflicting transaction} +\end{figure} + +\begin{figure}[ht] + \begin{center} + \input{figures/analysis.tex} + \end{center} + \caption{Adaptive confirmation} +\end{figure} + +\begin{figure}[ht] + \begin{center} + \begin{bytefield}{33} + \bitheader{0,1,32} \\ + \bitbox{1}{\tiny 0} & \bitbox{32}{Key Hash} + \end{bytefield} + \end{center} + \caption{Incoming metadata format} +\end{figure} + + +\begin{figure}[ht] + \begin{center} + \begin{bytefield}[rightcurly=., rightcurlyspace=0pt]{33} + \bitheader{0,1,32,33} \\ + \begin{rightwordgroup}{Credit} + \bitbox{1}{\tiny 0} & \bitbox{32}{Transfer ID} & \bitbox{10}{Base URL} + \end{rightwordgroup} \\ \\ + \begin{rightwordgroup}{Bounce} + \bitbox{1}{\tiny \rotatebox{90}{254}} & \bitbox{32}{Transaction ID} + \end{rightwordgroup} + \end{bytefield} + \end{center} + \caption{Outgoing metadata format} +\end{figure} + +\begin{figure}[ht] + \begin{center} + \begin{bytefield}[rightcurly=., rightcurlyspace=0pt]{20} + \bitheader{0,3,4,19} \\ + \begin{rightwordgroup}{Address} + \bitbox{4}{ID} & \bitbox{16}{Half} + \end{rightwordgroup} + \end{bytefield} + + \end{center} + \begin{center} + \begin{bytefield}[rightcurly=., rightcurlyspace=0pt]{32} + \bitheader{0,1,31} \\ + \begin{rightwordgroup}{First ID} + \bitbox{1}{\tiny 0} & \bitbox{31}{Random ID} + \end{rightwordgroup} \\ \\ + \begin{rightwordgroup}{Second ID} + \bitbox{1}{\tiny 1} & \bitbox{31}{Random ID} + \end{rightwordgroup} + \end{bytefield} + \end{center} + \caption{Outgoing metadata format} +\end{figure} + + + diff --git a/article-brains22/figures/analysis.tex b/article-brains22/figures/analysis.tex @@ -0,0 +1,52 @@ +\begin{tikzpicture}[ + block/.style={rectangle,draw=black,fill=black!10,minimum size=7mm}, + conf/.style={draw=black!60!green,fill=black!60!green!10}, + nconf/.style={dotted}, + conft/.style={text=black!60!green}, + confl/.style={draw=black!60!green}, + ar/.style={-stealth} + ] + % Common + \node(0){}; + \node[block,conf,right=5mm of 0](1){}; + \node[block,conf,right=5mm of 1](2){}; + \draw[ar] (0) -- (1); + \draw[ar] (1) -- (2); + + % Current + \node[block,conf,right=5mm of 2](3){}; + \node[block,nconf,right=5mm of 3](4){}; + \node[block,nconf,right=5mm of 4](5){}; + \node[block,nconf,right=5mm of 5](6){}; + \draw[ar] (2) -- (3); + \draw[ar] (3) -- (4); + \draw[ar] (4) -- (5); + \draw[ar] (5) -- (6); + + % Fork + \node[block,nconf,above=7mm of 3](3p){}; + \node[block,nconf,right=5mm of 3p](4p){}; + \node[block,nconf,right=5mm of 4p](5p){}; + \node[block,nconf,right=5mm of 5p](6p){}; + \node[block,nconf,right=5mm of 6p](7p){}; + \draw[ar] (2.east) -- (3p.west); + \draw[ar] (3p) -- (4p); + \draw[ar] (4p) -- (5p); + \draw[ar] (5p) -- (6p); + \draw[ar] (6p) -- (7p); + + % Indication + \node[right=5mm of 7p]{\emph{fork}}; + \node[right=17mm of 6]{\emph{active}}; + + % Confirmation + \path (0) -- (1) node[conft,midway, below=6mm] (M) {Max}; + \path (2) -- (3) node[conft,midway, below=6mm] (N) {New}; + \path (3) -- (4) node[conft,midway, below=6mm] (I) {Initial}; + \node[above=25mm of M] (Mp) {}; + \node[above=25mm of N] (Np) {}; + \node[above=25mm of I] (Ip) {}; + \draw[confl,thick,dotted](M) -- (Mp); + \draw[confl](N) -- (Np); + \draw[confl,thick,dotted](I) -- (Ip); +\end{tikzpicture} +\ No newline at end of file diff --git a/article-brains22/figures/conf_delay.tex b/article-brains22/figures/conf_delay.tex @@ -0,0 +1,36 @@ +\begin{tikzpicture}[ + block/.style={rectangle,draw=black,fill=black!10,minimum size=7mm}, + conf/.style={draw=black!60!green,fill=black!60!green!10}, + nconf/.style={dotted}, + err/.style={draw=black!60!red,fill=black!60!red!10}, + ar/.style={-stealth} + ] + % Common + \node[block,conf](1){}; + \node[block,conf,right=5mm of 1](2){$D_0$}; + \node[block,conf,right=5mm of 2](3){}; + \draw[ar] (1) -- (2); + \draw[ar] (2) -- (3); + + % Current + \node [block,nconf,right=5mm of 3](4){}; + \node[block,nconf,right=5mm of 4](5){}; + \node[block,nconf,right=5mm of 5](6){$D_1$}; + \draw[ar] (3) -- (4); + \draw[ar] (4) -- (5); + \draw[ar] (5) -- (6); + + % Fork + \node [block,nconf,above=7mm of 4](4p){}; + \node[block,nconf,right=5mm of 4p](5p){$D_2$}; + \node[block,nconf,right=5mm of 5p](6p){}; + \node[block,nconf,right=5mm of 6p](7p){}; + \draw[ar] (3.east) -- (4p.west); + \draw[ar] (4p) -- (5p); + \draw[ar] (5p) -- (6p); + \draw[ar] (6p) -- (7p); + + % Indication + \node [right=5mm of 7p]{\emph{fork}}; + \node [right=17mm of 6]{\emph{active}}; +\end{tikzpicture} +\ No newline at end of file diff --git a/article-brains22/figures/conflict.tex b/article-brains22/figures/conflict.tex @@ -0,0 +1,36 @@ +\begin{tikzpicture}[ + block/.style={rectangle,draw=black,fill=black!10,minimum size=7mm}, + conf/.style={draw=black!60!green,fill=black!60!green!10}, + nconf/.style={dotted}, + err/.style={draw=black!60!red,fill=black!60!red!10}, + ar/.style={-stealth} + ] + % Common + \node[block,conf](1){}; + \node[block,conf,right=5mm of 1](2){$D_0$}; + \node[block,conf,right=5mm of 2](3){}; + \draw[ar] (1) -- (2); + \draw[ar] (2) -- (3); + + % Current + \node[block,conf,right=5mm of 3](4){$D_3$}; + \node[block,nconf,right=5mm of 4](5){}; + \node[block,nconf,right=5mm of 5](6){$D_1$}; + \draw[ar] (3) -- (4); + \draw[ar] (4) -- (5); + \draw[ar] (5) -- (6); + + % Fork + \node[block,dashed,err,above=7mm of 4](4p){$D_3'$}; + \node[block,nconf,right=5mm of 4p](5p){$D_2$}; + \node[block,nconf,right=5mm of 5p](6p){}; + \node[block,nconf,right=5mm of 6p](7p){}; + \draw[ar] (3.east) -- (4p.west); + \draw[ar] (4p) -- (5p); + \draw[ar] (5p) -- (6p); + \draw[ar] (6p) -- (7p); + + % Indication + \node [right=5mm of 7p]{\emph{fork}}; + \node [right=17mm of 6]{\emph{active}}; +\end{tikzpicture} +\ No newline at end of file diff --git a/article-brains22/figures/depolymerizer_arch.tex b/article-brains22/figures/depolymerizer_arch.tex @@ -0,0 +1,21 @@ +\begin{tikzpicture}[ + rect/.style={rectangle, draw=black, minimum height=6mm, minimum width=22mm}, + sym/.style={stealth-stealth, shorten >= 2pt, shorten <= 2pt} + ] + \node[rect](1) {Taler Exchange}; + \node[rect,below=of 1](2) {Wire Gateway}; + \node[rect,right=of 2](3) {PostgreSQL}; + \node[rect,right=of 3](4) {DLT Adapter}; + \node[rect,above=of 4](5) {DLT Full Node}; + + \draw[sym] (1) -- node [midway,right] {\tiny HTTP} (2); + \draw[sym] (2) -- node [midway,above] {\tiny SQL} (3); + \draw[sym] (3) -- node [midway,above] {\tiny SQL} (4); + \draw[sym] (4) -- node [midway,left ] {\tiny RPC} (5); + + + \node[above= 2mm of 1]{\small{\emph{Wire Gateway API}}}; + \node[above= 2mm of 5]{\small{\emph{DLT specific}}}; + \node[above=22mm of 3](T) {}; + \draw[dotted] (3) -- (T); +\end{tikzpicture} +\ No newline at end of file diff --git a/article-brains22/figures/fork.tex b/article-brains22/figures/fork.tex @@ -0,0 +1,33 @@ +\begin{tikzpicture}[ + block/.style={rectangle,draw=black,fill=black!10,minimum size=7mm}, + ar/.style={-stealth} + ] + % Common + \node[block](1){}; + \node[block,right=5mm of 1](2){$D_0$}; + \node[block,right=5mm of 2](3){}; + \draw[ar] (1) -- (2); + \draw[ar] (2) -- (3); + + % Current + \node[block,right=5mm of 3](4){}; + \node[block,right=5mm of 4](5){}; + \node[block,right=5mm of 5](6){$D_1$}; + \draw[ar] (3) -- (4); + \draw[ar] (4) -- (5); + \draw[ar] (5) -- (6); + + % Fork + \node[block,above=7mm of 4](4p){}; + \node[block,right=5mm of 4p](5p){$D_2$}; + \node[block,right=5mm of 5p](6p){}; + \node[block,right=5mm of 6p](7p){}; + \draw[ar] (3.east) -- (4p.west); + \draw[ar] (4p) -- (5p); + \draw[ar] (5p) -- (6p); + \draw[ar] (6p) -- (7p); + + % Indication + \node [right=5mm of 7p]{\emph{fork}}; + \node [right=17mm of 6]{\emph{active}}; +\end{tikzpicture} +\ No newline at end of file diff --git a/article-brains22/figures/harmless_reorg.tex b/article-brains22/figures/harmless_reorg.tex @@ -0,0 +1,36 @@ +\begin{tikzpicture}[ + block/.style={rectangle,draw=black,fill=black!10,minimum size=7mm}, + conf/.style={draw=black!60!green,fill=black!60!green!10}, + nconf/.style={dotted}, + err/.style={draw=black!60!red,fill=black!60!red!10}, + ar/.style={-stealth} + ] + % Common + \node[block,conf](1){}; + \node[block,conf,right=5mm of 1](2){$D_0$}; + \node[block,conf,right=5mm of 2](3){}; + \draw[ar] (1) -- (2); + \draw[ar] (2) -- (3); + + % Current + \node[block,conf,right=5mm of 3](4){}; + \node[block,nconf,right=5mm of 4](5){}; + \node[block,nconf,right=5mm of 5](6){$D_1$}; + \draw[ar] (3) -- (4); + \draw[ar] (4) -- (5); + \draw[ar] (5) -- (6); + + % Fork + \node[block,nconf,above=7mm of 4](4p){}; + \node[block,nconf,right=5mm of 4p](5p){$D_2$}; + \node[block,nconf,right=5mm of 5p](6p){}; + \node[block,nconf,right=5mm of 6p](7p){}; + \draw[ar] (3.east) -- (4p.west); + \draw[ar] (4p) -- (5p); + \draw[ar] (5p) -- (6p); + \draw[ar] (6p) -- (7p); + + % Indication + \node [right=5mm of 7p]{\emph{fork}}; + \node [right=17mm of 6]{\emph{active}}; +\end{tikzpicture} +\ No newline at end of file diff --git a/article-brains22/figures/settlement_layer.tex b/article-brains22/figures/settlement_layer.tex @@ -0,0 +1,50 @@ +\begin{tikzpicture}[ + rect/.style={rectangle, draw=black, minimum width=30mm}, + sym/.style={stealth-stealth, shorten >= 2pt, shorten <= 2pt}, + block/.style={rectangle,draw=black,fill=black!10,minimum size=7mm}, + ] + + %% Architecture + \node(Tt){Taler}; + \node[rect,below=0cm of Tt](Tc){Exchange}; + \node[rect,fit={(Tt) (Tc)}](T){}; + + \node[rect,below=7mm of Tc](D) {\textbf{Depolymerization}}; + + \node[rect,below=7mm of D](Bc){Node}; + \node[below=0cm of Bc](Bt){Blockchain}; + \node[rect,fit={(Bt) (Bc)}](B){}; + + \draw[sym] (T) -- (D); + \draw[sym] (D) -- (B); + + %% Blockchain + \node[block,right=8mm of B] (1){}; + \node[block,right=5mm of 1] (2){}; + %\node[block,right=4mm of 2] (3){}; + %\node[block,right=4mm of 3] (4){}; + %\node[block,right=4mm of 4] (5){}; + \node[block,right=5mm of 2] (5){}; + \node[block,right=5mm of 5] (6){}; + \draw[-stealth] (1) -- (2); + % \draw[-stealth] (2) -- (3); + % \draw[-stealth] (3) -- (4); + % \draw[-stealth] (4) -- (5); +\draw[-stealth] (2) -- (5); + \draw[-stealth] (5) -- (6); + + \node[left=4mm of 1] (S){}; + \node[right=4mm of 6] (E){}; + \draw[-stealth] (S) -- (1); + \draw[-stealth] (6) -- (E); + + %% Taler + \node[block, below right=-7.5mm and 12.5mm of T] (off){Off-chain transactions}; + \node[above=-0.5mm of off] {\includegraphics[height=7mm]{media/taler.png}}; + + %% Depolymerization + \node[right=11mm of D] {\small{Credit}}; + \node[right=50mm of D] {\small{Debit}}; + \draw[dashed,-stealth] (1.north) |- (off.west); + \draw[dashed,-stealth] (off.east) -| (6.north); +\end{tikzpicture} +\ No newline at end of file diff --git a/article-brains22/figures/taler_arch.tex b/article-brains22/figures/taler_arch.tex @@ -0,0 +1,35 @@ +\begin{tikzpicture}[ + rect/.style={circle, draw=black}, + sym/.style={-stealth, shorten >= 2pt, shorten <= 2pt} + ] + % Taler payment system + \node[rect](1) {Exchange}; + \node[rect,below left=2cm and 1cm of 1](2) {Customer}; + \node[rect,below right=2cm and 1cm of 1](3) {Merchant}; + + \draw[sym] (1) -- node [midway, above, sloped] {\tiny Withdraw coins} (2); + \draw[sym] (2) -- node [midway, above, sloped] {\tiny Spend coins} (3); + \draw[sym] (3) -- node [midway, above, sloped] {\tiny Deposit coins} (1); + + % Settlement layer + \node[left=2.5cm of 1](E1){}; + \node[right=2.5cm of 1](E2){}; + \draw[sym] (E1) -- node [midway, above] {\tiny Deposit money} (1); + \draw[sym] (1) -- node [midway, above] {\tiny Withdraw money} (E2); + + % Auditor + \node[above= of 1](A){Auditor}; + \draw[sym] (A) -- node [midway, right] {\tiny Verify} (1); + + % Separator + \node[below=1mm of E1] (S1S) {}; + \node[below=1mm of E2] (S1E) {}; + \node[above=6mm of E1] (S2S) {}; + \node[above=6mm of E2] (S2E) {}; + + \draw[dotted] (S1S) -- (S1E); + \draw[dotted] (S2S) -- (S2E); + + \node[below right=-2mm and -1.5mm of S2S] {\tiny{\emph{Settlement Layer}}}; + \node[below right=-2mm and -1.5mm of S1S] {\tiny{\emph{Taler payment system}}}; +\end{tikzpicture} +\ No newline at end of file diff --git a/article-brains22/media/fee.png b/article-brains22/media/fee.png Binary files differ. diff --git a/article-brains22/media/fee_var.png b/article-brains22/media/fee_var.png Binary files differ. diff --git a/article-brains22/media/news0.png b/article-brains22/media/news0.png Binary files differ. diff --git a/article-brains22/media/news1.png b/article-brains22/media/news1.png Binary files differ. diff --git a/article-brains22/media/news2.png b/article-brains22/media/news2.png Binary files differ. diff --git a/article-brains22/media/taler.png b/article-brains22/media/taler.png Binary files differ.