-
Notifications
You must be signed in to change notification settings - Fork 53
Feature/hotfixes and tests #351
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
base: feat/eth-eb-merge
Are you sure you want to change the base?
Conversation
* feat: remove eb from `getBalance` getters * feat: introduce `getEffectiveBalance` getter * chore: update abis
|
in validateClusterOnRegistration you have I can technically migrate without calling migrate function. I can liquidate myself / remove validators (clusterData == bytes32(0)) then register a validator and i will migrate. BUt since i didnt officially migrate im not sure we will pay the operators correctly i would assume we pay the operators ssv but with amounts of .00x as in the accounting would pay eth balances but in ssv. This needs to be reviewed to make sure its true, tight unit testing here would be great |
|
i see we have isLiquidatable and isLiquidatableWithEB Also isLiquidatable get call should prob call isLiquidatableWithEB internally |
|
in updateClusterOperators we have shouldnt it be += as increaseValidatorCount = true?? |
|
in _updateOperatorVUnits you have im not 100% understanding but just want to make sure deltaAbs can never be higher than seb.operatorEthVUnits[operatorId] right? |
|
in getBalanceSSV i see you have shouldnt it be cluster.updateBalance? Lots of other places have this logic too i guess just make sure they also call updateBalance instead of updateBalanceWithEB as i didnt check all places that should have this |
|
I think maybe theres some very edge case race condition, in updateBalanceWithEB you have Now if the oracle calls to update some cluster by accident calls twice same update func on same cluster really fast in same block, i dont know if the getVunits will give old or updated vunits and how will it apply to the balance. Maybe theres nothing wrong here i think you guys should verify though |
|
migrateClusterToETH has 2 major issues first is already stated before using isLiquidatable instead of the eth one Second is you get the burn rate at the beginning then when you go to see if its liquidatable you are not using the eth amounts!!! you are using the old ssv burn rate yikes :) |
|
in migrateClusterToETH there can be small enhancement basically no matter what you call updateClusterOperators now when it comes to dao you have you shouldnt need to call updateClusterOperators if isLiquidated = true , just like the dao the operators should already be updated with correct accounting I know you might say updateClusterOperators returns burnRate and we need that but refer to bug above you dont need the ssv burn rate for any reasons moving forward. |
dao unit tests added
Operators unit tests added
liquidate and withdrawal operator earnings unit tests added
…bs/ssv-network into feature/hotfixes-and-tests
|
i see you have 2 storages for clusterData (ssv and eth) I thought that eth cluster data just overrides ssv data, this way brings unnecessary gas costs IMO. Maybe i am not seeing full picture. (i put this comment before but deleted it by accident) |
Add custom reentrancy guard lib and abstract wrapper mirroring OZ sto…
@andrew-blox This flow can not be performed because of these reasons:
|
No description provided.