Skip to content

Commit

Permalink
improve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
seongyun-ko committed Dec 20, 2024
1 parent c377e8e commit 1dbd966
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/WithdrawRequestNFT.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,11 @@ contract WithdrawRequestNFTTest is TestSetup {
// Then, we can calculate the dust shares as the difference between the total eETH shares and the total eETH shares of all CLAIMED requests.
// -> eETH.share(withdrawRequsetNFT) - Sum(request.shareOfEEth) for ALL unclaimed

// Now the question is how to calculate the total eETH shares of all unclaimed requests on-chain:
// Now the question is how to calculate the total eETH shares of all unclaimed requests on-chain.
// One way is to iterate through all requests and sum up the shareOfEEth for all unclaimed requests.
// However, this would require a lot of gas and is not ideal.
//
// The idea is:
// 1. When we queue up the txn, we will take a snapshot of ALL unclaimed requests and put their IDs as a parameter.
// 2. (issue) during the timelock period, there will be new requests that can't be included in the snapshot.
// the idea is to input last finalized request ID and scan from there to the latest request ID on-chain
Expand Down

0 comments on commit 1dbd966

Please sign in to comment.