#ethereum #mev #dex #cffms

cfmms

CFMM lib built in Rust enabling pair syncing and swap simulation with pools on Ethereum

55 releases (5 breaking)

0.6.2 Mar 17, 2023
0.5.10 Mar 9, 2023
0.2.20 Dec 31, 2022

#5 in #mev

Download history 33/week @ 2024-06-22 7/week @ 2024-06-29 18/week @ 2024-07-06 10/week @ 2024-07-13 14/week @ 2024-07-20 19/week @ 2024-07-27 17/week @ 2024-08-03 19/week @ 2024-08-10 8/week @ 2024-08-17 10/week @ 2024-08-24 11/week @ 2024-08-31 11/week @ 2024-09-07 9/week @ 2024-09-14 35/week @ 2024-09-21 30/week @ 2024-09-28 11/week @ 2024-10-05

87 downloads per month
Used in coex

MIT license

190KB
4.5K SLoC

Rust 3.5K SLoC // 0.0% comments Solidity 1K SLoC // 0.1% comments

------------------------------------

Tests and Docs are still being written 🏗️.

Tests are still being written, assume bugs until tested. If you would like to help contribute on the tests or docs, feel free to open up an issue or make a PR.

------------------------------------

cfmms-rs

Sync pairs simulate swaps, and interact with constant function market makers on Ethereum.

Supported Dexes

Dex Status
UniswapV2 variants
UniswapV3

Running Examples

To run any of the examples, first set a local environment variable called ETHEREUM_MAINNET_ENDPOINT. Then you can simply run cargo run --example <example_name>.

Dependencies

~37–55MB
~1M SLoC