-
Notifications
You must be signed in to change notification settings - Fork 4
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
Internal review #21
Closed
Closed
Internal review #21
Changes from 1 commit
Commits
Show all changes
366 commits
Select commit
Hold shift + click to select a range
eac4724
feat: opt in and out of strategy rewards
haythemsellami b34d179
fix
haythemsellami 079fc00
chore: lint
haythemsellami 8656756
feat: claimStrategyReward()
haythemsellami 3173f75
Merge pull request #13 from euler-xyz/feat/fees
haythemsellami aa9c869
Merge branch 'main' into feat/opt-in-strategy-rewards
haythemsellami 266e804
chore: add natspec
haythemsellami 700111d
test:
haythemsellami fdfdc17
chore: lint
haythemsellami ced8cc3
Merge pull request #14 from euler-xyz/feat/opt-in-strategy-rewards
haythemsellami 10a6db8
feat: socialize negative yield
haythemsellami 61a19e3
fix and tests'
haythemsellami 5c4746b
decrease totalAllocated
haythemsellami 034c2e5
fix
haythemsellami 0262537
more gulping tests
haythemsellami 0ce8f65
clean
haythemsellami d55d61b
more tests
haythemsellami 970ead0
clean
haythemsellami 69f74df
Merge pull request #15 from euler-xyz/feat/negative-yield-socialization
haythemsellami 9545b5f
Add revert case
haythemsellami 62cef9e
Push to withdrawalQueue
haythemsellami 2eb3b23
Check that strategy is ERC4626
haythemsellami 3de4aba
use SafeCast; other fixes
haythemsellami 396afda
refactor _withdraw()
haythemsellami 3320087
use max functions; ignore balance tracker hooks in self-transfer
haythemsellami c065a0d
update timestamp check
haythemsellami 8ea4e4d
fix
haythemsellami f76a87a
fix
haythemsellami 7d6186b
Merge pull request #17 from euler-xyz/fix/k-review
haythemsellami 9956613
feat: add events
haythemsellami 648affd
fix build
haythemsellami 019ff45
add more events
haythemsellami 6052b0d
Merge pull request #18 from euler-xyz/events
haythemsellami e5f9f3a
feat: init cap impl
haythemsellami e171136
add tests
haythemsellami 2877e68
test: more tests
haythemsellami 6e8192a
chore: natspec
haythemsellami 40e0a02
Merge pull request #19 from euler-xyz/feat/balance-cap
haythemsellami fe7d604
feat: init hooks
haythemsellami c1fde1e
chore: lint
haythemsellami 68457f0
feat: hooks implementation
haythemsellami 981f2a2
chore: clean & rename
haythemsellami a09c8a3
test: init tests
haythemsellami 43455a0
tests
haythemsellami 3b0fa7f
chore: natspec
haythemsellami 3bab3fa
chore: add reference
haythemsellami c8ab40b
add Rebalancer.sol
haythemsellami 707ed8f
remove modifier
haythemsellami 6791fad
more refactoring
haythemsellami a9631b7
Merge pull request #20 from euler-xyz/feat/hooks
haythemsellami 7982101
Merge branch 'main' into reduce-bytecode-size
haythemsellami fdd19a2
chore: add bytecode size checks to CI
haythemsellami 60356e3
move event
haythemsellami 88daa43
remove rebalance hook
haythemsellami 32e39cf
refactor
haythemsellami a436765
add event
haythemsellami b0f8889
remove cachedBalanceTracker
haythemsellami 43f60e6
remove duplicate params
haythemsellami f591ebf
minor gas opt; remove account status check
haythemsellami b29462b
more fixes
haythemsellami ec792d7
clean
haythemsellami aa11e27
Merge pull request #22 from euler-xyz/reduce-bytecode-size
haythemsellami f3c2cf5
Merge branch 'main' into k-review2
haythemsellami 6b7636e
refactor setHooksConfig()
haythemsellami b38c925
feat: pack hooks config in uint256
haythemsellami f5c5bd1
uncomment asserts
haythemsellami e43cff0
refactor
haythemsellami c048e42
revert on duplicate initial strategies
haythemsellami b0232f3
Merge pull request #24 from euler-xyz/k-review2
haythemsellami 199ca17
accrue performance fee in underlying asset
haythemsellami d1329a3
lint
haythemsellami 42832ad
use > instead of !=
haythemsellami 82d3431
test: add asserts
haythemsellami 46fc6e9
Merge pull request #25 from euler-xyz/update-performance-fee
haythemsellami a605265
refactor
haythemsellami 81f619c
add files
haythemsellami f7886c3
forge install: openzeppelin-contracts-upgradeable
haythemsellami d019379
refactor
haythemsellami 9ebd543
forge install: openzeppelin-contracts
haythemsellami 0d8133c
unstructured storage
haythemsellami 2ed5a5f
working version
haythemsellami 8785df0
working version
haythemsellami 9dd3080
working version
haythemsellami 529aad6
working version
haythemsellami d6cbb57
working version
haythemsellami 18756aa
working version
haythemsellami 3282709
bytecode under limit
haythemsellami c6f29f2
clean
haythemsellami 6e1a8fd
chore: rename roleS
haythemsellami 133865d
add access control & last touches
haythemsellami 7eaf524
Merge pull request #27 from euler-xyz/feat/clones
haythemsellami c4d83c2
chore: uncomment tests
haythemsellami 680dd20
chore: natspec and renames
haythemsellami a475294
chore: renames
haythemsellami 4c3c078
Merge pull request #26 from euler-xyz/refactor/withdraw
haythemsellami 75fcb7f
fix RewardStreams integration
haythemsellami de41b89
clean
haythemsellami d864756
add natspec and use()
haythemsellami b09b8d8
clean
haythemsellami 0c66c13
Merge pull request #28 from euler-xyz/fix/reward-streams-integration
haythemsellami da33430
update withdraw and redeem
haythemsellami 5c726a5
Merge pull request #29 from euler-xyz/improve/withdraw
haythemsellami 4a415dd
refactor
haythemsellami cf47798
feat: net yield/loss
haythemsellami 54c5135
refactor
haythemsellami 2661030
refactor and add tests
haythemsellami 00c75b0
clean
haythemsellami 59e8da5
clean
haythemsellami 854f5e2
clean
haythemsellami 293dc42
clean
haythemsellami 1c6f7ff
Merge pull request #30 from euler-xyz/improve/harvest
haythemsellami c454c6e
rename
haythemsellami 49fc1eb
separate core from plugin
haythemsellami b146b63
Merge pull request #31 from euler-xyz/chore/rename
haythemsellami e09ae62
remove dependency to the EVC
haythemsellami 7a63756
feat: add setters for plugins
haythemsellami e4eb399
Merge pull request #32 from euler-xyz/plugins/setters
haythemsellami 624b79e
forge install: erc4626-tests
haythemsellami 5fbd9d8
test: a16z erc4626 property tests
haythemsellami bfbe585
clean
haythemsellami 76bef1d
Merge pull request #33 from euler-xyz/test/a16z-tests
haythemsellami f8269f8
init basic invariants setup
haythemsellami c28a76c
improve setup; more invariants; fixes
haythemsellami 28a1622
chore: add invariants run to github actions
haythemsellami 980d117
more invariants; no removing strategy with allocated amount
haythemsellami d32af2a
lint:
haythemsellami 1f23c58
fix CI
haythemsellami 9c91401
more invariants; fix: reset cap when removing strategy
haythemsellami 6ee42bc
lint
haythemsellami 361e930
invariants
haythemsellami 95a5896
more invariants
haythemsellami 4a9c003
add gulp to handler
haythemsellami e61207f
fix: minor comments from certora
haythemsellami bb260c2
forge install: properties
haythemsellami 6ef8f03
add echidna properties tests
haythemsellami e0d0e5c
update echidna config
haythemsellami 49e5891
update echidna config
haythemsellami 24db103
update echidna config
haythemsellami e8ed3a9
update echidna config
haythemsellami 54fc8ff
update echidna config
haythemsellami 183e275
update echidna config
haythemsellami 8ee4b59
update echidna config
haythemsellami 3eba2f3
update
haythemsellami 25a2739
update
haythemsellami 327729e
invariants: gulp
haythemsellami 788a096
update config
haythemsellami 22552d5
Merge pull request #34 from euler-xyz/invariants-test
haythemsellami 9369073
rename to Euler Aggregation Vault
haythemsellami 9f7e14e
Merge pull request #35 from euler-xyz/rename
haythemsellami 0994bab
gulp only if min amount is minted
haythemsellami 6b7546f
add invariant
haythemsellami 4bda9ba
gulp fuzzing
haythemsellami 59c4590
Merge pull request #36 from euler-xyz/fix/min-amount-to-gulp
haythemsellami 85a99db
test: gulp fuzzing
haythemsellami 0d16a98
add invariant and comments
haythemsellami cb4951b
feat: whitelisted withdrawal queue
haythemsellami 298c6ab
fix
haythemsellami 79788a7
clean; add events
haythemsellami d0d1c96
add slither
haythemsellami d889ad0
clean
haythemsellami a88bc5a
clean
haythemsellami 384afb8
Merge pull request #37 from euler-xyz/feat/whitelisted-withdrawal-que…
haythemsellami 1fc4174
chore: delete slither.db.json
haythemsellami 04e1fea
clean; add invariants tests
haythemsellami d29a1ef
Merge pull request #38 from euler-xyz/clean
haythemsellami da4f193
feat: do not harvest or rebalance in-active strategies
haythemsellami 9c43041
chore: lint
haythemsellami 735fdd0
circuit-breaker
haythemsellami 2faacf8
chore: lint
haythemsellami 3aeadbf
merge strategy added and remover into strategy operator
haythemsellami 9522d10
add startegy status
haythemsellami 20bfc1c
refactor
haythemsellami bafa48e
deduct losses when set strategy in emergency mode
haythemsellami 1093fd8
fix
haythemsellami 2abe33a
refactor
haythemsellami 80b8a19
improve invariants
haythemsellami cff5495
lint
haythemsellami 3b2ff39
more tests
haythemsellami 599a5a2
rename to StrategyModule; add tests
haythemsellami 15c965f
chore: lint
haythemsellami 6708cb0
set allocated to maxWithdraw()
haythemsellami c993480
Merge pull request #39 from euler-xyz/feat/circuit-breaker
haythemsellami f7cc381
fix fuzz tests
haythemsellami 5a30dbb
fix role setup
haythemsellami 18bb998
remove --sizes from CI
haythemsellami efa5eda
test: voting power invariant
haythemsellami fc2fcad
Rebalance module
haythemsellami ba90148
refactor: remove Rebalancer plugin and add Rebalance module
haythemsellami 3fe8e39
clean
haythemsellami 299949e
update modifiers order
haythemsellami daaa6bd
add _gulp() into Shared.sol
haythemsellami 55ea44f
remove whitelisting of WithdrawalQueue
haythemsellami f61b867
Refactor factory
haythemsellami 0c95eb2
chore: add echidna to CI
haythemsellami 94b5414
add gulping
haythemsellami 585bce3
fix
haythemsellami 0ab9e1c
update
haythemsellami 45ff916
fix invariant_votingPower
haythemsellami c3fd0d1
fix
haythemsellami ba95957
chore: update CI
haythemsellami 668c73e
chore: update CI
haythemsellami f9fe32a
chore: update CI
haythemsellami 2e52990
chore: update CI
haythemsellami fce8181
chore: update CI
haythemsellami f53a553
use default testLimit
haythemsellami 6af81ca
Refactor factory
haythemsellami 4bc449c
refactor
haythemsellami 4c93aec
fit Strategy struct in one slot
haythemsellami d8b9144
refactor
haythemsellami 07f0cd4
Merge pull request #43 from euler-xyz/fix/refactor-codebase
haythemsellami 5052879
add sizes check to CI
haythemsellami 5507358
clean
haythemsellami 2e0e155
Merge pull request #41 from euler-xyz/feat/erc20votes
haythemsellami d8b61d5
Merge branch 'main' into chore/add-echidna-CI
haythemsellami db658b2
Merge pull request #44 from euler-xyz/chore/add-echidna-CI
haythemsellami d581e67
Remove plugin
haythemsellami 8a5283a
import WithdrawalQueueModule
haythemsellami bde1183
clean
haythemsellami 7392b00
refactor
haythemsellami a632098
refactor hooks storage
haythemsellami d74f60e
Merge pull request #45 from euler-xyz/remove-plugin
haythemsellami 3de0031
Refactor _deductLoss()
haythemsellami a18db08
clean
haythemsellami 4ee8e24
lint
haythemsellami 44b7b47
clean
haythemsellami 9a6c460
clean
haythemsellami b808a39
Merge pull request #46 from euler-xyz/refactor-deduct-loss
haythemsellami fcade52
Feat: mint fee shares
haythemsellami 5e3f1bd
fix test:
haythemsellami 7c26e98
fix invariants
haythemsellami 5c05f3d
fix
haythemsellami b8f1162
fix
haythemsellami 1237522
fix
haythemsellami a50bfef
fix
haythemsellami 7751a08
fix
haythemsellami 7041292
fix
haythemsellami cf6851c
Merge pull request #48 from euler-xyz/fix/ci
haythemsellami 25ea7d0
chore: commentS
haythemsellami 2bfb7a9
Merge pull request #47 from euler-xyz/feat/mint-fee
haythemsellami 53de3ac
Change performanceFee to uint96
haythemsellami a0c696f
feat: harvest cooldown
haythemsellami f4c2caf
remove gulp after withdraW
haythemsellami e660347
improve invariants
haythemsellami 1a5ee69
update test:
haythemsellami ea8f01e
Merge pull request #49 from euler-xyz/feat/harvest-interval
haythemsellami 1fe9f9d
chore: update EVC dependency
haythemsellami 9be83cd
feat: EVC integration
haythemsellami 542d1d3
Add onlyEVCAccountOwner() modifier
haythemsellami 4fcc7fe
chore: update dependency
haythemsellami 4f3c54b
Merge pull request #50 from euler-xyz/evc-integration
haythemsellami File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
set allocated to maxWithdraw()
- Loading branch information
commit 6708cb06d2fb50af2e159c78d8f6dae37503881b
There are no files selected for viewing
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
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
Oops, something went wrong.
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.
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.
when the strategy changes the state from emergency to active, the total allocated amount immediately becomes gulpable. there's no symmetry in this behavior because when changing the state from active to emergency, everyone get an immediate hit due to loss socialization. I don't know if it's good or bad, or what we should expect to happen here. just voicing my observations
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.
Yeah that was intended, I think this should be okay as this is a rare scenario where the agg vault's guardian exit a strategy, and then somehow the strategy is fixed through upgrade or what no, and then re-use it again.
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 problem is that you're not returning the assets to the rightful owners but rather to anyone depositing at the moment through gulping. if I see that some sizeable strategy goes from emergency to active state, I am incentivized to deposit for the two weeks of gulp duration because it might mean quite a juicy yield at the expense of the rightful owners
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.
Yeah it kinda hit the previous depositors, it is either this or accounting the strategy deposited directly into totalAssetsDeposited and spike the exchange rate.
I guess this is still fine, it is like adding a new strategy, rebalance into it, and this strategy ends up returning a juicy yield, it will be gulpable and will incentivise extra deposits.
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.
One other thing I thought about, is to instantly add the amount that was socialised(or all if maxWithdraw() at toggling back to normal is less than that) to totalAssetsDeposited, and gulp the rest, so it is basically repaying old depositors to what they lost when toggling to emergency... but still some new depositors can just deposit between the toggle to emergency and toggle back to normal, and also adds a bit more complexity...
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.
unfortunately, it would be prone to front running too