-
Notifications
You must be signed in to change notification settings - Fork 9
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
WIP: The Balancer #202
Open
aalavandhan
wants to merge
7
commits into
main
Choose a base branch
from
balancer-v4
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
WIP: The Balancer #202
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
aalavandhan
force-pushed
the
balancer-v4
branch
from
March 22, 2024 02:50
0169aec
to
6c1fe65
Compare
aalavandhan
force-pushed
the
balancer-v4
branch
2 times, most recently
from
March 26, 2024 13:39
c0155b6
to
46dd2d7
Compare
aalavandhan
force-pushed
the
balancer-v4
branch
2 times, most recently
from
April 9, 2024 00:28
bbf41e6
to
950ab24
Compare
aalavandhan
force-pushed
the
dev
branch
2 times, most recently
from
April 16, 2024 16:14
6ab7730
to
52a3533
Compare
aalavandhan
force-pushed
the
balancer-v4
branch
5 times, most recently
from
April 18, 2024 01:34
b446cb6
to
d996baf
Compare
aalavandhan
force-pushed
the
balancer-v4
branch
from
April 18, 2024 15:18
d996baf
to
e724ee4
Compare
aalavandhan
force-pushed
the
dev
branch
2 times, most recently
from
May 30, 2024 20:48
ae80de5
to
17622f2
Compare
aalavandhan
force-pushed
the
balancer-v4
branch
2 times, most recently
from
June 11, 2024 13:42
33b294a
to
d0dbc18
Compare
The Balancer
🚨 Report Summary
For more details view the full report in OpenZeppelin Code Inspector |
…, interface cleanup
… based on liquidity, updated internal tranche handling to be account for latest changes to button-wood's tranche contracts (min-debt, totalCollateralBalance)
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.
Balancer: New module to orchestrate all external interactions with perp/vault systems and holds all the fee logic. (The current fee policy evolves into the balancer). Balancer allows for operations on both perp and vault both individually as well as simultaneously (mint2, redeem2 and rebalance).
All Perp operations now run through the balancer. We also move away from the lazy state update model (previously we used to call
updateState
before every action). The absolute supply caps have been removed. The naming convention for all read interface functions have been updated (previously they were prepended with "get", to indicate a lazy state update before reading).All vault operations now run through the balancer. We allow the balancer to deposit Z tranches from the current deposit bond to mint vault notes (used by mint2). The updated swap logic limits the vault liquidity from getting too high or too low based on the maximum capital required to rollover the entire spot supply. The rollover vault also handles an edge case that arises from redeeming a bond fully before maturity.
The latest version of the tranche contracts expose a
bond.collateralBalance()
method on the button-wood bonds. This method accounts for the total collateral which is deposited into the bond through the deposit function and discounts any collateral which is transferred directly into the bond (erroneously or maliciously). We update all instances where we calculate the bond's collateral balance to usecollateralBalance
method instead oftoken.balanceOf(bond)