13

Factom is a distributed data and records management and audit system. How easily can what Factom does be done in Ethereum? Are there any working DAPPS doing this? Could a simple smart contract take care of such a function?

  • 1
    For those of us who don't know, coul;d you elaborate on what Factom is? – Shelvacu Jan 21 '16 at 5:29
  • 1
    @shelvacu yup, sorry, it's a record/data-keeping service that utilizes the blockchain. It stores files in user-defined hierarchies and retains just the hashes for efficiency. – Joël Jan 21 '16 at 5:51
15

This is quite easy in Ethereum- far easier than on Bitcoin.

In Bitcoin, one needs to create a custom client that can read and write specially formatted data to the blockchain, and needs to create rules for who is allowed to manipulate and access that data. In Ethereum, a few lines of code can suffice to create a permissions, timestamping, and notary system.

For example, I just threw together this code, which would create a very simple document timestamping and signing system:

contract Notary{
    struct Document {
        uint timestamp;
        bytes ipfs_hash;
        address[] signatures;
    }
    mapping(address => bytes[]) public users; //maps addresses to ipfs document hashes
    mapping(bytes32 => Document) public documents; //maps sha3(ipfs) hashes to documents

    function addDocument(bytes ipfs) public {
        users[msg.sender].push(ipfs); //Add document to users's "signed" list
        address[] memory sender;
        sender[sender.length++] = msg.sender;
        documents[sha3(ipfs)] = Document(block.timestamp, ipfs, sender);
    }

    function signDocument(bytes ipfs) public {
        users[msg.sender].push(ipfs);
        documents[sha3(ipfs)].signatures.push(msg.sender);
    }

}

Just upload the documents to ipfs, and input the file's hash to the contract.

Anyone could now use this contract as much as they liked, build their own interfaces for it, or anything else they could dream up, and all of the data would be guaranteed to be permanently time stamped and stored.

ConsenSys is working on a notary system (EtherSign) and a triple-entry accounting system (Balanc3) that is pretty similar.

  • Care to expand on why it's far easier? – Joël Jan 21 '16 at 5:52
  • isn't one of the key benefits of using factom that of batching proofs into a single transaction though? A fully decentralised alternative based on a smart contract (as in the above example) would loose this benefit and would require a transaction for every individual proof (therefore increasing cost and bloating the blockchain). Right? – zanzu Feb 14 '16 at 18:29
  • When trying to use addDocument I get "Solidity exception (bad jump)" – Fernando Tiberti Feb 24 '16 at 20:41
  • @Fernando Tiberti it should work now – Tjaden Hess Feb 24 '16 at 20:44
3

You can easily implement Factom on Ethereum, but you should understand that such storage is significantly more expensive than Factom at least until Serenity.

The reason is that in Ethereum every node process every call and store every piece of data. Factom have quite efficient federated mechanism that makes storage cheaper without any validation possibility.

In order to solve that in Ethereum you can effectively use private chains such as Eris or Strato to store your data on your node and anchor this data in the main public chain. That is almost identical to how Factom do.

2

Factom is a general purpose data layer for storing application managed data. For Ethereum, Factom can provide information which can be used to drive contracts. Think of it as how you know what contracts to participate in, rather than how to implement a contract.

Factom will be anchored into Ethereum, as it is anchored into Bitcoin. This means an application that uses Ethereum can also use Factom without having to bring in the Bitcoin blockchain for validation.

You can implement Factom in nearly any blockchain. So yeah, you can implement Factom in Ethereum. However, Factom will be a lower cost solution for Data validation, and will enable cross blockchain information exchange (since anchors will be placed in multiple chains).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.