#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

#2600 in Magic Beans

Download history 41/week @ 2023-12-18 50/week @ 2023-12-25 70/week @ 2024-01-08 87/week @ 2024-01-15 89/week @ 2024-01-22 121/week @ 2024-01-29 54/week @ 2024-02-05 157/week @ 2024-02-12 122/week @ 2024-02-19 69/week @ 2024-02-26 109/week @ 2024-03-04 55/week @ 2024-03-11 52/week @ 2024-03-18 49/week @ 2024-03-25 637/week @ 2024-04-01

802 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