Sanwar Sunny, CEO of energy consumption-tracking AI company Dynamhex, has been using blockchain for over a decade. He recently walked Technical.ly through how to make a cryptocurrency, one of the most popular blockchain-based products, in the programming language Solidity.
Sunny primarily uses this technology to run his startup, which made this year’s Baltimore RealLIST Startups roster. Ethereum blockchain is used to create fungible tokens that can verify energy consumption and let a user know where electricity came from, as well as what it powered. In practice, Sunny uses this blockchain code to verify what amounts of solar energy were produced on a specific day and the specific place it went to. His company does this on a larger scale for cities and municipalities collecting energy consumption and carbon footprint data, which helps these clients develop more informed climate commitments and action plans.
“We’re climate action for the Web 3.0 world,” Sunny said about his company. “I want to make sure my footprint is actually reduced based off cryptographic verifiability.”
Essentially, his company makes cryptocoins for whoever wants to track their carbon footprint.
The programs and code behind the coin
Solidity is an object-oriented programming language for making cryptocurrency, as well as fungible and non-fungible tokens. It’s specifically suited for smart contracts and blockchain, which underpin all of Web3.
Fungible tokens are equivalent and interchangeable, like a dollar or any other currency. All Efthereum-based coins work on the ERC20 standard; this and other standards are community-developed rules that these cryptocurrencies follow in their source code, allowing them to work and exchange data with other products and services.
These standardizations enable the existence of GitHub libraries that you can plug in to do the heavy coding. For instance, OpenZeppelin, a cybersecurity firm that provides open source code with security and community-standard features built in, created this ERC20 GitHub library.
Sunny’s coin (featured in the video below) had 600 lines of code that were already prewritten by the broader community of open source developers. All he did was call to those libraries in his own code. The only changes he made involved individually naming his “Sunny coin” and setting the amount available.
Check out the full tutorial below.
Donte Kirby is a 2020-2022 corps member for Report for America, an initiative of The Groundtruth Project that pairs young journalists with local newsrooms. This position is supported by the Robert W. Deutsch Foundation.-30-