Skip to content

Add tests covering Pool calculations and fixes for tracer bullet paths#20

Merged
nialexsan merged 14 commits intotracer-bulletfrom
gio/calculation-validation
Jul 9, 2025
Merged

Add tests covering Pool calculations and fixes for tracer bullet paths#20
nialexsan merged 14 commits intotracer-bulletfrom
gio/calculation-validation

Conversation

@sisyphusSmiling
Copy link
Contributor

@sisyphusSmiling sisyphusSmiling commented Jul 2, 2025

TODO

  • Pool.fundsAvailableAboveTargetHealthAfterDepositing() fixes
    • Currently reports balances in the depositType instead of withdrawType
  • Pool.fundsRequiredForTargetHealthAfterWithdrawing() coverage
  • Pool.availableBalance() coverage
  • Pool.rebalance() coverage

@sisyphusSmiling sisyphusSmiling changed the title Add tests covering Pool calculations and fixes for tracer bullet paths [WIP] Add tests covering Pool calculations and fixes for tracer bullet paths Jul 2, 2025
@sisyphusSmiling sisyphusSmiling self-assigned this Jul 2, 2025
@sisyphusSmiling sisyphusSmiling added the bug Something isn't working label Jul 2, 2025
@nialexsan nialexsan mentioned this pull request Jul 9, 2025
// compute how many units of the token would be needed to reach the target health.
let healthChange = targetHealth - healthAfterWithdrawal
let requiredEffectiveDebt = healthChange * effectiveCollateralAfterWithdrawal / (targetHealth * targetHealth)
let requiredEffectiveDebt = effectiveDebtAfterWithdrawal - effectiveCollateralAfterWithdrawal / targetHealth
Copy link
Collaborator

Choose a reason for hiding this comment

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

@sisyphusSmiling this is correct formula for required effective debt

Copy link
Collaborator

Choose a reason for hiding this comment

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

@nialexsan nialexsan marked this pull request as ready for review July 9, 2025 21:43
@nialexsan nialexsan merged commit b95d410 into tracer-bullet Jul 9, 2025
1 check passed
@nialexsan nialexsan deleted the gio/calculation-validation branch July 9, 2025 21:45
@sisyphusSmiling sisyphusSmiling changed the title [WIP] Add tests covering Pool calculations and fixes for tracer bullet paths Add tests covering Pool calculations and fixes for tracer bullet paths Jul 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants