Closed avishkarabhishek786 closed 2 months ago
Thank you @avishkarabhishek786
Thanos's proveWithdrawalTransaction is the same Optimism's proveWithdrawalTransaction. In theory, it is possible for lossing of significant digits, however in actual, it is impossible because uint128 is still a very big number
@avishkarabhishek786 Could you check and closing this issue?
Sure @boohyung
Describe the bug The OptimismPortal.proveWithdrawalTransaction() function has a parameter _l2OutputIndex which is downcasted from uint256 to uint128. This may result in recording invalid _l2OutputIndex if original _l2OutputIndex is out of range of uint128.
proveWithdrawalTransaction
Configuration
Impact Downcasting from uint256 to uint128 may result in loss of significant digits
Recommendation In the parameter we can start with _l2OutputIndex as uint128
Then for l2Oracle.getL2Output() function we could typecast it to unint256 which would not result in error.
And record the l2OutputIndex as uint128
This is assuming it is essential to record l2OutputIndex in ProvenWithdrawal as uint128.