Skip to content
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

Merge-ready protocol service pack πŸ“¦ #401

Merged
merged 182 commits into from
May 19, 2022
Merged
Show file tree
Hide file tree
Changes from 131 commits
Commits
Show all changes
182 commits
Select commit Hold shift + click to select a range
e087204
fix: add `StETHBurnt` event for the `StETH` token
TheDZhon Dec 18, 2021
c359fd1
test: update tests on the `StETHBurnEvent` event
TheDZhon Dec 18, 2021
08969d2
feat: add `transferShares` function
TheDZhon Dec 30, 2021
5e07507
test: add unit tests for the `transferShares` func
TheDZhon Dec 30, 2021
0bb9f55
increase `keysOpIndex` in `assignNextSigningKeys`
arwer13 Jan 9, 2022
938d0aa
node-operators-registry.test: fix incorrect import
arwer13 Jan 9, 2022
596875d
fix: add `transferShares` into `IStETH` interface
TheDZhon Jan 10, 2022
95ac796
fix: ask `Transfer` events explicitly for scentest
TheDZhon Jan 10, 2022
b40f7ed
fix: emit `TransferShares` from transfer calls too
TheDZhon Jan 10, 2022
541232f
test: add assertions for `TransferShares` events
TheDZhon Jan 10, 2022
205830a
fix: move `TransferShares` event to ISTETH
TheDZhon Jan 12, 2022
8219141
fix: make stETH is IStETH
TheDZhon Jan 12, 2022
071851d
DepositSecurityModule, _addGuardian: add check for zero address
arwer13 Jan 18, 2022
6dea01f
extract hardcoded `10000` into TOTAL_BASIS_POINTS internal constant
arwer13 Jan 18, 2022
3b11426
Use UINT64_MAX constant. Fix #382
Jan 18, 2022
a6d264a
Remove extra defensive aserts for constants. Fix #383
Jan 19, 2022
9372b0d
Move storage assigning under if-branch. Fix #390
Jan 19, 2022
f03fce3
Rename a variable. Fix #387
Jan 19, 2022
d17b86d
Add comments to internal functions. Fix #388
Jan 19, 2022
517d379
Remove explicit variables initialization. Fix #384
Jan 19, 2022
638a9c2
Fix comments not to mention non-existent constants. Fix #385
Jan 19, 2022
b9bbc48
NodeOperatorsRegistry: add requires to 4 set functions
arwer13 Jan 19, 2022
0b1e52e
dep-sec-module: add 2 more usages of SafeMath: _index.add(_amount)
arwer13 Jan 19, 2022
bf3c261
dep-sec-module: add checks for zero addresses in constructor
arwer13 Jan 19, 2022
94388e6
Merge branch 'audit/deposit-security-module' into audit/dsm-fix-comments
arwer13 Jan 21, 2022
308b899
Merge pull request #391 from lidofinance/audit/dsm-fix-comments
arwer13 Jan 21, 2022
0ce2dc2
wrn-13: fix omitted events
arwer13 Jan 21, 2022
7dcf3b4
wrn-5: add clarifying comment to `if (paused)` in `pauseDeposits`
arwer13 Jan 21, 2022
efe8172
improve LidoOracle comments related to versioning
arwer13 Jan 21, 2022
bcae424
Fix naming in getRewardsDistribution (#395)
folkyatina Jan 22, 2022
08aa865
code review fixes
arwer13 Jan 26, 2022
897a01c
Merge branch 'audit/deposit-security-module' into audit/mev
arwer13 Jan 30, 2022
2a96bb7
Merge branch 'inc-keys-op-index' into audit/mev
arwer13 Jan 30, 2022
6f51bfe
Merge branch 'feature/steth_burn_event' into audit/mev
arwer13 Jan 30, 2022
5cc8cde
Merge branch 'feature/transfer-shares' into audit/mev
arwer13 Jan 30, 2022
68800ff
Merge branch 'redo-oracle-initialization' into audit/mev
arwer13 Jan 30, 2022
be673d2
Merge branch 'feature/mev_tx_fees' into audit/mev
arwer13 Jan 30, 2022
4070eb5
initial dirty version of MevTipsVault and Lido modifications
arwer13 Dec 12, 2021
5d29bfe
further edits on init version: don't deposit, auth etc
arwer13 Dec 13, 2021
da95529
test: add reward emulator mock
arwer13 Jan 30, 2022
9c06794
test: add scenario test on mev after the merge
TheDZhon Dec 13, 2021
2a31811
fix: sync merge test scenario with the latest impl
TheDZhon Dec 13, 2021
2c6aa74
test: Add scenario test on penalties/slashing
TheDZhon Dec 14, 2021
498e11a
fix: unify MEV&ETH output format for scenario test
TheDZhon Dec 15, 2021
a090370
more work on MevTxFeeVault and Lido contract
arwer13 Dec 17, 2021
09367f2
add mev upgrade deploy scripts
arwer13 Dec 20, 2021
6c13602
rename Lido::pushBeacon --> pushRewards
arwer13 Dec 21, 2021
31f6774
handle case when no mevTxFeeVault is set to Lido contract
arwer13 Dec 21, 2021
748ae19
refactor and improve documentation
arwer13 Dec 22, 2021
17d133c
a bit more of refactoring
arwer13 Dec 22, 2021
6e3b8b0
fix licenses in MEV-related contracts: MIT --> GPL-3.0
arwer13 Jan 30, 2022
42c0b85
refactor LidoMevTxFeeVault a bit
arwer13 Dec 23, 2021
c32c3ad
update deployed-goerli.json after mev upgrade deployment
arwer13 Jan 30, 2022
51886be
Rename pushRewards and update deploy scripts
arwer13 Jan 30, 2022
7298320
Merge branch 'feature/mev-tx-fee' into audit/mev
arwer13 Jan 30, 2022
05103ee
Initial version of Oracle initialization according to new LIP
arwer13 Dec 22, 2021
4f586fb
updates to LidoOracle initialization function
arwer13 Dec 23, 2021
aacc111
fixes to LidoOracle initialization related files
arwer13 Dec 23, 2021
9095cab
fix LidoOracle initialize() to fix local tests
arwer13 Dec 23, 2021
12eb9d7
leave last completed epoch be 0 on initialize()
arwer13 Dec 23, 2021
bbcd893
improve LidoOracle comments related to versioning
arwer13 Jan 21, 2022
1abd3da
Revert "Merge branch 'redo-oracle-initialization' into audit/mev"
arwer13 Jan 30, 2022
b351d4c
Merge branch 'feature/redo-oracle-init' into audit/mev-lips
arwer13 Jan 30, 2022
3154a14
cosmetic and docs fixes after review
arwer13 Jan 30, 2022
33d10e7
MevTxFeeVault: make ERC-20 and ERC-721 recoverable
arwer13 Jan 30, 2022
d3e5e63
MevTxFeeVault: add counter for rewards via transactions
arwer13 Jan 30, 2022
5a7acd0
fix tests
arwer13 Jan 30, 2022
d6f3887
LidoOracle, docs: update link to LIP-10
arwer13 Jan 30, 2022
fa2e978
get rid of useless ISTETH.sol interface
arwer13 Jan 30, 2022
0b983b9
update LidoTemplate.sol after merging initialize branch
arwer13 Jan 31, 2022
0c8b75b
Lido.sol: remove an obsolete line
arwer13 Jan 31, 2022
801d3e8
ILido.sol: add event `LidoMevTxFeeVaultSet`
arwer13 Jan 31, 2022
a70083e
Lido app: add line address of MevTxFeeVault
arwer13 Feb 2, 2022
66850e2
fixes after review by skozin
arwer13 Feb 21, 2022
2f49e4b
audit: fix MEDIUM-1
arwer13 Feb 21, 2022
c8b065c
audit: fix MEDIUM-2
arwer13 Feb 21, 2022
9985ffb
audit: fix LOW-1
arwer13 Feb 21, 2022
fdd6b7a
audit: fix LOW-2
arwer13 Feb 21, 2022
6adfa82
audit: fix LOW-4
arwer13 Feb 21, 2022
c0ad70b
audit: fix LOW-5
arwer13 Feb 21, 2022
2c592fe
audit: fix MEDIUM-3
TheDZhon Feb 21, 2022
ea5e232
audit: fix MEDIUM-4
TheDZhon Feb 21, 2022
f8b4b96
audit: fix MEDIUM-5
TheDZhon Feb 21, 2022
fb8bafe
audit: fix LOW-3 issue
TheDZhon Feb 21, 2022
9babc85
audit: fix MEDIUM-7
TheDZhon Feb 22, 2022
d198ed9
small typos and coding style fixes
arwer13 Feb 23, 2022
6d289ea
tiny coding style and type fixes
arwer13 Feb 23, 2022
3813932
fix compilation error
arwer13 Feb 23, 2022
e3b8447
add limit to mev rewards withdrawal per LidoOracle report (no tests yet)
arwer13 Feb 23, 2022
a5af16e
fix existing unit tests
arwer13 Feb 28, 2022
365c45b
bump hardhat, hardhat-gas-reporter and add hardhat-contract-sizer
arwer13 Feb 28, 2022
bf53258
add mevTxFee withdrawal limit scenario test
arwer13 Feb 28, 2022
126d809
update mev deploy scripts
arwer13 Feb 28, 2022
1427cb0
Lido.sol: make setMevTxFeeWithdrawalLimit a no-op if value is the same
arwer13 Feb 28, 2022
b1fd2dc
improve scenario test for mev withdrawal limit
arwer13 Feb 28, 2022
0d0b2c7
feat: deploy kiln
avsetsin Mar 31, 2022
ffd27f9
feat: mev vault deploy for kiln
avsetsin Apr 4, 2022
9446913
fix: mev deploy script
avsetsin Apr 4, 2022
e7ec3a0
Merge pull request #404 from lidofinance/audit/post-merge-proto
TheDZhon Apr 13, 2022
d8de2ed
feat: add submits break
TheDZhon Apr 13, 2022
4572109
fix: rename 'submits' to 'staking
TheDZhon Apr 13, 2022
d130e8e
fix: reduce Lido contract size
TheDZhon Apr 13, 2022
b7db8d1
doc: update docs
TheDZhon Apr 14, 2022
406b327
chore: fix comments format
TheDZhon Apr 14, 2022
81d51d6
fix: rename DAO contracts -> protocol contracts
TheDZhon Apr 14, 2022
8bccd2c
fix: update tests
TheDZhon Apr 14, 2022
83b5739
fix: handle edge-case when mev vault is zero
TheDZhon Apr 16, 2022
d185549
fix: contract size optimizations
TheDZhon Apr 16, 2022
5b6156e
feat: implement soft staking rate limit
TheDZhon Apr 16, 2022
b791efb
doc: add notes about rate limit vars packing
TheDZhon Apr 17, 2022
ef5ef14
fix: handle preliminary review by Alexey P.
TheDZhon Apr 18, 2022
4749e50
feat: change rate-limit design
TheDZhon Apr 19, 2022
646e7e4
fix: use sentinel _auth to minimize bytecode bloat
TheDZhon Apr 20, 2022
4fca69e
fix: refine implementation, test and docs
TheDZhon Apr 20, 2022
40b98f1
fix: resumeStaking edge cases
TheDZhon Apr 20, 2022
7b668f7
chore: improve mev/tx fee test coverage
TheDZhon Apr 20, 2022
6be7fdf
chore: fix grammar typos
TheDZhon Apr 21, 2022
fc14365
feat: bring back NFT recovery
TheDZhon Apr 21, 2022
c3e5c12
chore: small improvements by ArWer
TheDZhon Apr 21, 2022
2c54f04
chore: rename `getCurrentStakeLimit`
TheDZhon Apr 21, 2022
8f6df45
fix: replace uploadDirToIpfs util with the original
avsetsin Apr 25, 2022
25f85f3
Merge pull request #408 from lidofinance/kiln-deploy
TheDZhon Apr 25, 2022
7a1172b
Merge pull request #410 from lidofinance/feature/staking_soft_rate_limit
TheDZhon May 11, 2022
f2f19fc
update mev vote script to merge-ready-first-pack vote script
arwer13 May 13, 2022
092e694
fix: remove incoming eth counter from mev/tx vault
TheDZhon May 13, 2022
33356ec
fix: increase max node operators count cap to 200
TheDZhon May 13, 2022
f3c12a0
abi: merge-ready protocol contracts ABI
TheDZhon May 13, 2022
d4f5ebb
add tests for stake limit library
loga4 May 13, 2022
c22d222
Merge pull request #412 from lidofinance/test/staking-limits
loga4 May 13, 2022
4c611cb
fix: enforce stake limit invariants by the lib
TheDZhon May 14, 2022
917ee9f
Merge pull request #413 from lidofinance/fix/stake_limit_unit_tests
loga4 May 14, 2022
2208fc3
fix: use safeTransfer for ERC20 recovery
TheDZhon May 14, 2022
1d619f0
fix: outdated docs and typos in LidoMevTxFeeVault
TheDZhon May 14, 2022
d8c4f45
chore: update comments
TheDZhon May 14, 2022
f95c207
fix: use uint256 for stake limits
TheDZhon May 14, 2022
daf6e07
feat: frontend-oriented API for stake limits
TheDZhon May 14, 2022
4f74910
chore: deal with bn in lido.test
TheDZhon May 14, 2022
bbb4526
chore: change comparison
TheDZhon May 14, 2022
452880f
Merge pull request #414 from lidofinance/review/mev-lips-round1
TheDZhon May 15, 2022
58dc6c5
chore: fix comment about max NOs
TheDZhon May 15, 2022
19d6e42
chore: better docs for `getStakeLimitFullInfo`
TheDZhon May 15, 2022
1242d24
fix: add new roles for the initial deploy
TheDZhon May 15, 2022
3cf51b4
feat: refactor stake rate limit libs
TheDZhon May 16, 2022
9a87bac
chore: update staking limit test comments
TheDZhon May 16, 2022
b016e85
feat: rename mev/tx rewards to EL rewards globally
TheDZhon May 16, 2022
b0326cc
chore: update `resumeStaking` docs
TheDZhon May 16, 2022
cc83ae0
chore: special return value 2**256 - 1
TheDZhon May 16, 2022
61287ac
chore: update comments
TheDZhon May 16, 2022
ad6e5a8
chore: sync docs, fix typos
TheDZhon May 16, 2022
59e3376
chore: update `pauseStaking` doc
TheDZhon May 16, 2022
f71695a
fix: use `isStakingLimitApplied` everywhere
TheDZhon May 16, 2022
7837182
DepositSecurityModule: setter for lastDeposit block and update scripts
arwer13 May 16, 2022
4f0b773
fix: a bunch of rate limit improvements
TheDZhon May 16, 2022
a656c04
fix: tune el rewards vault naming a bit
TheDZhon May 16, 2022
f99b2f7
chore: improve stake rate limit lib docs
TheDZhon May 16, 2022
41ecebf
test: add tests for `setLastDepositBlock`
TheDZhon May 17, 2022
f4b8257
fix: doc and naming cleanups
TheDZhon May 17, 2022
0bf6233
Merge pull request #415 from lidofinance/review/mev-lips-fixes
TheDZhon May 17, 2022
0b7046d
fix a number of typos, mostly in comments
arwer13 May 17, 2022
583e213
fix: stake limit corner cases
TheDZhon May 17, 2022
7feaddd
Merge pull request #417 from lidofinance/review/mev-lips-fixes
TheDZhon May 17, 2022
81eb4de
refactor: rename withdrawal limit points to withdrawal limit for cons…
mymphe May 17, 2022
71076c3
fix: remove `StakingResumed` params
TheDZhon May 17, 2022
6e44ac7
fix: remove `withdraw` stub at all
TheDZhon May 17, 2022
616e203
Merge pull request #418 from lidofinance/rename-withdrawal-limit
TheDZhon May 17, 2022
7f1da3c
fix: `SharesBurnt` with pre- post- stETH balance
TheDZhon May 17, 2022
ef62245
chore: update `SharesBurnt` event docs
TheDZhon May 17, 2022
a2dcf3c
doc: update StakeLimitUtils comments
TheDZhon May 17, 2022
2cd1b7c
fix: bring back `getStakeLimitFullInfo`
TheDZhon May 17, 2022
d043ecc
fix: various comment and doc fixes
TheDZhon May 17, 2022
6843b84
fix: lido contract consistency
TheDZhon May 17, 2022
67aaa21
test: review tests after refactorings
TheDZhon May 17, 2022
4dd06b6
feat: add `ETHReceived` event for ELRewardsVault
TheDZhon May 18, 2022
e3137a5
fix: rename `distributeRewards` to `distributeFee`
TheDZhon May 18, 2022
a0f8336
update stake limit tests
loga4 May 18, 2022
3d70d5b
feat: refactor lido interface
TheDZhon May 18, 2022
f8d15ac
update staking limit tests
loga4 May 18, 2022
8c8e67e
feat: resume incurs resumeStaking
TheDZhon May 18, 2022
d6f75ed
Merge pull request #424 from lidofinance/test/staking-limit
TheDZhon May 18, 2022
81180b6
Merge pull request #419 from lidofinance/review/mev-lips-round2
TheDZhon May 18, 2022
e8e47ad
feat: implement suggestions by @arwer13
TheDZhon May 18, 2022
f3ae43a
Merge pull request #425 from lidofinance/review/mev-lips-round3
TheDZhon May 19, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ The contract also works as a wrapper that accepts stETH tokens and mints wstETH
* Oracle: [`0x24d8451BC07e7aF4Ba94F69aCDD9ad3c6579D9FB`](https://goerli.etherscan.io/address/0x24d8451BC07e7aF4Ba94F69aCDD9ad3c6579D9FB) (proxy)
* WstETH token: [`0x1643e812ae58766192cf7d2cf9567df2c37e9b7f`](https://goerli.etherscan.io/address/0x1643e812ae58766192cf7d2cf9567df2c37e9b7f)
* Deposit Security Module: [`0xEd23AD3EA5Fb9d10e7371Caef1b141AD1C23A80c`](https://goerli.etherscan.io/address/0xEd23AD3EA5Fb9d10e7371Caef1b141AD1C23A80c)
* MEV Transaction Fee Vault [`0xece7301B3aeEC2b2B6C41a55dE831D47c205AaCC`](https://goerli.etherscan.io/address/0xece7301B3aeEC2b2B6C41a55dE831D47c205AaCC)
* Aragon Voting: [`0xbc0B67b4553f4CF52a913DE9A6eD0057E2E758Db`](https://goerli.etherscan.io/address/0xbc0B67b4553f4CF52a913DE9A6eD0057E2E758Db) (proxy)
* Aragon Token Manager: [`0xDfe76d11b365f5e0023343A367f0b311701B3bc1`](https://goerli.etherscan.io/address/0xDfe76d11b365f5e0023343A367f0b311701B3bc1) (proxy)
* Aragon Finance: [`0x75c7b1D23f1cad7Fb4D60281d7069E46440BC179`](https://goerli.etherscan.io/address/0x75c7b1D23f1cad7Fb4D60281d7069E46440BC179) (proxy)
Expand Down
File renamed without changes.
5 changes: 5 additions & 0 deletions apps/lido/app/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ export default function App() {
nodeOperatorsRegistry,
depositContract,
oracle,
mevTxFeeVault,
// operators,
// treasury,
// insuranceFund,
Expand Down Expand Up @@ -249,6 +250,10 @@ export default function App() {
label: 'Oracle',
content: <IdentityBadge entity={oracle} />,
},
{
label: 'MEV and Transaction Fees Vault',
content: <IdentityBadge entity={mevTxFeeVault} />,
},
]
}, [
appState,
Expand Down
1 change: 1 addition & 0 deletions apps/lido/app/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const defaultState = {
nodeOperatorsRegistry: defaultValue,
depositContract: defaultValue,
oracle: defaultValue,
mevTxFeeVault: defaultValue,
operators: defaultValue,
treasury: defaultValue,
insuranceFund: defaultValue,
Expand Down
5 changes: 5 additions & 0 deletions apps/lido/app/src/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ function initializeState() {
nodeOperatorsRegistry: await getNodeOperatorsRegistry(),
depositContract: await getDepositContract(),
oracle: await getOracle(),
mevTxFeeVault: await getMevTxFeeVault(),
// operators: await getOperators(),
// treasury: await getTreasury(),
// insuranceFund: await getInsuranceFund(),
Expand Down Expand Up @@ -107,6 +108,10 @@ function getOracle() {
return app.call('getOracle').toPromise()
}

function getMevTxFeeVault() {
return app.call('getMevTxFeeVault').toPromise()
}

// async function getOperators() {
// return await app.call('getOperators').toPromise()
// }
Expand Down
5 changes: 5 additions & 0 deletions arapp.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@
"registry": "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",
"appName": "dao.lido.eth",
"network": "mainnet"
},
"kiln": {
"registry": "0xD3A23B83902066baC61e82bCe449fE1d3154Ab5D",
"appName": "dao.lido.eth",
"network": "kiln"
}
},
"appName": "dao.lido.eth"
Expand Down
Loading