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

feat: version 3.0.2 #188

Merged
merged 16 commits into from
Feb 5, 2024
Merged

feat: version 3.0.2 #188

merged 16 commits into from
Feb 5, 2024

Conversation

Schlagonia
Copy link
Collaborator

@Schlagonia Schlagonia commented Dec 27, 2023

Description

Updates for v3.0.2!

Changes:

  • Removal of increase and decrease allowance.
  • Removal of the ability to open roles.
  • Use cloning instead of blueprints for cheaper deployments
  • Add option max_loss parameter for debt updates.
  • Add options add_to_queue flag when adding strategies.
  • process_report improvements to only mint or burn to self once per report.
  • Add foundry based 4626 property tests.

Checklist

  • I have run vyper and solidity linting
  • I have run the tests on my machine
  • I have followed commitlint guidelines
  • I have rebased my changes to the latest version of the main branch

Schlagonia and others added 13 commits January 7, 2024 10:10
* 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)
Copy link
Collaborator

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?

Copy link
Collaborator Author

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
Copy link
Collaborator

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.

Copy link
Collaborator Author

@Schlagonia Schlagonia Feb 5, 2024

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.

@wavey0x
Copy link
Collaborator

wavey0x commented Feb 5, 2024

lgtm

@Schlagonia Schlagonia merged commit f869f7e into master Feb 5, 2024
8 checks passed
@Schlagonia Schlagonia deleted the 3.0.2 branch February 5, 2024 01:42
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.

4 participants