Conversation
2e2eea9 to
961df1b
Compare
Barichek
previously approved these changes
Jun 8, 2023
Contributor
Barichek
left a comment
There was a problem hiding this comment.
Seems good. I would just suggest to remove legacy comments above executeSystemWithdrawals function and remove uint256 _maxNumberOfFailedWithdrawalsToProcess from list of input parameters of it.
filoozom
reviewed
Jun 8, 2023
Member
Author
@Barichek we cannot change the function signature of |
filoozom
reviewed
Jun 19, 2023
Closed
lastperson
reviewed
Jun 21, 2023
Closed
* chore: remove global imports * chore: ignore _deprecatedUnused * chore: re-add _deprecatedUnused comment
* chore: add system tx with right signature * fix: make signature public and fix tests * Update SBCDepositContract comment * Update SBCDepositContract.sol --------- Co-authored-by: Lion - dapplion <35266934+dapplion@users.noreply.github.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Current master (via #25) implements push withdrawals. We originally decided to implement this strategy because:
However @filoozom noted that since the ERC20 transfer happens as part of receipt-less system transaction, the Transfer logs are not accessible anywhere. This breaks downstream tooling and will cause token balances to be incorrectly reported. Otherwise tooling is forced to incorporate custom logic to handle this differences, raising the cost of the feature.
Due to this in the last core devs call consensus is formed that the incompatibility in tooling + the extra complexity does not justify going for the push strategy.
This PR implements a pull strategy, which requires a final
claimstep to credit the withdrawn tokens to stakers. Theclaimhappens in a regular transaction after the withdrawal block, so the Transfer receipts are available. Also, the insolvency case does not need to be handled explicitly, which significantly reduces the complexity of the contract to basically this two functions:deposit-contract/contracts/SBCDepositContract.sol
Lines 249 to 265 in 2e2eea9
deposit-contract/contracts/SBCDepositContract.sol
Lines 271 to 277 in 2e2eea9
Note that anyone can claim for any address. I expect Gnosis devops or other interested parties (staking services) to sponsor and auto-claim on behalf of stakers such that the perceived UX for the staker is the same as with the push approach