-
Notifications
You must be signed in to change notification settings - Fork 213
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
LIP-3 Oracle interface and reward algorithm for v0.2.x #153
Conversation
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 renaming will break the UI code in apps/*/app
and https://github.com/lidofinance/widget, they should be updated, too, as a part of this.
Checked the rewards calculation and distribution part and it works as we want it. Can't really check the implementation or style so I'm not blocking from there. |
* epochsPerFrame * slotsPerEpoch * secondsPerSlot * genesisTime New semantics and default values are used in `deploy-lido-dao.js` which in turn called by `yarn run deploy:dao`. Reason: PR #153 review
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.
* epochsPerFrame * slotsPerEpoch * secondsPerSlot * genesisTime New semantics and default values are used in `deploy-lido-dao.js` which in turn called by `yarn run deploy:dao`. Reason: PR #153 review
* epochsPerFrame * slotsPerEpoch * secondsPerSlot * genesisTime New semantics and default values are used in `deploy-lido-dao.js` which in turn called by `yarn run deploy:dao`. Reason: PR #153 review
* New pushBeacon func now gets amount of validators visible on beacon * _getTransientBalance() - calculations based on number of validators * Amount of validators visible on beacon now come from the oracle. * Increment number of deposited validators (not sum balance) on deposit. * Reimplement getTotelControlledEther to getTotalPooledEther() #71 * RewardBase calculator and store removed from Lido scope * The rewards calculated in runtime in pushBeacon, no state modification * Remove epoch-awareness from Lido (Oracle still epoch-aware) * Rename remoteEther2 to beaconBalance #71 * Rename totalControlledEther to totalPooledEther * Rename getEther2Stat getBeaconStat Related: #110
* Title description * initialize() doxygen * fallback and submit, _submit * depositBufferedEther, _depositBufferedEther * setOracle * setDepositIterationLimit * pushBeacon * getBufferedEther * getTotalPooledEther * getToken * getOracle * setToken * setValidatorRegistrationContract * _setOperators * _setDepositIterationLimit * _ETH2Deposit, _stake, _submitted * distributeRewards * _getTransientBalance
* typo and confusion totalPooledEther vs newTotalPooledEther * rename totalControlledEther to totalPooledEther in comment
* epochsPerFrame * slotsPerEpoch * secondsPerSlot * genesisTime New semantics and default values are used in `deploy-lido-dao.js` which in turn called by `yarn run deploy:dao`. Reason: PR #153 review
rebased to fix |
t.is(await lidoHelper.getTotalControlledEther(), usersDeposits, 'Total controlled ether in Lido') | ||
t.is(await ether2Stat.deposited, usersDeposits, 'Check that the ether2 stat is changed correctly') | ||
t.is(await lidoHelper.getTotalPooledEther(), usersDeposits, 'Total pooled ether in Lido') | ||
t.is(await ether2Stat.depositedValidators, usersDeposits, 'Check that the ether2 stat is changed correctly') |
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.
This is clearly broken since we're comparing the number of deposits with their amount, but let's fix E2E in a separate PR.
* epochsPerFrame * slotsPerEpoch * secondsPerSlot * genesisTime New semantics and default values are used in `deploy-lido-dao.js` which in turn called by `yarn run deploy:dao`. Reason: PR #153 review
* epochsPerFrame * slotsPerEpoch * secondsPerSlot * genesisTime New semantics and default values are used in `deploy-lido-dao.js` which in turn called by `yarn run deploy:dao`. Reason: PR lidofinance#153 review
LIP-3 Oracle interface and reward algorithm for v0.2.x
Resolves #110 - funds "in process" (from deposit submission until it gets processed and added to the beacon state's validators list) got treated like a decrease, the behavior was equal to slashing and lead to significant drops in stETH supply.
The new implementation counts the number of deposited validators as the funds get teposited on stake, so there is no time gap when funds are not accounted. Until the oracle can see the validator, it's assumed to have 32 ETH balance.
Spec: LIP-3
Note: full-cycle integration tests need to re-calculate and double-check all the numbers, made a separate task for this #152
closes #128
closes #129
closes #87
closes #4