Pages:
Author

Topic: Nxt :: Automated Transactions (AT) - progress and discussion (Read 17287 times)

legendary
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
I have decided to move further discussion about AT to CIYAM Open:

http://ciyam.org/open/?cmd=view&data=20140228080813138000&ident=M100V120&chksum=ba3b7b5c

It's free to sign up for an account (and CIYAM Open supports OpenID so you can use a gmail account or the like) so don't be shy!
legendary
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
As AT has a "Turing complete" instruction set and state then aside from restrictions to the max. # of steps that can be executed by any "forger" and restrictions to the max. # of bytes of state you will be permitted to use you will be able make an AT do whatever you like it to.

For the initial implementation there will be fairly strict limits on data storage (state). A possible way to be able to have more state will be to use Service Providers for that down the track.
legendary
Activity: 1470
Merit: 1004
How far do you intend go with the turing-complete vm? Do you have similar plans as the Ethereum guys who apparently want to run everything on top of their turing-complete contracts and include options like decentralized paid storage etc. Do you intend to include similar options as well, like paid storage and other more external oriented options, or do you have other goals in mind?

I think CIYAM will develop to the point where others can continue in any direction they want.  I'm not sure if there are any specific plans, but I would also like to know the answers to your questions.
newbie
Activity: 57
Merit: 0
How far do you intend go with the turing-complete vm? Do you have similar plans as the Ethereum guys who apparently want to run everything on top of their turing-complete contracts and include options like decentralized paid storage etc. Do you intend to include similar options as well, like paid storage and other more external oriented options, or do you have other goals in mind?
legendary
Activity: 1470
Merit: 1004
This was posted in main Nxt thread, might be a good guideline.

Smart Contracts used by Ethereum

http://www.actuss.com/doc/classes.html

Features

ACTUS Contract Calculator
4.1 Principal At Maturity (PAM)

The PAM contract type encompasses many common financial contracts. Most typical representative is the classical government bond. It also covers money market funds, fixed deposits and also all sorts of bullet type loans. Beyond simple fixed rate instruments it accommodates many complex variants such as variable rate instruments and instruments with capitalization.
Principal At Maturity Calculator
4.2 Annuity (ANN)

ANN contract type at its simplest form represents an annuity payment, where principle and interest are paid out over a specified period of time. Common mortgages in several countries follow this pattern. This contract type can represent fixed and variable rate annuities, also including grace period, irregular payments and so on.
Annuity Calculator
4.3 Stock (STK)

A STK contract represents a certain quantity of equity issued by a company.
Stock Calculator
4.4 Future (Futur)

A FUTURE is a standardized contract to buy or sell specified asset at a price agreed upon today with payment occurring at a specified future date. Underlying assets can be Bonds, stocks, commodities or FX rate related instruments. In ACTUS, a FUTUR is represented with a parent-child relationship, with the child being the underlying asset. Closely related to FUTURE is the margining process, which can be modeled in many facets.
Future Calculator
4.5 Swap (SWAP)

A SWAP is a derivative in which counterparties exchange cash flows of one party's financial instrument for those of the other party's financial instrument. In ACTUS, it is represented with a parent-child relationship having two children, which are basic CT’s (such as PAM or ANN). This method of combination of basic CT’s allows ACTUS to represent multiple other variants of swaps, an example being amortizing swaps.
Swap Calculator
4.6 Option (OPTNS)

An OPTION gives the holder the right to buy or sell an underlying asset for a given price (Strike) on or before a specified future date. In ACTUS, it is represented with a parent-child relationship, where the underlying child can be a Bond, stock, commodity or FX rate related instrument. All variants of call/put and American, Bermudan and European options are (or will be) supported in ACTUS.
Option Calculator
legendary
Activity: 1470
Merit: 1004
This scheme dont need reputation or trustness. If automate this in nxt-protocol then we dont need third-party as nasx.com for exchange.

Nice - I think we could indeed create an AT to do this. Because the code is open and unable to be changed after the AT creation tx is confirmed then it can actually be "trusted" to do things like this.

The tricky part is going to be able to make sure that people know a trustworthy AT from an "evil" AT (that requires being able to understand the code which is why that code needs to be as simple as possible).


+1, I like the nashx approach.  Also, really like the idea of posting Nxt projects on your site, I have BTC saved for it!
https://bitcointalksearch.org/topic/m.5403299
legendary
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
This scheme dont need reputation or trustness. If automate this in nxt-protocol then we dont need third-party as nasx.com for exchange.

Nice - I think we could indeed create an AT to do this. Because the code is open and unable to be changed after the AT creation tx is confirmed then it can actually be "trusted" to do things like this.

The tricky part is going to be able to make sure that people know a trustworthy AT from an "evil" AT (that requires being able to understand the code which is why that code needs to be as simple as possible).
newbie
Activity: 38
Merit: 0
May be just implement nasx.com escrow scheme on protocol level?
http://nashx.com/HowItWorks
http://nashx.com/FAQ

This scheme dont need reputation or trustness. If automate this in nxt-protocol then we dont need third-party as nasx.com for exchange.
legendary
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
EDIT: I was just talking about which accounts an AT could send transactions from, definitely makes sense to restrict that.

