#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 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 15/week @ 2024-10-05 22/week @ 2024-10-12 23/week @ 2024-10-19 16/week @ 2024-10-26 29/week @ 2024-11-02

92 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

~38–56MB
~1M SLoC