-
Notifications
You must be signed in to change notification settings - Fork 23
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
feat: bonding manager contract #302
feat: bonding manager contract #302
Conversation
- Uses coins instead of Asset almost everywhere - Brings in claim functionality - Brings in an initial epochChangedMsg where we create a new bucket and forward fees
…to config for querying GenesisEpoch
Schema generation had missing jobs:
Please run |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## release/v2_contracts #302 +/- ##
========================================================
+ Coverage 89.86% 90.09% +0.23%
========================================================
Files 261 278 +17
Lines 27339 29604 +2265
========================================================
+ Hits 24569 26673 +2104
- Misses 2770 2931 +161 ☔ View full report in Codecov by Sentry. |
08ac9c5
to
5514594
Compare
This branch needs a lil more work before merge but ready for review
|
607b546
to
bafcbf1
Compare
Schema generation had missing jobs:
Please run |
wip: EpochChangedMSG and FillRewards full test style: satisfy clippy (#327) * ran `just lint` * ran `cargo clippy --tests --all -- -D warnings`
… pool_manager package (#330)
Co-authored-by: Kerber0x <[email protected]>
…not be testes as the code is missing in the contract
bd3bf63
to
01ddd01
Compare
A bit WIP still, few hard codes
…se new method, update tests
Schema generation had missing jobs:
Please run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well done! there are a few things that need to be addressed though
operations: swap_routes.swap_route.swap_operations.clone(), | ||
minimum_receive: Some(simulate.amount), | ||
to: None, | ||
max_spread: Some(Decimal::percent(1)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think here we want to swap regardless, so we might pump this slippage percentage or not?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do want to swap regardless but this shouldnt need bumping reason is we are querying the simulation same block so the 1% is more of guard to ensure we dont get less than the query. Because its all happening in one set of messages I think it will never exceed 1% of the queried simulation but we could set it to any value.
Uses previous defined helper to swap to distribution denom
Thank you @kerber0x for help!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall 💪 Let's get it merged so branches don't diverge too much, then we can refactor and cleanup, write more tests and so on. 👏
Description and Motivation
Adds the Bonding-Manager contract. A contract which combines 3 previous contracts; the whale lair, fee collector and fee distributor. Handles the onchain bonding and fee distribution model for the dex.
Related Issues
Checklist:
Update index.md
)cargo fmt --all --
.cargo clippy -- -D warnings
.cargo schema
.