JMLX42 / cocorico

Cocorico is an open online voting platform powered by the blockchain.
https://cocorico.cc
MIT License
89 stars 21 forks source link

Ether cost estimation #39

Open JMLX42 opened 7 years ago

JMLX42 commented 7 years ago

Here is what the logs of ballot-queue-worker.js have to say:

{
  "name": "ballot-queue-worker",
  "hostname": "local.cocorico.cc-local",
  "pid": 17617,
  "level": 30,
  "from": "0x9125daa320fde3f103090250e91599673ae5ce11",
  "value": "30000000000000000",
  "address": "0x9fb8daab050181431c648c2c8fd33f07e03056e6",
  "msg": "initialize account",
  "time": "2016-09-26T22:44:34.759Z",
  "v": 0
}
{
  "name": "ballot-queue-worker",
  "hostname": "local.cocorico.cc-local",
  "pid": 17617,
  "level": 30,
  "from": "0x9125daa320fde3f103090250e91599673ae5ce11",
  "value": "30000000000000000",
  "address": "0x9fb8daab050181431c648c2c8fd33f07e03056e6",
  "balance": "0",
  "msg": "account initialized",
  "time": "2016-09-26T22:44:35.438Z",
  "v": 0
}
{
  "name": "ballot-queue-worker",
  "hostname": "local.cocorico.cc-local",
  "pid": 17617,
  "level": 30,
  "contract": "0xdf5d871b8a13b2e8c3b28096bad8aa37b3d35b7a",
  "address": "0x9fb8daab050181431c648c2c8fd33f07e03056e6",
  "transactionHash": "0x426d1a8f1c4c914222c4443b7301c514c24f8b20fd8aa01f45c779e279c6d73e",
  "msg": "Vote.registerVoter function call transaction sent",
  "time": "2016-09-26T22:44:35.491Z",
  "v": 0
}
{
  "name": "ballot-queue-worker",
  "hostname": "local.cocorico.cc-local",
  "pid": 17617,
  "level": 30,
  "contract": "0xdf5d871b8a13b2e8c3b28096bad8aa37b3d35b7a",
  "address": "0x9fb8daab050181431c648c2c8fd33f07e03056e6",
  "transactionHash": "0x487d25058657d7a64d18a65d4b55f672f3b0f54007fb0b5c16e7cf01c8504167",
  "msg": "Vote.vote function call transaction sent",
  "time": "2016-09-26T22:44:39.013Z",
  "v": 0
}
{
  "name": "ballot-queue-worker",
  "hostname": "local.cocorico.cc-local",
  "pid": 17617,
  "level": 30,
  "balance": "29322460000000000",
  "event": {
    "address": "0xdf5d871b8a13b2e8c3b28096bad8aa37b3d35b7a",
    "blockHash": "0x6b745ad7fc942b0ccf43f7172717afc3e8fa83a97694ebf3f851fd272ac7365a",
    "blockNumber": 664,
    "logIndex": 0,
    "transactionHash": "0x487d25058657d7a64d18a65d4b55f672f3b0f54007fb0b5c16e7cf01c8504167",
    "transactionIndex": 0,
    "event": "Ballot",
    "args": {
      "voter": "0x9fb8daab050181431c648c2c8fd33f07e03056e6",
      "proposal": "0"
    }
  },
  "msg": "ballot event",
  "time": "2016-09-26T22:44:44.226Z",
  "v": 0
}

Here is a spreadsheet with those values converted to USD and Euros:

https://docs.google.com/spreadsheets/d/1I4fKG57WejzIKxoEydF8vdmY8cBS5wGQVEZ9FGh31GM/edit?usp=sharing

So it's 7.9€ (or $8.79) / 1000 votes.

As a reference, "Follow my Votes" says a classic paper ballot costs from $0.84 to $5.94. That's 100 to 600 times more!

We might get the price down by changing the gas price since it's actually the one thing we're paying for. I'll experiment and report back.