As the question suggests, I'm curious about how to find statistics for:
- what is the biggest contract by loc/bytecode size
- what contract is currently taking up the most storage space on the chain.
Ethereum Stack Exchange is a question and answer site for users of Ethereum, the decentralized application platform and smart contract enabled blockchain. It only takes a minute to sign up.
Sign up to join this communityI was able to find that out via Google's BigQuery engine by running the following query:
SELECT
contracts.address,
SAFE_DIVIDE(SAFE_SUBTRACT(LENGTH(contracts.bytecode), 2), 2) AS bytecode_length
FROM
`bigquery-public-data.crypto_ethereum.contracts` as contracts
ORDER BY
bytecode_length
DESC
The results show that the largest smart contract bytecode size is 24,576 bytes, which is also the size limit that was introduced in the Spurious Dragon hard fork.
Here are a couple of smart contracts with that size:
Although I couldn't find statistics on what is the biggest contract by loc/bytecode size and what contract is currently taking up the most storage space on the chain, I found the relationship between transaction costs and contract size is that transaction costs are the costs for sending the contract code to the Ethereum blockchain, and they depend on the size of the contract.
See: What is the difference between transaction cost and execution cost in remix?
What I found are statistics of lists of projects on the Ethereum blockchain by total transaction fee, which could shed light on what is the biggest contract by loc/bytecode size and what contract is currently currently taking up the most storage space on the chain.
See: https://dune.com/agaperste/The-State-of-Ethereum-Network