\documentclass[twoside]{article}

\usepackage{blindtext} % Package to generate dummy text throughout this template 

\usepackage[sc]{mathpazo} % Use the Palatino font
\usepackage[T1]{fontenc} % Use 8-bit encoding that has 256 glyphs
\linespread{1.05} % Line spacing - Palatino needs more space between lines
\usepackage{microtype} % Slightly tweak font spacing for aesthetics

\usepackage[english]{babel} % Language hyphenation and typographical rules

\usepackage[hmarginratio=1:1,top=32mm,columnsep=20pt]{geometry} % Document margins
\usepackage[hang, small,labelfont=bf,up,textfont=it,up]{caption} % Custom captions under/above floats in tables or figures
\usepackage{booktabs} % Horizontal rules in tables

\usepackage{lettrine} % The lettrine is the first enlarged letter at the beginning of the text

\usepackage{enumitem} % Customized lists
\setlist[itemize]{noitemsep} % Make itemize lists more compact

\usepackage{abstract} % Allows abstract customization
\renewcommand{\abstractnamefont}{\normalfont\bfseries} % Set the "Abstract" text to bold
\renewcommand{\abstracttextfont}{\normalfont\small\itshape} % Set the abstract itself to small italic text

\usepackage{titlesec} % Allows customization of titles
\renewcommand\thesection{\Roman{section}} % Roman numerals for the sections
\renewcommand\thesubsection{\roman{subsection}} % roman numerals for subsections
\titleformat{\section}[block]{\large\scshape\centering}{\thesection.}{1em}{} % Change the look of the section titles
\titleformat{\subsection}[block]{\large}{\thesubsection.}{1em}{} % Change the look of the section titles

\usepackage{authblk}

\usepackage{fancyhdr} % Headers and footers
\pagestyle{fancy} % All pages have headers and footers
\fancyhead{} % Blank out the default header
\fancyfoot{} % Blank out the default footer
\fancyhead[C]{Agorata $\bullet$ July 2022 $\bullet$ \href{https://agorata.io}{agorata.io}} % Custom header text
\fancyfoot[RO,LE]{\thepage} % Custom footer text

\newcommand\blfootnote[1]{%
  \begingroup
  \renewcommand\thefootnote{}\footnote{#1}%
  \addtocounter{footnote}{-1}%
  \endgroup
}

\usepackage{titling} % Customizing the title section

\usepackage{hyperref} % For hyperlinks in the PDF

%----------------------------------------------------------------------------------------
%	TITLE SECTION
%----------------------------------------------------------------------------------------

\setlength{\droptitle}{-4\baselineskip} % Move the title up

\pretitle{\begin{center}\Huge\bfseries} % Article title formatting
\posttitle{\end{center}} % Article title closing formatting
\title{Agorata} % Article title
\author{%
\textsc{Lev Chizhov}$^{1,2}$\\
\normalsize \href{https://ennucore.com}{@ennucore} % Your email address
%\and % Uncomment if 2 authors are required, duplicate these 4 lines if more
%\textsc{Jane Smith}\thanks{Corresponding author} \\[1ex] % Second author's name
%\normalsize University of Utah \\ % Second author's institution
%\normalsize \href{mailto:jane@smith.com}{jane@smith.com} % Second author's email address
}
\date{\today} % Leave empty to omit a date
\renewcommand{\maketitlehookd}{%
\begin{abstract}
\noindent Agorata is an implementation of the idealized economic agent, or, specifically, an aggregator of smart contracts. It combines one or more contracts proposed by the members of the network in a deal which can be evaluated as profitable for Agorata with low risks. Using this approach, Agorata can provide infrastructure for loans, flashloans, bets, derivatives, bridging between chaiNs, and many more financial instruments.
\end{abstract}
}

%----------------------------------------------------------------------------------------

\begin{document}

% Print the title
\maketitle
\blfootnote{$^{1}$ Moscow Institute of Physics and Technology}
\blfootnote{$^{2}$ Ludwig-Maximilians-Universität München}

\tableofcontents

%----------------------------------------------------------------------------------------
%	ARTICLE CONTENTS
%----------------------------------------------------------------------------------------

\section{Introduction and overview}
\indent There is a variety of standard financial organizations that provide their capital for some simple purely financial deals: banks, brokers, gambling institutions, betting institutions and many more. Most of them have their own DeFi counterparts, as well as some services that are only possible on the blockchain --- for example, flashloans.

All of these organizations can be generalized to an economic agent that has a utility function and who takes the deal if and only if it is the most beneficial in terms of this function. These particular implementations, however, only consider a very limited subset of deals. Also, all of them work only with purely financial deals which include not more than 3 parties\footnote{An example of such a deal with three parties is a stanard deal on a financial market.}, including the financial organization.

Technologies of decentralization and smart contracts in particular provide the foundation for a much more fundamental entity --- one which goes far beyond standard simple templated purely-financial deals. Instead, this entity can be the implementation of the general economic agent. It can analyze deal proposals and combine them into a very complex deal, which it will evaluate and participate in. As a result, this entity can serve as a liquidity provider, loan broker, a service for finding a counterparty. It is worth noticing that as the blockchain technologies spread into multiple fields (not only financial), a service like that can become much more versatile and participate in deals including various assets (domain names, art, computational resources are the examples of what can be possible now, future applications will go much further).

The goal of this whitepaper is to present such an entity --- Agorata.


\section{Decision-making algorithm}

\section{Contract evaluation algorithm}

\section{Applications}

\subsection{Flashloans}

\subsection{Loans}

\subsection{Bridges}

\subsection{Bets}

\subsection{More complex examples}

\section{Conclusion}

\end{document}
