Skip to content

Latest commit

 

History

History
20 lines (10 loc) · 903 Bytes

README.md

File metadata and controls

20 lines (10 loc) · 903 Bytes

Flat CFMM

CFMM between two tokens (FA1.2 / FA2 each) using the isoutility curve U(x,y) = (x+y)^8 - (x-y)^8 This curve has the benefit of being extremely flat around x = y, at which point dx U / dy U = -1. This makes it suitable to create a CFMM between two assets which ought to be pegged to one another.

Based on the generic cfmm in the ctez repo which is itself based on dexter v2.

Barely tested!

The curve

Curve showing the constant product curve, the constant sum curve, and the compromise

To give some sense, when the two assets are held in equal amounts, 78% of the pool can be bought for a slippage of less than 5%.

Slippage for constant product, sum, and the compromise