Capitalising a Smart Contract

toknormaltoknormal Member Posts: 4
Hi. I'm working on a design for a backed token along the lines of that descibed here: https://www.ethereum.org/token

My question is, is it possible for an Ethereum-based contract to own and control a private key from other blockchains ? The reason for this design is to be able to capitalise a smart contract with a portfolio of assets that back the token which runs on the Ethereum blockchain.

Any tips welcome !

Comments

  • o0ragman0oo0ragman0o Member, Moderator Posts: 1,291 mod
    @toknormal For a start, the private key won't be private if you put it in a contract.

    Have a look at btcrelay.org for an example of a cross chain interaction.
  • toknormaltoknormal Member Posts: 4
    Thanks. Didn't know about that. Will checkout btcrelay.

    I wanted the contract to be able to spend funds from an address which it itself had created (but which was capitalised by third parties) upon the fulfilment of certain conditions.
  • o0ragman0oo0ragman0o Member, Moderator Posts: 1,291 mod
    @toknormal
    So something like:
    Factory creates Gizmos
    Factory funds Gizmos
    Factory calls Gizmo spend function

    But all using some other coin?
  • toknormaltoknormal Member Posts: 4
    edited May 2016
    No. The ability to create meta currencies on Ethereum lends itself to starting the growth of a second financial tier in cryptocurrency - one that isn't fixed supply.

    This is an essential component of a mature financial system because fixed supply assets (so called "sound money") are required for long term storage of value while variable supply currencies are required for trading and price stability. However there's not much point in creating a decentralised version of such a model if you can't capitalise the tokens with an asset base. Ok I know you can use Ethers but ideally you don't really want to enforce a nasty coupling between the Ethereum meta token and its backing asset.

    The potential this has is quite huge because the meta token can be allowed to inflate according to certain pre-defined conditions, including when some un-predicted growth occurs in the token's "micro-economy". The Solidity guides appear to be aware of this potential because they allude to just such a scenario, however it only mentions using Ethers as the "backing asset" which kind of defeats the purpose of enabling the creation of supra-blockchain currencies to some extent.

    When you say "the private key won't be private if you put it in a contract", does that mean that a contract cannot have any private data or properties at all ? Even constants ?
  • o0ragman0oo0ragman0o Member, Moderator Posts: 1,291 mod
    toknormal said:

    No. The ability to create meta currencies on Ethereum lends itself to starting the growth of a second financial tier in cryptocurrency - one that isn't fixed supply.

    This is an essential component of a mature financial system because fixed supply assets (so called "sound money") are required for long term storage of value while variable supply currencies are required for trading and price stability. However there's not much point in creating a decentralised version of such a model if you can't capitalise the tokens with an asset base. Ok I know you can use Ethers but ideally you don't really want to enforce a nasty coupling between the Ethereum meta token and its backing asset.

    The potential this has is quite huge because the meta token can be allowed to inflate according to certain pre-defined conditions, including when some un-predicted growth occurs in the token's "micro-economy". The Solidity guides appear to be aware of this potential because they allude to just such a scenario, however it only mentions using Ethers as the "backing asset" which kind of defeats the purpose of enabling the creation of supra-blockchain currencies to some extent.

    I need to reread when I have the time...
    toknormal said:


    When you say "the private key won't be private if you put it in a contract", does that mean that a contract cannot have any private data or properties at all ? Even constants ?

    @toknormal Nodes can access all data in the State even if contracts can not. Fixed types (int, bytes etc) have implicit getters and can be read pretty much from anywhere. Mappings are a bit harder to get to as their key hashes to the address the value is stored at and so needs to be known. Similar with arrays but they are sequential addresses. Constants are compiled to literals in the byte code.

    So yes, while all data might not be explicitly public, all data is discoverable in order for state changes to be validated.

    Homomorphic Encryption is an active research field that seeks to develop operations/mutations upon cypher text without requiring it to be unencrypted first.



  • toknormaltoknormal Member Posts: 4
    Ok, thanks a lot for your input. Much appreciated !
Sign In or Register to comment.