-
Notifications
You must be signed in to change notification settings - Fork 40
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: version 3.0.2 #188
feat: version 3.0.2 #188
Conversation
* chore: remove increase and decrease allowances * chore: remove open roles
* feat: use cloning for vaults * fix: scripts * chore: fix interfaces * chore: lower case factory
* fix: redeem corrections * chore: dont burn zero shares * fix: use updated strategy storage * fix: rebase * chore: bump oz version * fix: oz 4626 fix * fix: lossy test * fix: round down in max redeem * fix: comment
* chore: setup foundry test * chore: add remappings * forge install: erc4626-tests * test: add foundry fuzzing tests * fix: max uint deposit limit * fix: test strategy * fix: foundry runner * fix: clamp overflow * fix: default tests * chore: clean up linting * fix: new strategy version
* test: for no locking * chore: cheaper reports * chore: track current debt * chore: lower unlocked gas * fix: set to 0 * build: only burn or mint (#193) * build: only burn or mint * build: target end supply * chore: comments * fix: comments * fix: strategy changes * chore: rebase
|
||
# The max amount the protocol fee can be set to. | ||
MAX_FEE_BPS: constant(uint16) = 5_000 # 50% | ||
|
||
# The address that all newly deployed vaults are based from. | ||
VAULT_BLUEPRINT: immutable(address) | ||
VAULT_ORIGINAL: immutable(address) |
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.
did you consider VAULT_IMPLEMENTATION
?
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 did not.
I guess that would be more accurate.
Went with language more associated with just cloning than proxies
I guess Implementation may be confusing, and seem like its possible to upgrade it.
asset: ERC20, | ||
def __init__(): | ||
# Set `asset` so it cannot be re-initialized. | ||
self.asset = self |
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.
the idea here is that the implementation should never be a vault itself right?
originally was thinking it'd be better to use a different burner address (e.g. 0xFFF
) , but upon further thought i think there's no issues that come from self
, because doing so would effectively break the vault and prevent it from ever having a vault of its own.
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.
asset is used as the value to check during initialization to make sure it can't be re-initialized
So just setting its to a non-zero value in the constructor stops the 'original' from being initialized at any point. Essentially making it worthless and just a dummy version to use only for cloning.
lgtm |
Description
Updates for v3.0.2!
Changes:
max_loss
parameter for debt updates.add_to_queue
flag when adding strategies.Checklist