ODCoin

From Open Source Ecology
Jump to: navigation, search

OSEDev Coin, or ODCoin, is the next iteration of the OSE Coin with slightly easier to say name (pronounced: "odd coin" or "7 odds") and built ontop of Ethereum's ERC20 standard instead of using Duniter (while preserving the Relative Theory of Money concepts).


What was wrong with OSE Coin based on Duniter?

A lot of architectural questions remain up in the air and it's not clear when Duniter will reach a stable enough point where other communities can safely and confidently adopt it for themselves. Furthermore, OSE does not need all of the features of Duniter and in fact could benefit from a slightly different approach to the WoT because we're a purpose driven community and want to tie the dividends to real world participation (only active OSEDevs get dividends).


Why not fork a bitcoin derivative or ethereum?

Bitcoin and derivatives are based on Proof of Work and there are no serious plans to switch to a more energy efficient consensus algorithm; therefore it's not appropriate for OSE.

Ethereum is still undergoing massive changes and we'd want to continue to benefit from upstream improvements and advances; especially with the Proof-of-Stake (Casper) changes that are coming.

Instead of forking ethereum and having to build out our own network and to constantly play catch up with upstream changes, it makes more sense to just build directly ontop of ethereum and benefit from it's scale, reputation and acceptance.


What is an ERC20 token standard?

ERC20 is a standard way of writing a contract in Solidity (Ethereum's programming language) so that the contract functions as a custom currency with a global ledger, thereby allowing people to create their own currencies. You just have to implement a handful of expected methods such as to check your balance, to send money, to approve a deposit, etc, and then your currency will work with all existing ethereum wallets and tooling.

See: https://github.com/ethereum/eips/issues/20


This sounds really easy to implement, what's the catch?

Actually, it is, that's why there are thousands of ERC20 tokens out there. There is a catch though:

The biggest issue for users with ERC20 tokens is that you still have to pay transaction fees (gas) in ether (Ethereum's base currency). Crypto currencies are already rather complicated for most people to use but when you add a requirement that fees (gas) are paid in one currency while the value is in another currency, things get drastically less user friendly.

Recently there was a proposal to solve this problem with some working implementations, ERC865: https://github.com/ethereum/EIPs/issues/865

Essentially, it's a way for users to pay the gas and the value of the transaction in the same ERC20 currency by going through a middleman who will on-the-fly convert the ERC20 gas payment into ether.

It works like this (assume this is automated by a wallet program):

  • Create a transaction, say you want to pay another OSE Developer 10 OSEDev Coins.
  • Ask the middleman how much it will cost to do the transaction, middle man will figure it out based on how much it will cost in ether, what the exchange rate is between ether and your custom currency and then maybe add a little extra fee for their service and then they respond with the final fee denominated in OSEDev Coins.
  • You then update your transaction to include the fees, re-encrypt everything and send it to the middleman again, the middleman verifies that you added the correct fee and then they send your transaction off to the real ethereum network and cover the gas with their own ether.
  • The Solidity contract inside of the ethereum network will then do the payment from you to the other developer but it will also deposit the fee to the middleman into the middlemans wallet.
  • Eventually the middleman will try to sell the OSEDev Coins so that she can get more ether to pay for more transactions.

This would allow people to use solely OSEDev Coins to transact. Someone who's willing to learn a little more about ethereum and wants to skip the middleman could still do transactions themselves and cover the gas fees using ethereum's base currency.


What are all the differences from the previous OSE Coin?

Conceptually it's the same dividend based system. Most of the FAQs from the previous proposal still apply.

ODCoin replaces the complex Web-of-Trust system in Duniter with a simple externally provided list of members. On a daily basis the ODCoin contract will simply deposit a dividend to every public key in the member list, the dividend is created out of thin air and follows all the same rules as defined by Duniter and the Relative Theory of Money. Other than the unique dividend system the ODCoin will function like any other ERC20 tokens.


How does the ODCoin contract know who gets dividends?

This is called the "oracle problem" in crypto circles. Essentially, the issue is that inside of the blockchain everything is safe, guaranteed and tamper proof but anything coming from the real world is not. How do you build a blockchain contract that combines real life events with on-chain transactions? You do it very carefully, with the assumption that everything will fail and that in the end you can't really trust the result too much. There are various products out there to help with this, such as oraclize.it.

The only real world input into the ODCoin that requires trust is the member list; this list impacts 1) who gets dividends and 2) who can submit an updated member list.

To start getting dividends your public key would have had to appear 15 consecutive days on the daily member list.

To stop receiving dividends your name would have to be off the list for 15 consecutive days.

This way if any part of the system is compromised there is a 15 day period in which something can be done about it; while everyone continues to receive dividends. At any point during the 15 days a maliciously added user can be removed from the list; them never getting any dividends. Conversely, a maliciously removed user can be added back at any point during the 15 day window when they are still receiving dividends and there would have been no lapse in dividends.

Further safeguards could be to limit the number of people added or removed during some period of time to some sensible number (for example, you can't add or remove in one day more than 10% of the existing member count).

Other than getting dividends the next benefit of being a member is that you can vote on where the member list comes from. This is so that if the private key or the server which sends the member list is somehow compromised it would be possible to switch to another server or trusted party. The phase-in/out time for voting is 30 days. This is discussed more in the next question.


What if all the osedev.org operators die in a fiery plane crash?

This problem is elegantly solved with the voting mechanism of where the member list can come from. Upon some catastrophe that prevents osedev.org from sending correct and reliable member lists to the blockchain, the existing OSE Dev members can rebuild everything via the following steps:

  • Select a new domain to replace osedev.org (in case osedev.org can no longer be used).
  • Checkout the osedev codebase from github and set it up.
  • Generate a new public/private key pair for the server to be used for submitting member list.
  • Ask all existing OSEDev members to vote for your public key via the ODCoin contract.
  • Commence submitting the daily member list from the new server.

If the emergency situation is due to the original server getting hacked or the key getting compromised then you'd have 15 days to setup the new server and get everyone to vote on the new public key before there would start to be negative repercussions (correct people not getting dividends or the wrong people getting dividends) and a full 30 days before there is no turning back (the bad guy gets voting rights and creates enough fake accounts to overwhelm the existing majority). Discussed further in the next question.


What if an attacker manages to add a bunch of fake public keys and outvote the legitimate OSEDev members?

The phase-in/out period for receiving or stopping to receive dividends is 15 days while the phase-in/out period to be able to vote is 30. Even if everyone is asleep at the wheel and do not notice the attack for the first 15 days, they will definitely start to notice it after the 15 days when dividend payouts change due to the attack. From that point there is another 15 days before the attacker would also gain voting rights and therefore before this 15 days is up the existing community can setup a new public key and vote on it.