Matic

Off-Chain (Private)
Audited on 2021/04/19
No active critical issues

Summary

Polygon is a decentralized, Ethereum scaling platform that aims to provide Ethereum-based projects with increased flexibility and scalability while still affording the security, interoperability, and structural benefits of the Ethereum blockchain.

Issues (15)

Low
Medium
High
Critical
Total
Not fixed
1---1
Fixed
12-1114
Total1301115
Inefficient comparison
not_fixed/low

In function `numItems()` by the definition of `RLPItem` it is clear the the value of `currPtr` can never exceed `endPtr` and the while loop on line 234 would stop when `currPtr` and `endPtr` are equal, hence instead of `currPtr < endPtr` we can use `CurrPtr != endPtr` as each not equal comparison costs 3 less gas (negligible for short `RLPItem`, this exhibit is just here for completeness) than less than comparison

Contracts (46)

#File Name
1

contracts/child/ChildToken/ChildERC20.sol

2

contracts/child/ChildChainManager/ChildChainManager.sol

3

contracts/root/TokenPredicates/ITokenPredicate.sol

4

contracts/Migrations.sol

5

contracts/root/TokenPredicates/EtherPredicate.sol

6

contracts/root/RootToken/DummyERC721.sol

7

contracts/common/ContextMixin.sol

8

contracts/common/AccessControlMixin.sol

9

contracts/root/TokenPredicates/ERC721PredicateProxy.sol

10

contracts/root/TokenPredicates/ERC721Predicate.sol