Kubo Documentation
  • Introduction
    • What is Kubo?
    • Why We Built Kubo
  • How Kubo Works
    • Overview
      • Mathematical Overview
    • Leveraged Long Trades
    • Repo Trades
    • Liquidity Pools
    • Stablecoin Vaults
  • Other
    • FAQs
Powered by GitBook
On this page
  1. How Kubo Works
  2. Overview

Mathematical Overview

PreviousOverviewNextLeveraged Long Trades

Last updated 4 months ago

Kubo prices all trades via an AMM. Trades are accepted if they increase the market maker’s utility (possibly after some fee margin). The market maker’s utility function is the expected utility of its holdings evaluated at a price 4 hours in the future. Letting x:ℜ↦ℜx: \Re \mapsto \Rex:ℜ↦ℜ represent a function that produces the market maker’s wealth at a specific price, we have:

u(x)=∑iP(pi)u(x(pi))u(x) = \sum_i \mathbb{P}(p_i) u(x(p_i))u(x)=i∑​P(pi​)u(x(pi​))

We use a negative reciprocal utility (a barrier function). Barrier utility functions in automated market-making were initially introduced by (note: Othman was a core contributor to Kubo), building on the work of :

u(v)=−1vu(v) = -\frac{1}{v}u(v)=−v1​

The positive homogeneous invariant corresponding to this utility function is simply the negative reciprocal itself:

I(x)=−1u(x)I(x) = -\frac{1}{u(x)}I(x)=−u(x)1​

Changes in the invariant function are used to calculate the issuance of LP tokens. Because the invariant function is positive homogeneous, a user whose LP contribution doubles the market maker’s wealth in all future price states would be issued LP tokens worth half of the resulting market.

Forecasting the Future Price

The Gauss-Hermite quadrature and the volatility of the individual underlying asset determine the set of points p used to calculate the future price and their probabilities.

Othman and Sandholm 2012
Chen and Pennock 2007