-
Notifications
You must be signed in to change notification settings - Fork 194
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: Vaults #874
Draft
tamtamchik
wants to merge
336
commits into
master
Choose a base branch
from
feat/vaults
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
feat: Vaults #874
Changes from all commits
Commits
Show all changes
336 commits
Select commit
Hold shift + click to select a range
e47bba3
chore: stub for vaults tests
tamtamchik dc31abc
chore: fix accounting roles init
tamtamchik c704627
Merge pull request #13 from lidofinance/feat/report-vaults
folkyatina 2c810dd
fix(vaults): leaked ncf
folkyatina 26962d1
feat(vaults): split Hub and Liquidity interfaces
folkyatina 57a5ec3
feat(vaults): add placeholder for triggerable exit
folkyatina b4ea4bf
fix(accounting): fees calculation
folkyatina 705fe8f
fix(accounting): fix for the fix for the fix of fee calculation
folkyatina bf501da
fix(accounting): adjust naming
folkyatina 6ae89d4
feat(accounting): treasury fees for vaults
folkyatina 2fbbf69
fix(accounting): improve naming
folkyatina 79095f5
feat(vaults): scetch of NO fees collection
folkyatina 178c43f
fix(accounting): principalCLBalance calculation
folkyatina cdd5283
fix(accounting): fix scratch deploy
folkyatina 4b5ebba
chore: fix integration tests
folkyatina 9af2cb7
chore: remove old acceptance test
folkyatina 85bb209
fix: treasury fee accounting
folkyatina 911bc3e
fix(accounting): max -> min in for vaults fee
folkyatina 450a362
fix(accounting): fix node operator fee
folkyatina a9539a2
feat(vaults): make vaults operate with StETH not shares
folkyatina 150ebd1
fix(vaults): fix VaultHub data structure
folkyatina 966facf
feat(vaults): make mint and rebalance payable
folkyatina 461aa2b
feat(vaults): optimize storage
folkyatina df22fbe
feat(vaults): add AUM-based vault owners fee
folkyatina de83717
feat(vaults): reserve accumulated fees
folkyatina ec4c170
fix(vaults): fix report if no vaults
folkyatina 9247e33
ci: fix docker image
tamtamchik 4d78887
Merge pull request #15 from lidofinance/vault-fees
folkyatina eb6789e
feat(oracle): get rid of simulatedShareRate reporting
folkyatina 9736ca1
chore: fix integration runner
tamtamchik 945b779
Add factory
loga4 45daed6
Merge remote-tracking branch 'upstream/master'
tamtamchik 5281ce6
Merge branch 'main' into minting
tamtamchik 9c89ac6
Merge branch 'minting' into feat/no-simulated-rate
tamtamchik ae041f0
Merge remote-tracking branch 'upstream/master'
tamtamchik a1a407d
Merge branch 'main' into minting
tamtamchik fe23999
Merge branch 'minting' into feat/no-simulated-rate
tamtamchik b4a16c8
fix: errors in TS
tamtamchik c9f344f
chore: add support for staking pause
tamtamchik 9f12f43
chore: update dependencies
tamtamchik 5cbd407
chore: fix claimNodeOperatorFee permissions
tamtamchik 13722bd
fix: burning shares
tamtamchik f404e12
chore: allow permissionless vault disconnect
tamtamchik 78f7d30
chore: fix scratch deploy
tamtamchik 0c42b56
chore: vaults happy path with context updates
tamtamchik e5da161
chore: unify some test constants
tamtamchik b5efdcb
factory update
loga4 0141020
fix: ci cleanup
tamtamchik 71b5741
chore: treeshake oz-ownable-upgradeable
mymphe bebba07
feat: move vaults to 0.8.25
mymphe dfe7500
chore: remove vscode config
folkyatina 2964b26
fix: remove simulatedShareRate checks from sanity checker
folkyatina 1bc770a
fix: add some report checks
folkyatina 7fdf060
chore: streamline report simulation flow
folkyatina c278cea
fix: more specific view method for simulation
folkyatina ad40013
Merge branch 'feat/no-simulated-rate' into feat/no-simulated-rate-intβ¦
tamtamchik aca1078
fix: scratch
tamtamchik 8edd98e
feat: vault delegation
mymphe 3053360
docs: note on 0.8.25
mymphe 4cb435d
fix: ts
tamtamchik ec11ab1
fix: oracleReportSanityChecker unit tests
tamtamchik 932838e
fix: accounting oracle deploy
tamtamchik c396eec
style: fix naming
tamtamchik b09817d
chore: changes after review
tamtamchik 33fe1eb
feat: use npm oz instead of local
mymphe f3051d8
feat: extract fees WIP
mymphe b2e79bf
Merge pull request #21 from lidofinance/feat/no-simulated-rate-integrβ¦
tamtamchik 93ec0c6
refactor: base vault
mymphe a55edac
fix: some renaming
mymphe b6f781e
chore: add soft limits for external balance
tamtamchik f84b2a3
chore: simplify code a bit
tamtamchik 156d82d
refactor: some renames
mymphe 15633e9
feat: extract management fee wip
mymphe 4aa7e94
fix: error name
mymphe dc2c78e
feat: max subscriptions
mymphe b45e716
feat: subscribe to vault report
mymphe b94d96b
fix: remove unused error
mymphe 7ed7790
feat: claim mgment due
mymphe e052a3f
refactoring: renaming
mymphe 151649a
refactor: use single interface
mymphe 2994fff
chore: update
tamtamchik 56ab8bc
build(deps): bump secp256k1 from 4.0.3 to 4.0.4
dependabot[bot] e3aa1d2
test(burner): restore 100% coverage
tamtamchik 23b4af5
chore: better naming
tamtamchik 70bc869
test(steth): restore 100% coverage
tamtamchik 3d930c5
test: vault setup
mymphe 8d66a87
chore: use local OZ upgradeable
mymphe 5edbeb5
fix: reset formatting
mymphe c8318d0
refactor: combine into a single vault
mymphe 4c6d8a6
refactor: use single ivault interface
mymphe 17e7765
refactor(hub): use single vault interface
mymphe b881df3
refactor(hub): extract hub interface
mymphe 68c74db
chore: fix some errors
tamtamchik d4c9deb
chore: fix some errors for contract verifications
tamtamchik 897e48a
refactor: safecast and renames
mymphe b7d3062
feat: fundAndProceed modifier
mymphe ff62933
fix: onReport hook
mymphe c509f1d
refactor: some renaming
mymphe e5eac5e
test: set up vault test
mymphe 24c7410
refactor: rename Vault->StakingVault
mymphe 49afced
fix: restore holesky state file
tamtamchik a98f97e
chore: move testnet defaults
tamtamchik 878e619
chore: better naming
tamtamchik 2a82f01
Merge pull request #27 from lidofinance/feat/devnet-0-deploy
tamtamchik 3e55a97
Merge pull request #26 from lidofinance/feat/tests
tamtamchik d64faa8
refactor: use vaulthub itself instead of interface
mymphe 7e28470
test: fund wip
mymphe ab9f0f0
feat: transfer ownership to new delegator
mymphe 9f3761e
chore: devnet 0 deployment
tamtamchik e6e7a2c
chore: add support for running integration tests on devnet
tamtamchik a80d3f9
ci: run integration on holesky devnet 0
tamtamchik e590772
Merge pull request #28 from lidofinance/test/holesky
tamtamchik 33047cc
chore: better naming and more comments
folkyatina 06ade6e
fix: fix tests
folkyatina a307d1b
Merge pull request #24 from lidofinance/feat/external-mint-limits
folkyatina f89a394
Merge pull request #16 from lidofinance/feat/no-simulated-rate
folkyatina 03174d0
chore: cleanup postTokenRebaseReceiver
tamtamchik cac61bd
chore: extract IPostTokenRebaseReceiver
folkyatina fa14fd5
fix: tests
tamtamchik 813c890
Merge pull request #29 from lidofinance/feat/cleanup
tamtamchik 79dabfd
fix: remove fee constants
mymphe 7aab2c3
fix: check fees
mymphe a7b2421
fix: improve naming
mymphe 473fd70
refactor: use raw bytes for roles
mymphe 325649c
refactor: a bunch of renames
mymphe b7201d2
feat: update vault interface
mymphe 2d4baad
feat: update
mymphe 7d42361
Merge branch 'minting' of https://github.com/lidofinance/core-stealthβ¦
mymphe 46e4816
Merge branch 'vault-ownable-upgradeable' into feat/factory
loga4 2a4539a
feat: migrate accounting to 0825
mymphe a234144
feat: extract interfaces
mymphe 701bba4
feat: mimic contract
mymphe 17513b0
fix: sync with parent branch
mymphe 9790510
factory update
loga4 f86d7bd
feat: reserve ratio
folkyatina 033d272
Merge branch 'minting' of https://github.com/lidofinance/core-stealthβ¦
mymphe 1322877
fix: scratch
tamtamchik 73f4cc3
fix: catch report hook
mymphe 0431aa1
feat: add a Keymaker role for deposits to beacon chain
mymphe 8bbf7b0
Merge branch 'minting' of https://github.com/lidofinance/core-stealthβ¦
mymphe 6bcf1f1
feat: sync with current vaulthub
mymphe e7b1e7b
refactor: extract vault interface for hub
mymphe 7f05d28
fix: event param naming
mymphe 65dcee2
feat: some renaming
mymphe 56bf1b5
fix: bring back reserve ratio
mymphe 7e85256
fix: fix reserveRatio and tests
folkyatina 57aa7d8
Merge branch 'minting' of https://github.com/lidofinance/core-stealthβ¦
mymphe 220a2b8
feat: sync with main branch
mymphe 4d22b6d
feat: threshold reserve ratio
folkyatina be8984c
chore: ignore vendor and immutable contracts linting
folkyatina b44fa28
move factory to 0.8.25
loga4 e44b4bf
Merge pull request #30 from lidofinance/thresholdReserveRatio
mymphe 2dc84bc
fix: use address for external getters
mymphe 18b8b16
fix: remove 0.8.9 vault contracts
mymphe 7f5a8b5
feat: create vault facade and extract mint/burn from vault
mymphe 2fab86e
feat: minting in delegator
mymphe 46d31a2
docs: add some todos
mymphe 432176e
feat: use mintableShares instead of reserveRatio
folkyatina 0459957
feat: requestValidatorExit
folkyatina 7d6a123
fix: support validator exit in delegator
folkyatina 4147412
add versioned
loga4 fdafbb3
Merge branch 'vault-ownable-upgradeable' into feat/factory
loga4 facd6a9
update tests
loga4 45a81a6
feat: vault dashboard
mymphe 372639b
feat: remove steth ref
mymphe aa1ebec
feat: add current reserve ratio getter
mymphe 229f07f
fix mock
loga4 4cc457c
fix test
loga4 8acd9c5
fix: reserve ratio return
mymphe dd1054f
fix: update interface
mymphe 2feafd8
Merge pull request #32 from lidofinance/mintableShares
folkyatina d651d42
Merge pull request #33 from lidofinance/requestValidatorExit
folkyatina c3fd29f
Merge branch 'vault-ownable-upgradeable' into feat/vault-facade
folkyatina 00a7d9d
fix: adapt VaultDashboard to new VaultHub interface
folkyatina d3bd25e
fix: vault events
mymphe 3ed008c
upd factory
loga4 fdbfda3
feat: reorganize vault owner contract
mymphe 0405cb3
fix: burn for eoa and contract owner
mymphe de9cefb
fix: use more precise name
mymphe fe930d0
fix: include steth in constructor
mymphe eca2210
fix: fund before mint
mymphe 3d74e02
feat: let funder mint and rebalance vault
mymphe ef66184
feat: locked cannot be decreased
mymphe eeadb69
fix: use transferFrom for burn
mymphe 470a4cb
feat: add burn for funder
mymphe fcd1443
fix: disallow funder to eject validators
mymphe 36c8b85
Merge pull request #31 from lidofinance/feat/vault-facade
mymphe c223268
upd factory
loga4 6b75ce1
upd vault tests
loga4 b45447c
upd factory, add minimal proxy
loga4 32003e2
feat: restrict transfering vault to default admin
mymphe 9dc1b2a
fix: use common lido interface
mymphe 365fbb1
fix: typo
mymphe 5f36fed
fix: remove return from mint
mymphe d2bc338
fix: rename error to match var name
mymphe dcf84b6
fix: use a more precise error name
mymphe e70ac5d
fix: use socket in memory instead of sload
mymphe e4cd7ad
fix: better naming
mymphe a30be20
feat: use common ReportValues for ^0.8.0
mymphe 398186b
docs(compilers): explain local upgreadeable OZ copies
mymphe 9849c53
feat: remove unused steth reference
mymphe d77d34f
fix: remove empty comment
mymphe c6fb347
fix: headers
mymphe d65a117
Update test/0.8.25/vaults/vault.test.ts
mymphe f2dbc87
test: skip vault unit tests for now
mymphe dfb4935
upd
loga4 7d07a44
fix: update error strign to match param
mymphe 0d3577e
upd
loga4 f5a96d1
refactor: rename default admin to owner for better semantics
mymphe d06c53a
feat: special role for mint/burn
mymphe 04b41ce
Merge pull request #22 from lidofinance/vault-ownable-upgradeable
mymphe 7614192
setup MANAGER_ROLE and OPERATOR_ROLE via factory
loga4 027bc47
merge conflicts with OWNER role
loga4 0c55686
redundant storage calls have been removed
loga4 499b521
reduce size for locked and inOutDelta vars
loga4 1238ce9
add checks for manager and operator addresses
loga4 75fa209
return types of vault storage
loga4 007794d
reduce size for locked and inOutDelta vars
loga4 852d82c
vaultStafffRoomParams refactoring
loga4 b4955c5
add notes for initialization _params var
loga4 9652868
fix: solhint
tamtamchik aa3efdd
chore: apply IStakingVault to StakingVault
tamtamchik 34b654a
test: small refactoring
tamtamchik 5973c00
fix: ci warnings
tamtamchik fae1537
chore: update deps
tamtamchik c83edc3
move report storage values to Report struct
loga4 c8d19e6
move report storage values to Report struct
loga4 4c2ae7c
Merge pull request #19 from lidofinance/feat/factory
folkyatina 94f1d18
Merge pull request #25 from lidofinance/dependabot/npm_and_yarn/secp2β¦
folkyatina c7bbf23
fix: return value and stuff
folkyatina 9cfe04e
unify events
loga4 c384a2c
Merge pull request #35 from lidofinance/factory/minor_fixes
loga4 8206704
chore: fixes for vaults reporting
tamtamchik 7987794
Update contracts/0.8.25/vaults/StakingVault.sol
tamtamchik 58e5b83
test(integration): restore partially happy path
tamtamchik 0757a90
fix: solhint
tamtamchik 97f330b
test(integration): finish happy path
tamtamchik b6e4f82
Merge pull request #36 from lidofinance/feat/fixes
tamtamchik c26f793
Merge branch 'main' into minting
tamtamchik 8e0c17f
chore: update scratch deploy
tamtamchik ba2c2aa
Merge pull request #37 from lidofinance/feat/update-scratch
folkyatina 20770b3
chore: mekong deploy
tamtamchik 528dae7
ci: enable workflows
tamtamchik ce34c54
chore: update dependencies
tamtamchik 1e57a1b
chore: exclude OZ contracts from the coverage
tamtamchik 803199c
chore: apply suggestions from code review
tamtamchik bf83fcd
chore: update deps
tamtamchik d376ee3
chore: bump node to 22.11
tamtamchik f560380
chore: apply suggestions from code review
tamtamchik 6286561
test: fix getMaxExternalEther in tests
tamtamchik 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ name: Coverage | |
on: | ||
pull_request: | ||
push: | ||
branches: [ master ] | ||
branches: [master] | ||
|
||
jobs: | ||
coverage: | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,30 @@ | ||
name: Integration Tests | ||
|
||
on: [push] | ||
|
||
jobs: | ||
test_hardhat_integration_fork: | ||
name: Hardhat / Mainnet | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 120 | ||
|
||
services: | ||
hardhat-node: | ||
image: ghcr.io/lidofinance/hardhat-node:2.22.12 | ||
ports: | ||
- 8545:8545 | ||
env: | ||
ETH_RPC_URL: "${{ secrets.ETH_RPC_URL }}" | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Common setup | ||
uses: ./.github/workflows/setup | ||
|
||
- name: Set env | ||
run: cp .env.example .env | ||
|
||
- name: Run integration tests | ||
run: yarn test:integration:fork:mainnet | ||
env: | ||
LOG_LEVEL: debug | ||
#on: [push] | ||
# | ||
#jobs: | ||
# test_hardhat_integration_fork: | ||
# name: Hardhat / Mainnet | ||
# runs-on: ubuntu-latest | ||
# timeout-minutes: 120 | ||
# | ||
# services: | ||
# hardhat-node: | ||
# image: ghcr.io/lidofinance/hardhat-node:2.22.16 | ||
# ports: | ||
# - 8545:8545 | ||
# env: | ||
# ETH_RPC_URL: "${{ secrets.ETH_RPC_URL }}" | ||
# | ||
# steps: | ||
# - uses: actions/checkout@v4 | ||
# | ||
# - name: Common setup | ||
# uses: ./.github/workflows/setup | ||
# | ||
# - name: Set env | ||
# run: cp .env.example .env | ||
# | ||
# - name: Run integration tests | ||
# run: yarn test:integration:fork:mainnet | ||
# env: | ||
# LOG_LEVEL: debug |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
.idea/ | ||
.yarn/ | ||
.vscode/ | ||
|
||
node_modules/ | ||
coverage/ | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
20.12 | ||
22.11 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
contracts/Migrations.sol | ||
contracts/0.6.11/deposit_contract.sol | ||
contracts/openzeppelin/ | ||
contracts/0.6.11/deposit_contract.sol | ||
contracts/0.6.12/WstETH.sol | ||
contracts/0.8.4/WithdrawalsManagerProxy.sol |
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.
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.
maybe restore later