Switch Electric: Maxwell
{"type": "project", "title": "Switch Electric: Maxwell", "logoImg": "bafkreib7tiymqmfb3qpuve7ozj3utzjn2rn7df2k4ccpvhr6zx5hrsha5y", "website": "https://www.whynotswitch.com", "bannerImg": "bafkreiglqee3viv7fnqrwkxkrgzjt36ysdmkxvprge6pk4d2zm2fl4okhy", "createdAt": 1681935256197, "userGithub": "iChristwin", "credentials": {"github": {"type": ["VerifiableCredential"], "proof": {"jws": "eyJhbGciOiJFZERTQSIsImNyaXQiOlsiYjY0Il0sImI2NCI6ZmFsc2V9..tt_HtcxPHSkc-jwI2jc4zXdsKH00XB0i3Q8TufbGFVy3PBIKulccg8BcNKXMbCt1IjB41dmH8rF8CAb_tpJnCA", "type": "Ed25519Signature2018", "created": "2023-04-19T20:12:40.689Z", "proofPurpose": "assertionMethod", "verificationMethod": "did:key:z6MkghvGHLobLEdj1bgRLhS4LPGJAvbMA1tn2zcRyqmYU5LC#z6MkghvGHLobLEdj1bgRLhS4LPGJAvbMA1tn2zcRyqmYU5LC"}, "issuer": "did:key:z6MkghvGHLobLEdj1bgRLhS4LPGJAvbMA1tn2zcRyqmYU5LC", "@context": ["https://www.w3.org/2018/credentials/v1"], "issuanceDate": "2023-04-19T20:12:40.689Z", "expirationDate": "2023-07-18T20:12:40.689Z", "credentialSubject": {"id": "did:pkh:eip155:1:0x82Fcf75bF44120E40eBb71eDaC96f1bc7F601e6e", "hash": "v0.0.0:M076uTP7NNvH+v4P54//+4JA3pzAaPfUI3eYSwTEUnc=", "@context": [{"hash": "https://schema.org/Text", "provider": "https://schema.org/Text"}], "provider": "ClearTextGithubOrg#WhyNotSwitch#52095470"}}, "twitter": {"type": ["VerifiableCredential"], "proof": {"jws": "eyJhbGciOiJFZERTQSIsImNyaXQiOlsiYjY0Il0sImI2NCI6ZmFsc2V9..If70xlDs0kaNasdGWm_0VVhHEv5lvinniXkZ0wzjOYepH4cGYG0ALtbZfVnH5dTLCfTxq129YBxM8iJ2hgMfDw", "type": "Ed25519Signature2018", "created": "2023-04-19T20:12:15.082Z", "proofPurpose": "assertionMethod", "verificationMethod": "did:key:z6MkghvGHLobLEdj1bgRLhS4LPGJAvbMA1tn2zcRyqmYU5LC#z6MkghvGHLobLEdj1bgRLhS4LPGJAvbMA1tn2zcRyqmYU5LC"}, "issuer": "did:key:z6MkghvGHLobLEdj1bgRLhS4LPGJAvbMA1tn2zcRyqmYU5LC", "@context": ["https://www.w3.org/2018/credentials/v1"], "issuanceDate": "2023-04-19T20:12:15.082Z", "expirationDate": "2023-07-18T20:12:15.082Z", "credentialSubject": {"id": "did:pkh:eip155:1:0x82Fcf75bF44120E40eBb71eDaC96f1bc7F601e6e", "hash": "v0.0.0:I48ukRD9klH1IaaW9rOmipQ1lIg6GGGXGejM5bjUFao=", "@context": [{"hash": "https://schema.org/Text", "provider": "https://schema.org/Text"}], "provider": "ClearTextTwitter#whyNotSwitch"}}}, "description": "# Energy Metering and Verification For on-chain RECs\n##### The Renewable Energy Certificate \n![image](https://user-images.githubusercontent.com/52095470/233071669-b34b36f7-332e-43f0-acb9-fd8d1aa99a49.png)\n\nWhile tokenizing Renewable Energy Certificates on the blockchain has the potential to enhance transparency, accountability, and efficiency; The process for is still somewhat manual. The data sources are varied across projects and not always trustworthy, and sometimes, the project developers would have to manually enter the information on-chain to get it all done. This is especially true for small-scale renewable energy developers such as microgrids and rooftop solar companies, which tend not to have in place the kind of SCADA systems used by major power utilities.\n\nSwitch Electric has been able to develop an energy meter (codenamed Maxwell) that allows for trustless monitoring, reporting and verification of energy outputs. The technology utilizes hardware-based cryptography, zero-knowledge proofs, along with a decentralized infrastructure network \"w3bstream\", developed by the IoTeX devs. We developed our proof of concepts and commercial prototypes with [grant funding from the IoTeX foundation](https://community.iotex.io/t/accepted-iotex-enabled-energy-service-by-switch-electric/9247). We will also be working closely with a number of other energy projects on web3—including Arkreen Network, Solarpunk DAO, Solar Foundation (Helios DAO + Spark Eco)—to utilize the technology in issuing RECs (or carbon credits). We are seeking to raise *$56,000* in grant funding so we can expand the use of this technology, develop standards for its implementation and scale up it's existing use-case.\n##### Maxwell Gen-2\n![image](https://user-images.githubusercontent.com/52095470/233105188-3ff655d7-8567-43f9-9715-90c23a991770.png)\n\n### Expected Impact:\nThis technology can be used to make the quality of on-chain renewable energy certificates more consistent, which will increase demand for these RECs and help speed up the transition to a sustainable energy system. Also, by enabling small scale rooftop solar projects in the global south to participate in the renewable energy market and mint RECs on the blockchain, this project can ensure that the RECs represent real and measurable renewable energy, and provide a new source of revenue for small scale project owners. In addition, the project will create jobs and economic opportunities in the manufacturing, deployment, and maintenance of the IoT devices, and contribute to the development of local renewable energy markets.\n\n### Project Goals:\n\n- Develop zk-proving standards and libraries for REC issuance\n- Develop new use cases for metering hardware\n- Scale up production of meters for MRV of small scale rooftop solar projects\n- Develop partnerships with web3 projects to improve quality of RECs issued on-chain\n- Conduct further field tests and validation of the devices\n- Develop training and support materials for project owners and installers\n\n\n\n### Budget:\n\n- Manufacturing process: ~$30,000\n- Staffing developers: ~$17,000\n- Promoting tech & conferences: ~$9,000\n- Total funding requested: ~$56,000\n\n\n## Behind the circuits \nSo you are willing to learn the nitty-gritty of how things work. Let's get started!\n\n### The hardware component\nIt all starts with the secure chip on the meter which generates and securely stores a private key. Maxwell uses the Secp256k1 elliptical curve algorithm and SHA256 hash functions to sign its data. This protects against unauthorized access or tampering, ensuring that all of Maxwell's information is accurate and trustworthy. The chip itself is used to sign messages using the private key, while we use the hash of its public key as the unique identifier or DID for that device. A DID is a decentralized identifier that can be used to represent an entity on a blockchain. They are similar to email addresses, but unlike email addresses, they cannot be taken down or censored. For every message, we affix a digital signature along with some metadata—about the signature scheme, elliptical curve and hash function—to let the receiver's software know how to verify our signature.\n##### Elliptical Curve Cryptography On Secure Hardware Element \n![image](https://user-images.githubusercontent.com/52095470/230639899-837d0c97-c09b-419e-ad87-3e07f236675d.png)\nMaxwell runs on the open source ATMEGA328 microcontroller, or the more advanced STM32G4A1KE control unit. It includes a 16MHz quartz crystal oscillator for accurate time-keeping and AC relays used for remote switching—and only draws about 0.025 W of power on average. Maxwell was created to work with alternating current inputs ranging from 50-60 hertz and voltages between 100–240 volts—making it compatible with both European and US standards.\n\nThe meter is rated for a maximum ambient temperature of 35°C, and its operating temperature range is -25°C to + 55°C. The circuit board itself measures 153.57mm x 103.91mm in size. Our current designs make use of Semtech’s SX1276 modules for LoRaWAN, a type of long-range, low-power wireless communication protocol that is designed for IoT.\n##### Maxwell PCB Electronics\n![image](https://user-images.githubusercontent.com/52095470/230644299-5a05c2d1-e8bd-4a68-b1dd-60f7d8b1db75.png)\n##### Maxwell PCB (In-Real-Life)\n![image](https://user-images.githubusercontent.com/52095470/233090967-af2c7cdd-2764-412b-b4fb-1e6e900d67cd.png)\n\n\n### The w3bstream component\nMaxwell is utilizes a special infrastructure; W3bstream, that is developed by the IoTeX network. W3bstream provides an open, decentralized protocol that sits between blockchain and smart devices. it consists of a number of component parts \n\n- WebAssembly virtual machine & execution engine\n- Virtual file system and an SQL database system\n- SSI wallet implementation for w3bstreams DID\n- Service endpoints for MQTT, HTTPS, RPC communication between blockchain nodes and smart devices.\n\n##### W3bstream Node Architecture\n![image](https://user-images.githubusercontent.com/52095470/230633247-6cc34b15-f86a-49e0-92b5-18f7aa9e7fe1.png)\n    \nThe W3bstream nodes contain a WebAssembly runtime environment for executing application logic that verifies the digital signature of the received data, decodes it, checks its conditions and generates proof-based outputs based on application-specific algorithms. The proof is then fed into our dApp smart contract where it can trigger REC issuance. Read more about w3bstream from the official [whitepaper](https://docsend.com/view/twtxhbzvisdye2xj)\n    \nOn the W3bstream network, we have implemented our meters backend logic as a WASM module (also known as an applet). This applet contains the application logic that verifies digital signatures on received data and decodes it before passing it as input to the WebAssembly runtime environment for computation and storage. This approach allows us to keep user data private and secure, while also ensuring that it is available for the necessary computations without having to rely on a centralized server. It also offloads a lot of this computation from the blockchain and as a result reduces the gas cost of our dApps. W3bstream can also be set up to monitor blockchain logs and listen for events emitted by our dApp's smart contracts. However, this feature and other blockchain functionalities only work with EVM compatible blockchains for now.\n    \n### The Smart contract component\n##### Multi-facet contract (aka Diamond contract)\n![image](https://user-images.githubusercontent.com/52095470/233072933-58c8045e-e23c-4443-92b3-47a2ff83630e.png)\n\nThe smart contract component consists of a number of different contracts that execute various facets of the dApp. The most significant one are:\n- A registry contract where new smart meters are whitelisted and bound to there decentralized identities (DIDs). This ensures that only registered devices can be integrated into the dApp. Each meter is also mapped to an energy pool, which essentially is a pointer to a smart contract, where it contributes towards the issuance of RECs.\n- An NFT contract that tokenizes these devices and allow on-chain ownership, creates a digital twin of each smart meters and tracks it's real world attributes and states; such as device provider, switch mode, activity status etc.\n- The last, but certainly not least important contract is the energy pool which implements minting and retirement functionalities of our RECs. It is also based on the ERC721 NFT standard \nThese contracts form the interface through which device manufacturers, device owners, project developers, other contracts and members of the public are able to interact with our decentralized application.\n\n### Summarizing all this in a scenario\nSuppose you are a solar energy provider with 167 rooftop installations in Bangladesh or Uganda. You can start to benefit from the renewable energy certificate (REC) subsidy by issuing these certificates as part of your existing business, but this is currently difficult if not impossible via conventional means. Our smart meters are able to break this convention by accurately tracking the energy yields from each of your installations. This data is collected on the meters, signed and transmitted over LoRaWAN—then you can deploy your tokenization contract (aka energy pool) in order to pool all these yields together into single RECs and register your meters to it.\n##### In zk-proofs we trust\n![image](https://user-images.githubusercontent.com/52095470/233069705-045b3fad-bf26-4703-92ef-89cb277ca68d.png)\n\nTo issue a new Renewable energy certificate, you would call the mint function in your energy pool contract. This contract call would result in the emission of an event on the blockchain, which is picked up by w3bstream and triggers a computation based on zkSNARK to generate proofs. In response to this event, w3bstream sends the generated proof back to your energy pool contract—allowing it to verify that your meters have indeed produced sufficient renewable energy in the given time period. Then, it stores this proof on-chain and mints a new REC to your account.\n\nWe appreciate your time and consideration of our project, which we believe has the potential to significantly improve the quality and reputation of on-line RECs while simultaneously onboarding a lot of small projects into this market.\n> Thanks for your donations ❤️", "logoImgData": {}, "bannerImgData": {}, "projectGithub": "WhyNotSwitch", "projectTwitter": "whyNotSwitch"}