Formalizing Automated Market Makers in the Lean 4 Theorem Prover

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Pusceddu, Daniele, Bartoletti, Massimo
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866914673471782912
author Pusceddu, Daniele
Bartoletti, Massimo
author_facet Pusceddu, Daniele
Bartoletti, Massimo
contents Automated Market Makers (AMMs) are an integral component of the decentralized finance (DeFi) ecosystem, as they allow users to exchange crypto-assets without the need for trusted authorities or external price oracles. Although these protocols are based on relatively simple mechanisms, e.g., to algorithmically determine the exchange rate between crypto-assets, they give rise to complex economic behaviours. This complexity is witnessed by the proliferation of models that study their structural and economic properties. Currently, most of theoretical results obtained on these models are supported by pen-and-paper proofs. This work proposes a formalization of constant-product AMMs in the Lean 4 Theorem Prover. To demonstrate the utility of our model, we provide mechanized proofs of key economic properties like arbitrage, that at the best of our knowledge have only been proved by pen-and-paper before.
format Preprint
id arxiv_https___arxiv_org_abs_2402_06064
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Formalizing Automated Market Makers in the Lean 4 Theorem Prover
Pusceddu, Daniele
Bartoletti, Massimo
Logic in Computer Science
Computational Engineering, Finance, and Science
Computer Science and Game Theory
Automated Market Makers (AMMs) are an integral component of the decentralized finance (DeFi) ecosystem, as they allow users to exchange crypto-assets without the need for trusted authorities or external price oracles. Although these protocols are based on relatively simple mechanisms, e.g., to algorithmically determine the exchange rate between crypto-assets, they give rise to complex economic behaviours. This complexity is witnessed by the proliferation of models that study their structural and economic properties. Currently, most of theoretical results obtained on these models are supported by pen-and-paper proofs. This work proposes a formalization of constant-product AMMs in the Lean 4 Theorem Prover. To demonstrate the utility of our model, we provide mechanized proofs of key economic properties like arbitrage, that at the best of our knowledge have only been proved by pen-and-paper before.
title Formalizing Automated Market Makers in the Lean 4 Theorem Prover
topic Logic in Computer Science
Computational Engineering, Finance, and Science
Computer Science and Game Theory
url https://arxiv.org/abs/2402.06064