diff --git a/graph.png b/graph.png new file mode 100644 index 0000000..7c9253e Binary files /dev/null and b/graph.png differ diff --git a/graph.svg b/graph.svg new file mode 100644 index 0000000..c45550f --- /dev/null +++ b/graph.svg @@ -0,0 +1,1507 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + State + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Parameters of the action + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/main.pdf b/main.pdf index 800d2be..720e835 100644 Binary files a/main.pdf and b/main.pdf differ diff --git a/main.tex b/main.tex index 61779b7..65fefa2 100644 --- a/main.tex +++ b/main.tex @@ -29,6 +29,7 @@ \titleformat{\subsection}[block]{\large}{\thesubsection.}{1em}{} % Change the look of the section titles \usepackage{authblk} +\usepackage{graphicx} \usepackage{fancyhdr} % Headers and footers \pagestyle{fancy} % All pages have headers and footers @@ -100,24 +101,47 @@ The goal of this whitepaper is to present such an entity --- Agorata. \section{Decision-making algorithm} In this chapter, the strategy for making decisions will be described. -\textbf{Deal representation} +\subsection{Deal representation} A deal proposal is made by the user in the form of a smart contract. A smart contract is considered as an entity with which other entities (users, smart contracts) can interact via messages\footnote{The message concept used here is from The Open Network (TON). A message can include tokens, commands, information, code.}. For a state of the contract we can determine the messages that can be sent to the contract and for each of them --- the response messages and the next state. The deal is represented as a tree with states as leafs and actions (messages) as edges. Depending on the actions, the deal has a total outcome --- the number of tokens that were gained/spent by the agent. -\textbf{Agent parameters} +\begin{figure}[!htb] + \centering + \includegraphics[width=0.6\linewidth]{graph.png} + \caption{Deal representation.} + \label{fig:01} +\end{figure} + +Each action (message) has parameters $\theta$, including: +\begin{enumerate} + \item $t$ --- the time at which the message is sent. + \item $s$ --- the sender of the message. + \item tokens sent with the message. + \item any other possible information. +\end{enumerate} + +The parameter space for each action can be constrained --- the smart contract can reject some of the messages. For instance, this can lead to the entire space consisting of a single element (the contract rejects everything except for one specific message, e.g. a specific person sending a specific amount of tokens). + +The main parameters of the state are the financial outcomes for the smart contracts. + + +\subsection{Agent parameters} \begin{enumerate} - \item $T_{0}$ is the maximum deal time --- i.e., the horizon after which the benefits of the deal are not considered - \item $\tau$ is the charachteristic time of discount --- e.g., $\exp({\frac{1\,year}{\tau}}) - 1$ is the minimal yearly rate for a loan + \item $T_{0}$ is the maximum deal duration --- i.e., the horizon after which the benefits of the deal are not considered. + \item $\tau$ is the charachteristic time of discount --- e.g., $\exp({\frac{1\,year}{\tau}}) - 1$ is the minimal yearly rate for a loan. \end{enumerate} -Given these parameters, the value function $V((x_{i}), (t_{i}))$ can be determined. It takes the sequence of values $(x_{i}, t_{i})$, where $x_{i}$ are the incoming/outcoming tokens from the agent. +Given these parameters, the value function $V((x_{i}), (t_{i}))$ (or $V(S)$) can be determined. It takes the sequence of values $(x_{i}, t_{i})$, where $x_{i}$ are the incoming/outcoming tokens from the agent. -\textbf{Deal evaluation} +\subsection{Deal evaluation} The agent considers the worst case of the deal from the perspective of game theory: the best (from the perspective of the value function) actions of the agent and the ``worst'' actions of the counteragents. This sequence of events is the run through the value function in order to make a decision. +Thus, a deal is considered profitable for the agent ($A$) $\iff$ $p(S_{i}) > 0$ $\iff$ +$$V(S_{i})>0 \vee \\ (\forall a_{ij} (V(S_{ij}) > 0 \vee a.s = A) \wedge a_{ij}: V(S_{ij})>0)$$ + \section{Contract evaluation algorithm}