elective-stereophonic
elective-stereophonic
Express your wish (Smart Contracts)
Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest Stable Nxt Client: Nxt 1.11.15 | Latest Experimental Nxt Client: Nxt 1.12.0e

Pages: 1 2 3 [4] 5  All

Author Topic: Express your wish (Smart Contracts)  (Read 38678 times)

Come-from-Beyond

  • Hero Member
  • *****
  • Karma: +794/-671
  • Offline Offline
  • Posts: 4013
    • View Profile
Re: Express your wish (Smart Contracts)
« Reply #60 on: July 17, 2014, 12:29:09 pm »

TF is decentralized when fully implemented?

Yes.
Logged

allwelder

  • Hero Member
  • *****
  • Karma: +196/-13
  • Offline Offline
  • Posts: 1867
  • NxtChina.org
    • View Profile
    • NxtChina.org
Re: Express your wish (Smart Contracts)
« Reply #61 on: July 17, 2014, 12:38:11 pm »

TF is decentralized when fully implemented?

Yes.
A sigh of relief to hear that NXT will be fully decentralized. ;D
Logged
NxtChina |Weibo |Twitter Donation welcomed:NXT-APL9-66GU-K8LY-B3JJJ

Come-from-Beyond

  • Hero Member
  • *****
  • Karma: +794/-671
  • Offline Offline
  • Posts: 4013
    • View Profile
Re: Express your wish (Smart Contracts)
« Reply #62 on: July 17, 2014, 12:47:39 pm »

A sigh of relief to hear that NXT will be fully decentralized. ;D

It's decentralized already.
Logged

VanBreuk

  • Hero Member
  • *****
  • Karma: +362/-19
  • Offline Offline
  • Posts: 2772
    • View Profile
Re: Express your wish (Smart Contracts)
« Reply #63 on: July 17, 2014, 01:43:41 pm »

I'm moving this thread to the new Smart Contracts board under Technical Discussion, by request.

Please note that all the Technical Discussion boards, 'General' aside, have been now organized alphabetically for easier browsing.
Logged
GPG Fingerprint: B020 D1C1 F289 3B2C 3577  9EAD 455D D175 5913 C7F1

Zahlen

  • Full Member
  • ***
  • Karma: +26/-4
  • Offline Offline
  • Posts: 228
    • View Profile
Re: Express your wish (Smart Contracts)
« Reply #64 on: July 21, 2014, 09:06:41 am »

Do you think not being Turing Complete is a good thing? I think it's a limitation which will cause problems in the long run. People will start writing and using Smart Contracts, and then as their requirements get more demanding they'll have to switch to Automated Transactions. Having to code the same thing twice is a burden, and having to ensure the behaviour is identical will be a challenge that may need to be satisfied for legal reasons.

I think it's a good thing. We don't need to care about trojans and worms.

(Hey Cfb! Long time.)

Not being Turing complete isn't protection against malicious code. e.g. consider the following set of instructions:

goto position n in memory
write 0 and move to next position
write 1 and move to next position

These instructions aren't Turing complete; they can't read any input, so they can't produce output based on input. They can only produce fixed output. But they're capable of malicious behavior, depending on where 'goto' and 'next position' can reach. Anywhere they can reach they can overwrite, so no data within their range is safe. And if they can reach past the bounds of the memory allocated to the script interpreter, then they're capable of buffer overflow attacks.

The problem isn't with what can be computed (which is all Turing completeness describes). The problem is what the instructions can *do*. This is what needs to be restricted, whether it's AT or something possibly simpler for smart contracts. 


Computational capabilities aside, I like the idea of a higher level language that isn't built on the low level AT opcodes. It could be easier for noob coders (like me!) or even non-coders to use. Think excel-like formulas like Sum(address, firstTX:lastTX) vs assembly-like opcodes, or even a python-like language built on AT opcodes. Could also be interpreted faster than something built from opcodes.
Logged

Come-from-Beyond

  • Hero Member
  • *****
  • Karma: +794/-671
  • Offline Offline
  • Posts: 4013
    • View Profile
Re: Express your wish (Smart Contracts)
« Reply #65 on: July 21, 2014, 10:08:18 am »

Not being Turing complete isn't protection against malicious code. e.g. consider the following set of instructions:

goto position n in memory
write 0 and move to next position
write 1 and move to next position

Why do u think that this is not Turing complete?
Logged

Zahlen

  • Full Member
  • ***
  • Karma: +26/-4
  • Offline Offline
  • Posts: 228
    • View Profile
Re: Express your wish (Smart Contracts)
« Reply #66 on: July 24, 2014, 06:08:32 am »

It can only compute constant functions, i.e. f(input) = constant (by simply printing the constant). It cannot compute any non-constant function like f(input) = input, because it cannot read any input.
Logged

Come-from-Beyond

  • Hero Member
  • *****
  • Karma: +794/-671
  • Offline Offline
  • Posts: 4013
    • View Profile
Re: Express your wish (Smart Contracts)
« Reply #67 on: July 24, 2014, 06:47:01 am »

It can only compute constant functions, i.e. f(input) = constant (by simply printing the constant). It cannot compute any non-constant function like f(input) = input, because it cannot read any input.

Ok. But that particular language used in Smart Contracts is not able to write anything.
Logged

Zahlen

  • Full Member
  • ***
  • Karma: +26/-4
  • Offline Offline
  • Posts: 228
    • View Profile
Re: Express your wish (Smart Contracts)
« Reply #68 on: July 26, 2014, 07:16:40 am »

(Back to 'Express my wish')

Personally I'm more interested in consumer-oriented stuff than business-oriented stuff. I'd like to buy stuff, like '10 nxt for 1 Regular pizza token, 18 nxt for 2, 25 nxt for 3 (redeemable at any of our outlets)', 'Today only, 10 pseudorandom pseudolucky buyers get a free pizza token', 'Pay n nxt to our store account and get an encrypted AM with your game code'
Logged

landomata

  • Hero Member
  • *****
  • Karma: +121/-26
  • Offline Offline
  • Posts: 1535
    • View Profile
    • Newbium
Re: Express your wish (Smart Contracts)
« Reply #69 on: July 26, 2014, 07:19:49 am »

(Back to 'Express my wish')

Personally I'm more interested in consumer-oriented stuff than business-oriented stuff. I'd like to buy stuff, like '10 nxt for 1 Regular pizza token, 18 nxt for 2, 25 nxt for 3 (redeemable at any of our outlets)', 'Today only, 10 pseudorandom pseudolucky buyers get a free pizza token', 'Pay n nxt to our store account and get an encrypted AM with your game code'

Or a free movie, MP4 download, etc.

Zahlen

  • Full Member
  • ***
  • Karma: +26/-4
  • Offline Offline
  • Posts: 228
    • View Profile
Re: Express your wish (Smart Contracts)
« Reply #70 on: July 26, 2014, 08:08:50 am »

Ooo yeah, through magnet links. (Have they been integrated yet?)
Logged

igmaca

  • Full Member
  • ***
  • Karma: +12/-3
  • Offline Offline
  • Posts: 224
    • View Profile
Re: Express your wish (Smart Contracts)
« Reply #71 on: July 26, 2014, 09:23:12 am »

There would also actus be analyzed . actus open source smart contracts.

This software Ethereum is based

The Alfred P. Sloan Foundation awarded Stevens Institute of Technology a grant to work on the proposal entitled "Creating a standard language for financial contracts and a contract-centric analytical framework". The standard follows the theoretical groundwork laid down in the book "Unified Financial Analysis" (1) - UFA.The goal of this project is to build a financial instrument reference database that represents virtually all financial contracts as algorithms that link changes in risk factors (market risk, credit risk, and behavior, etc.) to cash flow obligations of financial contracts. This reference database will be the technological core of a future open source community that will maintain and evolve standardized financial contract representations for the use of regulators, risk managers, and researchers.
The objective of the project is to develop a set of about 30 unique contract types (CT’s) that represent virtually all existing financial contracts and which generate state contingent cash flows at a high level of precision. The term of art that describes the impact of changes in the risk factors on the cash flow obligations of a financial contract is called “state contingent cash flows,” which are the key input to virtually all financial analysis including models that assess financial risk.

http://www.projectactus.org/
Logged
nxt is the divine matrix with which everyone can forge anything

ChuckOne

  • Hero Member
  • *****
  • Karma: +293/-17
  • Offline Offline
  • Posts: 3450
  • ☕ NXT-4BTE-8Y4K-CDS2-6TB82
    • View Profile
Re: Express your wish (Smart Contracts)
« Reply #72 on: July 27, 2014, 12:16:11 am »

The contract language needs to be as simple as shit.

Please avoid something like this http://www.erights.org/elib/capability/ode/ode-capabilities.html#simple-money

Modern (aka smart) people deserve modern languages like Python.

Understanding functional languages (and their syntaxes) can be really tricky. Do you have a concrete syntax in mind alright?

I would vote for a declarative approach like SQL, HTML or RDF.
Logged

Come-from-Beyond

  • Hero Member
  • *****
  • Karma: +794/-671
  • Offline Offline
  • Posts: 4013
    • View Profile
Re: Express your wish (Smart Contracts)
« Reply #73 on: July 27, 2014, 06:44:44 am »

The contract language needs to be as simple as shit.

Please avoid something like this http://www.erights.org/elib/capability/ode/ode-capabilities.html#simple-money

Modern (aka smart) people deserve modern languages like Python.

Understanding functional languages (and their syntaxes) can be really tricky. Do you have a concrete syntax in mind alright?

I would vote for a declarative approach like SQL, HTML or RDF.

It's very similar to SQL.
Logged

jl777

  • Hero Member
  • *****
  • Karma: +718/-123
  • Offline Offline
  • Posts: 6170
    • View Profile
Re: Express your wish (Smart Contracts)
« Reply #74 on: August 08, 2014, 09:09:15 pm »

This might be a bit offtopic, I apologize if it is, but this thread has the attention of the right people.

I have added C interpreter to run in NXTservices. Now clearly it is Turing complete as it is almost full C language (picoc), but of course each node is running a separate set of scripts (tradebots), so clearly it is not decentralized.

My question is what happens if I enforce identical tradebots to be on all participating nodes. Now we are not requiring a synchronized blockchain, but rather a synchronized set of tradebots. I think this is something in between a decentralized system and just a network of independent nodes. Not sure if there is a technical name for this, but that is not so important, just curious about that.

OK, now we take the big step. All of the synchronized tradebots now synchronize data by communicating with each other. At this point, we have identical code and identical data on all the participating nodes. As near as I can tell, this is a decentralized system.

So, if I am correct, then does that mean it is possible to create an offblockchain blockchain? Is this a sidechain, parallel chain?

Regardless of what it is, I think it could be a useful testbed for trying out new things.

James
Logged
There are over 1000 people in SuperNET slack! http://slackinvite.supernet.org/ automatically sends you an invite

I am just a simple C programmer

benjyz

  • Hero Member
  • *****
  • Karma: +71/-4
  • Offline Offline
  • Posts: 508
    • View Profile
Re: Express your wish (Smart Contracts)
« Reply #75 on: August 11, 2014, 07:17:41 am »

Question: why relational algebra? IMO smart contracts have a special temporal component, similar to node.js, see:

https://github.com/nicksz/jTime
http://nakamotoinstitute.org/contract-language/
http://www.erights.org/smart-contracts/
Logged

supernova

  • Newbie
  • *
  • Karma: +1/-0
  • Offline Offline
  • Posts: 4
    • View Profile
Re: Express your wish (Smart Contracts)
« Reply #76 on: October 19, 2014, 06:12:31 pm »

Will this be possible? Let's say I want to create an asset that has a constant value of $1000. I create a program that reads NXT/USD prices from coinmarketcap and feeds them into the blockchain by using Arbitrary Messages. Note that the buyer of the USD assets doesn't have to trust these prices, see below. Everything else happens automatically by the smart contract.

The smart contract has an account initialized with a high amount of NXT. This NXT is locked for one year, which is the lifetime of the USD assets the contract gives its users. Users can either buy or sell USD assets at the current price advertised on the blockchain. When buying USD, the user sends NXT and the contract sends back an USD asset. When selling USD, the user sends an USD asset and the contract sends back NXT. Users can decide whether to buy or sell at the current price, so there should be no reason for the contract to have incorrect prices.

EDIT: Also the smart contract should automatically buy one USD asset for itself to match each USD asset bought by clients.
« Last Edit: October 20, 2014, 05:41:49 pm by supernova »
Logged

Brangdon

  • Hero Member
  • *****
  • Karma: +229/-25
  • Offline Offline
  • Posts: 1389
  • Quality is addictive.
    • View Profile
Re: Express your wish (Smart Contracts)
« Reply #77 on: October 19, 2014, 11:30:01 pm »

feeds them into the blockchain by using Arbitrary Messages.
Small point: wouldn't Aliases make more sense?
Logged

supernova

  • Newbie
  • *
  • Karma: +1/-0
  • Offline Offline
  • Posts: 4
    • View Profile
Re: Express your wish (Smart Contracts)
« Reply #78 on: October 20, 2014, 05:44:16 pm »

feeds them into the blockchain by using Arbitrary Messages.
Small point: wouldn't Aliases make more sense?

Aliases are fine, too.
Logged

Daedelus

  • Hero Member
  • *****
  • Karma: +230/-12
  • Offline Offline
  • Posts: 3280
    • View Profile
Re: Express your wish (Smart Contracts)
« Reply #79 on: December 10, 2014, 01:52:08 pm »

I create a program that reads NXT/USD prices from coinmarketcap and feeds them into the blockchain by using Arbitrary Messages.

This part sounds like it describes Fact Digitization > www.nxttechnologytree.com

Little has been said about how it will work, CfB/ChuckOne are the only ones who know I think.
Logged
NXT: NXT-4CS7-S4N5-PTH5-A8R2Q
Pages: 1 2 3 [4] 5  All
 

elective-stereophonic
elective-stereophonic
assembly
assembly