Welcome to the WattSwap logs!
I plan to make this a running diary of my thinking process during the process of me building this application.
Who are the users of this application?
In short, prosumers.
Prosumers = Producers + Consumers.
These people are part of a smart grid connected to each other. They can send and receive power at will of the person sending the power.
The C Rate
A prosumer has a facility to store their energy. This energy storage has a C-rate, or charging rate. With a C-rate of 1, it also takes 2 hours for a transfer of 2 kWh to happen as well. It is a linear relationship of the form: where C is the C-rate (which varies from 0.5 to 1 for households and commercial power storage solutions)
P is the power to be transferred to the buyer in kWh
and T is time in hours.
Sure, the blockchain transaction (the transfer of funds in exchange for power) can happen instantaneously (atleast as fast as the Aptos network allows), but the power reimbursement happens taking this C-rate into account.
Storage capacity
A Prosumer has a storage facility, but it has a capacity. For normal households in the smart grid (assuming a household with an inverter+battery setup like mine) that capacity can be from 1-2 kWh. But this is as a backup store. I did my research, and I’ve found out that households in a functioning smart grid can have anywhere from 10-15 kWh storage capacities. For small households, this number is 5-10 kWh. Commercial prosumers can have capacities from 50-100 kWh for small complexes, and 100-250 kWh for larger ones.
Which means, when they register themselves, they need to give me 3 critical pieces of data which I need to receive and make it part of their blockchain address (a key in Aptos)
- Their smart grid ID (this is a String used to identify them on the grid and to send them power)
- Their C-rate (This is an integer number that the user can define in terms of C)
- Their capacity (This is an integer number that the user can define in terms of kWh)
- Their category (Small household, medium household, large household)
- Their current energy level (this is the state variable that needs to be updated by the hour, need to think of a less gaseous way to do this)
What else should I store about them?
ChatGPT suggested to store their reputation as a percentage as well, which is a measure of the transactions they accepted against the actual deliveries they facilitated. This, if implemented would be a measure of trust the prosumers could benefit from on the smart-grid. But for the MVP, I believe this isn’t necessary.
My faculty told me to take into account more things as well. The cron job on the smart meters checks the energy storage anywhere from every 15 mins to every hour. Which means, the data can have a degree of error. Ideally, before the transaction the smart meter could be pinged to check if it does have the energy it claims to, and reject the transaction if it doesn’t. But I think for the MVP I’m just going to assume that the readout is accurate.