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

Rebalancing incentive calculation #33

Closed
wants to merge 13 commits into from

Conversation

iboss-ptk
Copy link
Collaborator

All calculations for rebalancing incentive mechanism, precision loss are handled.

More info on the mechanism https://hackmd.io/_c9N1wV5RZ-VlpstKUaKjA

@iboss-ptk iboss-ptk self-assigned this Oct 3, 2024
@iboss-ptk iboss-ptk requested a review from PaddyMc October 3, 2024 08:32
@iboss-ptk iboss-ptk mentioned this pull request Oct 31, 2024
13 tasks
@iboss-ptk iboss-ptk force-pushed the rebalancing_incentive_calculation branch from 78ad42c to d5fe090 Compare November 1, 2024 08:43
Copy link
Collaborator

@crnbarr93 crnbarr93 left a comment

Choose a reason for hiding this comment

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

LGTM! Just a potential small comment change. Will need to evaluate how these functions are implemented in the rest of the contract but it looks like that'll be a separate PR.

/// $$
/// C(b) =
/// \begin{cases}
/// \left(\frac{b - \phi_l}{\phi_l}\right)^2 & \text{if } 0 \leq b \lt \phi_l \\
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
/// \left(\frac{b - \phi_l}{\phi_l}\right)^2 & \text{if } 0 \leq b \lt \phi_l \\
/// \left(\frac{\phi_l - b}{\phi_l}\right)^2 & \text{if } 0 \leq b \lt \phi_l \\

Is this the correct way? The formula doesn't match the implementation

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed here as part of #36

@iboss-ptk
Copy link
Collaborator Author

Will close this PR as the changes are already included in #36

@iboss-ptk iboss-ptk closed this Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants