elective-stereophonic
elective-stereophonic
Referenced Smart Contracts singapore
Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest Nxt Client: Nxt 1.11.15

Author Topic: Referenced Smart Contracts  (Read 1873 times)

sv3n

  • Sr. Member
  • ****
  • Karma: +29/-0
  • Offline Offline
  • Posts: 268
    • View Profile
Referenced Smart Contracts
« on: August 28, 2014, 03:10:01 pm »

I had an idea on some of the specs for contracts. I know it's being worked on, but I wanted to contribute some thoughts on it before it's finalized.

Contracts should be spilt into two stages. The first stage is a contract issue transaction. This transaction would contain all the scripts and a set of parameters that can be used to define new contracts using these scripts. The second stage would be a new contract transaction, where the scripts are referenced and the parameters set.

For example, a pay dividends contract is issued that defines the scripts needed to execute and a set of parameters to define its operation, such as dividend amount and frequency, and associated asset ID. Then anyone requesting a new pay dividends contract need only reference the issued contract transaction and define the necessary parameters.

This reduces blockchain bloat and verification times for every new contract. It also allows markets to be very easily setup around these new contracts. Consider a bond market. An interface can easily be built around a single reference bond contract and the API need only track open contracts referenced to it. If there are new contracts issued that are slight variations on the original bond contract, those can be added as more people start requesting new contracts from that modified contracts. Now instead of having to verify the code of every new contract claiming to be a bond, the interface only need to list the contracts it tracks.

I have a bit more on the technical side that I've been thinking about, but I wanted to get the high level picture out there while it was still fresh.
Logged
NXT-QK6T-BTVP-N8SL-9ZLD4

Come-from-Beyond

  • Hero Member
  • *****
  • Karma: +794/-671
  • Offline Offline
  • Posts: 4013
    • View Profile
Re: Referenced Smart Contracts
« Reply #1 on: August 28, 2014, 06:36:03 pm »

Initial plan is to have autonomous contracts. Then it's planned to add invokable contracts.
Logged

sv3n

  • Sr. Member
  • ****
  • Karma: +29/-0
  • Offline Offline
  • Posts: 268
    • View Profile
Re: Referenced Smart Contracts
« Reply #2 on: August 28, 2014, 06:39:47 pm »

Will the blockchain then have to support both or is the idea to phase out the autonomous contracts?
Logged
NXT-QK6T-BTVP-N8SL-9ZLD4

Come-from-Beyond

  • Hero Member
  • *****
  • Karma: +794/-671
  • Offline Offline
  • Posts: 4013
    • View Profile
Re: Referenced Smart Contracts
« Reply #3 on: August 28, 2014, 06:49:54 pm »

Will the blockchain then have to support both or is the idea to phase out the autonomous contracts?

Both.
Logged

sv3n

  • Sr. Member
  • ****
  • Karma: +29/-0
  • Offline Offline
  • Posts: 268
    • View Profile
Re: Referenced Smart Contracts
« Reply #4 on: August 28, 2014, 06:56:50 pm »

Is there a benefit to having both? I'm not sure that the lead time to invokable contracts is that much longer. Once executed, the action is the same, it's just initial processing, so the code base should be very similar.
Logged
NXT-QK6T-BTVP-N8SL-9ZLD4

Come-from-Beyond

  • Hero Member
  • *****
  • Karma: +794/-671
  • Offline Offline
  • Posts: 4013
    • View Profile
Re: Referenced Smart Contracts
« Reply #5 on: August 28, 2014, 07:11:07 pm »

Is there a benefit to having both? I'm not sure that the lead time to invokable contracts is that much longer. Once executed, the action is the same, it's just initial processing, so the code base should be very similar.

There is no benefit of having both, it's just for convenience of humans.
Logged

sarbao

  • Newbie
  • *
  • Karma: +0/-0
  • Offline Offline
  • Posts: 7
    • View Profile
Re: Referenced Smart Contracts
« Reply #6 on: October 10, 2014, 10:14:49 am »

Good morning,

     When are you planning to launch the smart contracts ?. Will they be available in the open source code to look at it ?


Regardsm

Salvador
Logged
 

elective-stereophonic
elective-stereophonic
assembly
assembly