Table of Contents
Fetching ...

Escrows are optics

Fabrizio Genovese, Fosco Loregian, Daniele Palombi

Abstract

We provide a categorical interpretation for escrows, i.e. trading protocols in trustless environment, where the exchange between two agents is mediated by a third party where the buyer locks the money until they receive the goods they want from the seller. A simplified escrow system can be modeled as a certain kind of morphism in the category of optics on a monoidal category. When objects in the base category have monoid and comonoid structures, more involved kinds of escrows `with intermediaries' can be modelled as morphisms with action-like properties.

Escrows are optics

Abstract

We provide a categorical interpretation for escrows, i.e. trading protocols in trustless environment, where the exchange between two agents is mediated by a third party where the buyer locks the money until they receive the goods they want from the seller. A simplified escrow system can be modeled as a certain kind of morphism in the category of optics on a monoidal category. When objects in the base category have monoid and comonoid structures, more involved kinds of escrows `with intermediaries' can be modelled as morphisms with action-like properties.

Paper Structure

This paper contains 7 sections, 4 theorems, 27 equations, 3 figures.

Key Result

Proposition 3.3

The rule above is associative and unital: this means that the diagrams commute for a choice of 'unit' $\nu_X : 1 \to \langle X,X\rangle$.

Figures (3)

  • Figure 1: A simple trade.
  • Figure 2: An escrow trade.
  • Figure 3: An escrow trade with a greedy intermediary.

Theorems & Definitions (21)

  • Remark 2.1
  • Definition 2.2: The category of optics
  • Remark 2.3
  • Definition 2.4
  • Definition 2.5
  • Remark 2.6
  • Definition 3.1: The building blocks of escrow composition
  • Remark 3.2
  • Proposition 3.3
  • proof
  • ...and 11 more