Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: g3m fee logic #6

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

fix: g3m fee logic #6

wants to merge 6 commits into from

Conversation

Autoparallel
Copy link
Contributor

@Autoparallel Autoparallel commented Feb 21, 2024

Working here to fix the fee accounting for GeometricMean

TODO:

  • Add a test with very deep liquidity to see that fee approaches expected like in ConstantSum.

Closes #3

@Autoparallel
Copy link
Contributor Author

@kinrezC the tests now fail in the optimal arbs :(

We gotta redo this math haha

commit 8ee49e0
Merge: bf13638 36a449e
Author: Clément Lakhal <[email protected]>
Date:   Thu Feb 22 15:03:01 2024 +0400

    Merge pull request #10 from primitivefinance/feat/strategy-notebooks-desmos

    feat: refactor + notebooks + strategy READMEs

commit 36a449e
Author: clemlak <[email protected]>
Date:   Thu Feb 22 14:47:38 2024 +0400

    chore: fix errors due to outdated imports and names

commit 8865c35
Author: Colin Roberts <[email protected]>
Date:   Wed Feb 21 21:01:23 2024 -0700

    Update README.md

commit 1cf2670
Author: Colin Roberts <[email protected]>
Date:   Wed Feb 21 15:52:13 2024 -0700

    edit: LogNormal and GeometricMean

commit b22dbf6
Author: Colin Roberts <[email protected]>
Date:   Wed Feb 21 15:15:11 2024 -0700

    edit: GeometricMean README

commit 236a526
Author: Colin Roberts <[email protected]>
Date:   Wed Feb 21 14:35:47 2024 -0700

    Squashed commit of the following:

    commit bf13638
    Author: Colin Roberts <[email protected]>
    Date:   Wed Feb 21 09:28:39 2024 -0700

        feat: DFMM kit Rust crate (#5)

        * feat: dfmm kit
        * feat: `Pool` struct and impls
        * feat: README.md
        * fix: the swap_data

        ---------

        Co-authored-by: Waylon Jepsen <[email protected]>

commit bf13638
Author: Colin Roberts <[email protected]>
Date:   Wed Feb 21 09:28:39 2024 -0700

    feat: DFMM kit Rust crate (#5)

    * feat: dfmm kit
    * feat: `Pool` struct and impls
    * feat: README.md
    * fix: the swap_data

    ---------

    Co-authored-by: Waylon Jepsen <[email protected]>

commit 565b3ca
Author: Colin Roberts <[email protected]>
Date:   Wed Feb 21 08:26:05 2024 -0700

    add notebooks and READMEs

commit 5ea1a16
Author: Colin Roberts <[email protected]>
Date:   Wed Feb 21 08:12:49 2024 -0700

    refactor: rename G3M -> GeometricMean

commit d966e37
Author: Colin Roberts <[email protected]>
Date:   Wed Feb 21 08:05:02 2024 -0700

    refactor: layout

commit 76d8c54
Author: Clément Lakhal <[email protected]>
Date:   Wed Feb 21 18:32:17 2024 +0400

    chore: repo org (#7)

    * chore: add .env to .gitignore

    * chore: add env.example

    * build: enable via-ir in Foundry settings

    * chore: update README
@0xJepsen 0xJepsen added the 🧹 improvement Code improvements or cleanup label Feb 23, 2024
@clemlak clemlak added the 🚧 DO NOT MERGE 🚧 Do not merge label Feb 28, 2024
@Alexangelj Alexangelj added the 🛠️ kit Anything related to the DFMM kit label Mar 13, 2024
dfmm.swap(poolId, swapData);
}

function test_g3m_swap_x_in_deep() public deep {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kinrezC look here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚧 DO NOT MERGE 🚧 Do not merge 🧹 improvement Code improvements or cleanup 🛠️ kit Anything related to the DFMM kit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug(low-severity): fee calculation on GeometricMean
4 participants