knowing ETH supply from a contract have a lot of use cases in portfolio management. As far as i know there is no native way to query ETH supply from the contract. Is there any provable and trustless way to have it?

  • Does this answer your question? How to get a contract's balance in Solidity?
    – minhhn2910
    Commented Jan 8, 2023 at 6:51
  • or you mean the total ETH supply available out there?
    – minhhn2910
    Commented Jan 8, 2023 at 6:53
  • if you mean eth total supply, I guess requesting it to a few chainlink data providers would do the trick (quick check on chainlink market: tusd has such feed for instance) Commented Jan 8, 2023 at 21:15
  • I'm going to vote to close for now, but consider adding more context to this question and we can reopen. The above linked from minhhn2910 is accurate. Commented Feb 11, 2023 at 18:21

1 Answer 1


By using this code: address(this).balance;


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.