Skip to content

Conversation

@naddison36
Copy link
Collaborator

@naddison36 naddison36 commented Jul 30, 2024

Contract changes

  • Refactor _checkBalance on OETHVaultCore to reuse the withdrawal queue adjustment logic in _totalValue()

Code Change Checklist

To be completed before internal review begins:

  • The contract code is complete
  • Executable deployment file
  • Fork tests that test after the deployment file runs
  • Unit tests *if needed
  • The owner has done a full checklist review of the code + tests

Internal review:

  • Two approvals by internal reviewers

sparrowDom and others added 30 commits April 4, 2024 22:44
* Update Natspec

* Generated docs for native eth strategy

* Prettier and linter
Fixed spelling of ValidatorAccountant events
Implemented depositSSV

* Updated Natspec
Moved MAX_STAKE on ValidatorAccountant to a constant

* Removed strategist from strategy as its already maintained in the Vault

* Fix compilation error

* Fix unit tests

* fix linter
* Added OETH process diagram with functions calls for native staking

* Native Staking Strategy now hold consensus rewards at ETH
FeeAccumulator now holds execution rewards as ETH
Removed WETH immutable from FeeAccumulator
Converted custom errors back to require with string
collect rewards now converts ETH to WETH at harvest
checkBalance is now validators * 32 plus WETH balance from deposits
Renamed beaconChainRewardsWETH to consensusRewards
Fixed bug in stakeETH that was converting all WETH to ETH
* Fixed native staking deployment since the strategist is got from the vault

* Refactor of some Native Staking events
Refactor of Native Staking unit tests

* Renamed AccountingBeaconChainRewards to AccountingConsensusRewards
Accounting updated to handle zero ETH from the beacon chain

* fixed bug not accounting for previous consensus rewards
Blow fuse if ETH balance < previous consensus rewards

* Pause collectRewardTokens and doAccounting on accounting failure.

Validated asset on deposit to Native Staking Strategy.

Moved depositSSV from NativeStakingSSVStrategy to ValidatorRegistrator

moved onlyStrategist modified and VAULT_ADDRESS immutable from ValidatorAccountant to ValidatorRegistrator

manuallyFixAccounting changed to use whenPaused modifier

made fuseIntervalEnd inclusive

Natspec updates

refactoring of native staking unit tests
* add basic steps to deploy OETH to holesky

* prettier

* minor change

* holesky deployment ifles
holesky deployment files

* add holesky deployment files

* minor fix

* minor fixes

* make the fork tests run on Holesky

* add some more tests

* testing SSV staking on Holesky

* refactor where deployment files are located

* more progress on deployment

* add deposit to validator deployment files

* remove log

* prettier

* lint

* move file

* SSV cluster info (#2036)

* add ability to fetch SSV cluster information

* prettier
* manuallyFixAccounting now uses delta values and only callable by the strategist
manuallyFixAccounting calls doAccounting to check the fuse is still not blown
Removed accountingGovernor

* Added pauseOnFail param to internal _doAccounting
Increased the allowed delta values of manuallyFixAccounting

* ran prettier
* manuallyFixAccounting now uses delta values and only callable by the strategist
manuallyFixAccounting calls doAccounting to check the fuse is still not blown
Removed accountingGovernor

* Added pauseOnFail param to internal _doAccounting
Increased the allowed delta values of manuallyFixAccounting

* ran prettier

* Added Defender Relayer for validator registrator
Added ssv utils to get cluster data
Added native staking fork tests

* Removed now redundant IWETH9 import

* moved more logic into native staking fixture

* Removed unused imports

* fix native staking unit tests

* Fail accounting if activeDepositedValidators < fullyWithdrawnValidators
Changed Harvester to transfer WETH to dripper
Added more mainnet fork tests for native staking

* Updated the OETH value flows

* Added governable Hardhat tasks
Created a resolveContract util

* deconstruct params for Hardhat tasks

* WIP Hardhat tasks for validator registration

* Added depositSSV HH task

* Updated OETH contract dependency diagram

* Update to diagrams

* mini fixes

* fix bug and minor test improvement

* update yarn fulie

* unify the holesky and the mainnet fork tests

* prettier

* re-deploy holesky native staking strategy (#2046)

* test updates

* also re-deploy the harvester

* upgrade harvester as well

* fix test

* fix upgrade script and correct the bug in deploy actions

* Deployed new Native Staking strategy including the proxy

* Added Hardhat tasks for generic strategy functions

* remove nativeStakingSSVStrategyProxy from js addresses file

---------

Co-authored-by: Domen Grabec <[email protected]>
@github-actions
Copy link

Warnings
⚠️ 👀 This PR needs at least 2 reviewers

Generated by 🚫 dangerJS against 2e4c8d9

@codecov
Copy link

codecov bot commented Jul 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 58.95%. Comparing base (38a4b40) to head (2e4c8d9).

Additional details and impacted files
@@                Coverage Diff                 @@
##           nicka/oeth-arm    #2155      +/-   ##
==================================================
- Coverage           58.97%   58.95%   -0.03%     
==================================================
  Files                  69       69              
  Lines                3476     3474       -2     
  Branches              900      680     -220     
==================================================
- Hits                 2050     2048       -2     
  Misses               1423     1423              
  Partials                3        3              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

}

// Get the WETH balance in the vault and all strategies less any WETH reserved for the withdrawal queue
return _totalValue();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sparrowDom
sparrowDom previously approved these changes Jul 30, 2024
Copy link
Member

@sparrowDom sparrowDom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Base automatically changed from nicka/oeth-arm to master August 1, 2024 23:01
@naddison36 naddison36 dismissed sparrowDom’s stale review August 1, 2024 23:01

The base branch was changed.

@naddison36
Copy link
Collaborator Author

Closing as this has been replaced by #2163

@naddison36 naddison36 closed this Aug 2, 2024
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.

5 participants