-
Notifications
You must be signed in to change notification settings - Fork 38
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: v3.0.3 #201
feat: v3.0.3 #201
Conversation
* build: allow max uint * fix: lint version * forge install: openzeppelin-contracts v4.9.5 * chore: oz sub module * forge install: tokenized-strategy v3.0.2 * test: fix foundry tests
* feat: set name and symbol * chore: spech
* fix: config override * chore: manual setup * fix: requirements * fix: ape version * chore: rebase
* feat: report on self * chore: comment * chore: add back
* build: auto allocate * build: dont revert debt increase * chore: remove decrease revert * chore: update spech * chore: spech * chore: comments * fix: event
@param name The new name for the vault. | ||
""" | ||
assert msg.sender == self.role_manager, "not allowed" | ||
self.name = name |
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 would emit the event here: UpdateName() so we can tract changes.
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.
event seems unnecessary since the name is not expected to be updated often or needed to be stored locally. Understanding the current state is also not dependent on knowing when the name was updated.
@param symbol The new name for the vault. | ||
""" | ||
assert msg.sender == self.role_manager, "not allowed" | ||
self.symbol = symbol |
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.
Add event: UpdateSymbol
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.
same here #201 (comment)
self.name = name | ||
|
||
@external | ||
def setSymbol(symbol: String[32]): |
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.
Could changing the symbol value break portfolio trackers like debank? I hope they track everything by address but maybe they cache symbol and name. Just to keep in mind if we get questions after changing the symbol.
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.
It may break some setups, but should be easy to fix.
It is the same functionality as the v2 vaults have and has been used in the past so i would assume people have a way to deal with it.
contracts/VaultV3.vy
Outdated
else: | ||
self.total_idle -= loss |
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.
Is this case possible? It means that: self.total_idle > ERC20(_asset).balanceOf(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.
It should not be no. Since we always update total_idle based on the actual amounts even in the case of rounding problems
But seems we might as well add it in just in case.
Co-authored-by: spalen0 <[email protected]>
* feat: pack pf config * chore: remove event * chore: formatting * test: interface updates * chore: comments
* forge install: openzeppelin-contracts v4.9.5 * chore: oz sub module * test: fix foundry tests * fix: deposit flow * fix: zero total assets * fix: flow * test: full loss * chore: comment * test: add invariants * fix: comments * fix: user msg sender * fix: comments * fix: comment
Description
process_report
in order to account for airdropped tokens d2c57b2auto_allocate
flag that iftrue
will push as much debt as possible to the first strategy in the queue 5bc4ad5Governance
contract d268bbdChecklist