All AT txs come "from the AT" (as it has it's own account).
member
Activity: 98
Merit: 10
I've also specified that the start of the data area (for constants) could be provided with the AT creation tx.

Oh right! I missed that.
legendary
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
With this change, would it still be wise to initialize data pages as 0? Cause then you may have to SET a lot of VALs through the code pages first.

All data in the VM would be expected to be zeroed prior to it being called and I've also specified that the start of the data area (for constants) could be provided with the AT creation tx.

Also I have now added "indirect assignment" and "indexed indirect assignment" op codes so that if such initialisation was required then it would not take many op codes to do it.
member
Activity: 98
Merit: 10
Another update - I've removed four op codes (ADD_VAL, SUB_VAL, MUL_VAL and DIV_VAL) so that the only op code that requires a 64 bit value is SET_VAL.

With this change, would it still be wise to initialize data pages as 0? Cause then you may have to SET a lot of VALs through the code pages first.

EDIT: I was just talking about which accounts an AT could send transactions from, definitely makes sense to restrict that. Hadn't thought about the "to" part either.
legendary
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
As I understand, Ian's writing a virtual machine (VM) for ATs. That means a place set aside for ATs to perform their calculations, and that means ATs won't be allowed to interfere with the rest of your computer. I think ATs will also only be allowed to send transactions from the account that they're "assigned" to, so that's another good restriction.

Pretty close - certainly an AT won't be able to "damage" the forger's computer (even if it has an "infinite loop" coded it is of zero concern) but at this stage I hadn't planned restrictions on which account an AT could send money to (although it is perhaps unlikely that we would be letting it say iterate all accounts).

In general the practice of spamming should be taken care of by the fact that all txs require a fee (and we could even increase those fees for txs that originate from an AT). Also understand that the Nxt AT won't be talking to the Nxt API but to a Nxt AT API to keep it safely "sand-boxed".
member
Activity: 98
Merit: 10
Regarding Turing completeness, I have the math background to answer:

Saying that a programming language (whether AT, or Ethereum, or C++, or anything else) is "Turing complete" means that it can perform all the calculations that a Turing machine can perform. A Turing machine is a technical math/CS concept, but the key thing to take away for this discussion is that Turing completeness only says something about the calculations that can be performed. It doesn't say anything about actions.

Turing completeness is a good thing! It means ATs can read data sent to it and add, subtract, multiply, divide, compare this data, and perform all other computations that you'd normally expect a computer to be able to do.

Bad AT behaviour may indeed be possible, from actions like e.g. spamming AMs. But Turing completeness doesn't say anything about actions like sending nxt, or composing and sending an AM. These would be additional features of ATs. It's up to Ian and his team to decide what actions ATs should be allowed to/not allowed to do, to guard against bad behaviour.

As I understand, Ian's writing a virtual machine (VM) for ATs. That means a place set aside for ATs to perform their calculations, and that means ATs won't be allowed to interfere with the rest of your computer. I think ATs will also only be allowed to send transactions from the account that they're "assigned" to, so that's another good restriction.
legendary
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
Anyway, I have not the skills if those things they are saying are true or just bullshit as usual.

And that is always the problem with that part of the forum as basically no-one with real technical skills posts there (no point as they wouldn't understand a word of it).

But it isn't surprising that the "Turing complete" buzz word has caught some attention (as I think has DAC - and who knows - maybe they'll even end up posting questions about Nxt AT in the coming months).

Smiley
legendary
Activity: 952
Merit: 1000
Yeah! I hate ShroomsKit!
People on Speculation forum talking about Turing Completeness:

There's a good reason I *ignore* the Speculation part of this forum.


Just trying to inform here. Speculation forum is usually full of bullshit and madness, but I found really interesting that they are carrying such a topic there. Anyway, I have not the skills if those things they are saying are true or just bullshit as usual.

P.D: Cheers for your work!
legendary
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
People on Speculation forum talking about Turing Completeness:

There's a good reason I *ignore* the Speculation part of this forum.
legendary
Activity: 952
Merit: 1000
Yeah! I hate ShroomsKit!
People on Speculation forum talking about Turing Completeness:

Turing completeness is a horrible idea for scripting in a cryptocurrency. Just look at the past couple of decades of vulnerabilities in java, javascript, flash, etc, etc.  Turing complete money will drain your wallet on it's own.

The only thing I can see stopping it is another cryptocurrency which accomplishes everything that Bitcoin does and more, only with a codebase so different that Bitcoin can not adopt these added desirable features.

May I ask how important you feel Turing completeness is in the scripting language?

I'm sorry, I do not have the technical knowledge to answer this question. Give me a few days and I may be able to give you an answer.
legendary
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
Yeah, AT randomness is difficult, so perhaps an Escrow Coin Asset business would be better suited to handle.

We can possibly achieve it by using the "weight" of a block in the future.

Unfortunately as per my attempts to do some statistical analysis I don't if anyone will actually be able to provide any real data upon "how random" such a result would be (so am not thinking the "lottery" use case is now such a great one).
legendary
Activity: 1470
Merit: 1004
I think the problem could perhaps only be solved by some sort of more "random" process (which is not simple with an AT as it is not easy for an AT to actually get *random* data).

I am guessing if we could get enough randomness then our "whale lover's" donation (and I am not against the whales - so replace them with any other creature you like or dislike) could actually be just as likely to go to the "whale eater's" foundation.

That I guess would stop the money going into the "void" but keep anyone from having an "agenda" to not release funds.


Yeah, AT randomness is difficult, so perhaps an Escrow Coin Asset business would be better suited to handle.
Pages:
Jump to: