-
Notifications
You must be signed in to change notification settings - Fork 381
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
Prevent invariant overflow #1690
Merged
nventuro
merged 2 commits into
composable-stable-deployment
from
prevent-invariant-overflow
Sep 5, 2022
Merged
Prevent invariant overflow #1690
nventuro
merged 2 commits into
composable-stable-deployment
from
prevent-invariant-overflow
Sep 5, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nventuro
changed the base branch from
composable-stable-deployment
to
recovery-mode-forfeit-fees
September 2, 2022 21:15
EndymionJkb
previously approved these changes
Sep 2, 2022
EndymionJkb
dismissed
their stale review
September 2, 2022 21:51
Still have those division by zero errors in this branch
TomAFrench
force-pushed
the
prevent-invariant-overflow
branch
from
September 5, 2022 12:21
6e07c2c
to
a6045c1
Compare
Base automatically changed from
recovery-mode-forfeit-fees
to
composable-stable-deployment
September 5, 2022 14:39
nventuro
force-pushed
the
prevent-invariant-overflow
branch
from
September 5, 2022 16:57
a6045c1
to
76acd4c
Compare
TomAFrench
reviewed
Sep 5, 2022
Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com>
nventuro
added a commit
that referenced
this pull request
Sep 8, 2022
* Fix BasePool permissioned function owner only state not being used (#1657) * Make Stable `getRate` consider unpaid protocol fees (#1683) * Remove StableMath.getRate * Clarify return value in protocol fee module * Fix get rate * Add tests * Add yield tests * Rename getBalances * Reuse test code * Add integration test * Add exit tests * style: lintooor * Update pkg/pool-stable/contracts/ComposableStablePool.sol Co-authored-by: EndymionJkb <EndymionJkb@gmail.com> * Update pkg/pool-stable/test/ComposableStablePool.test.ts Co-authored-by: EndymionJkb <EndymionJkb@gmail.com> * Revert "Rename getBalances" This reverts commit 0c7c75d. * Update pkg/pool-stable/test/ComposableStablePool.test.ts Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com> * Lintor * Provide fee setter helper Co-authored-by: Tom French <tom@tomfren.ch> Co-authored-by: EndymionJkb <EndymionJkb@gmail.com> Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com> * typo * Fix argument name of protocol fee cache update event (#1689) * Pay protocol fees on cache update (#1684) * Pay protocol fees on cache update * Fix typo * Add docs * Add proto cache hook tests * Add pause behavior and tests * Fix tests * Fix integration test * Update pkg/pool-utils/contracts/ProtocolFeeCache.sol Co-authored-by: EndymionJkb <EndymionJkb@gmail.com> * Update pkg/pool-stable/contracts/ComposableStablePool.sol Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com> Co-authored-by: EndymionJkb <EndymionJkb@gmail.com> Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com> * Forfeit protocol fees on recovery mode disable (#1687) * Pay protocol fees on cache update * Fix typo * Add docs * Add proto cache hook tests * Add pause behavior and tests * Fix tests * Forfeit protocol fees on recovery mode disable * Update pkg/pool-stable/contracts/ComposableStablePool.sol Co-authored-by: EndymionJkb <EndymionJkb@gmail.com> * Update pkg/pool-stable/test/ComposableStablePool.test.ts Co-authored-by: EndymionJkb <EndymionJkb@gmail.com> Co-authored-by: EndymionJkb <EndymionJkb@gmail.com> * Add comment on decreasing StablePool token rates (#1688) * Add small comment on decreasing rates * Apply suggestions from code review Co-authored-by: EndymionJkb <EndymionJkb@gmail.com> * Update ComposableStablePoolProtocolFees.sol Co-authored-by: EndymionJkb <EndymionJkb@gmail.com> * Prevent invariant overflow (#1690) * Add check to prevent invariant overflow * Update pkg/pool-stable/contracts/ComposableStablePoolProtocolFees.sol Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com> Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com> * fix: add missing bracket * style: the lintoor * Reduce ComposableStable bytecode size (#1696) * Simplify immutable accesses * refactor: use stack variable for totalTokens * refactor: unbreak the other function Co-authored-by: Tom French <tom@tomfren.ch> * Add reentrancy comment (#1703) * Add getActualSupply (#1704) * Add getActualSupply * Update pkg/pool-stable/test/ComposableStablePool.test.ts Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com> * Update pkg/pool-stable/contracts/ComposableStablePool.sol Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com> * Remove virtual supply Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com> * Update deployment info (#1707) * Do deployment (#1708) * Fix missing migration * Fix weighted build * Remove old compo pool action ids * New ComposableStablePool action ids (#1711) * ComposableStablePool mainnet action-ids * ComposableStablePool arbitrum action-ids * ComposableStablePool polygon action-ids * ComposableStablePool goerli action-ids (#1712) Co-authored-by: Nicolás Venturo <nicolas.venturo@gmail.com> Co-authored-by: EndymionJkb <EndymionJkb@gmail.com> Co-authored-by: Markus Buhatem Koch <markusbkoch@gmail.com>
jubeira
pushed a commit
that referenced
this pull request
Nov 24, 2022
* Add check to prevent invariant overflow * Update pkg/pool-stable/contracts/ComposableStablePoolProtocolFees.sol Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com> Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com>
TomAFrench
added a commit
that referenced
this pull request
Nov 24, 2022
* Add check to prevent invariant overflow * Update pkg/pool-stable/contracts/ComposableStablePoolProtocolFees.sol Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com> Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com>
TomAFrench
added a commit
that referenced
this pull request
Nov 24, 2022
* Add check to prevent invariant overflow * Update pkg/pool-stable/contracts/ComposableStablePoolProtocolFees.sol Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com> Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com>
TomAFrench
added a commit
that referenced
this pull request
Nov 24, 2022
* Add check to prevent invariant overflow * Update pkg/pool-stable/contracts/ComposableStablePoolProtocolFees.sol Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com> Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com>
TomAFrench
added a commit
that referenced
this pull request
Nov 25, 2022
* Add check to prevent invariant overflow * Update pkg/pool-stable/contracts/ComposableStablePoolProtocolFees.sol Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com> Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com>
nventuro
added a commit
that referenced
this pull request
Nov 30, 2022
* Prevent invariant overflow (#1690) * Add check to prevent invariant overflow * Update pkg/pool-stable/contracts/ComposableStablePoolProtocolFees.sol Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com> Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com> * Composable stable pool versioning (#2034) * WIP: version for ComposableStablePool. * Fix stack too deep error and adjust tests. * ComposableStablePoolFactory test. * Remove unused var. * Add factory version / pool version. * Fix benchmarks. * Remove IVersionProvider. * feat: add proportional joins/exits * Deployment preparation: Composable stable pool v2 (#2028) * feat: add proportional joins/exits to ComposableStablePool * deprecate 20220906-composable-stable-pool task * add new task * add artifacts * checkpoint * refactor: finish fork test * refactor: remove weighted encoder name change (extraneous for this deployment) * feat: add deprecations section to stable pool, and update deployments readme * fix: deprecated paths * Update README.md Co-authored-by: Nicolás Venturo <nicolas.venturo@gmail.com> * fix: re-add _computeProportionalAmountsOut * test: update test to remove use of deprecated function Co-authored-by: Nicolás Venturo <nicolas.venturo@gmail.com> Co-authored-by: Juan Ignacio Ubeira <juani@balancer.finance>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Not quite sure what we were thinking with the lack of SafeMath here 🤷