Lior Yaffe: Advanced Concepts in Blockchain Design

Lior Yaffe explains some design concepts that have made it into NXT and the upcoming Ardor platform, such as: Proof of Stake, Brain Wallets, Forging, Prunable data, The Ardor platform, Smart transactions and hard fork management.

The lecture took place on 27.7.2016, at Campus Tel Aviv.


Event page:…

Shareholders Meeting via Blockchain

It seems we are witnessing a revolution in the corporate world caused by blockchain technologies. We’re moving quickly towards a new business ecosystem of virtual corporations, distributed autonomous corporations, smart contracts, new models of funding and so on. This article is about the exciting possibility of having distributed shareholders’ meetings where results are public and counted in a trustless way.

Since late April last year, I’ve been working on the NXT cryptocurrency as a core developer. NXT is a 100% proof-of-stake cryptocurrency aiming “to transform a cryptocurrency into a decentralised financial platform that supports a thriving and fast-growing digital economy” (unlike hybrid Ripple’s approach which isn’t fully decentralized).

Since 12 May, NXT has had the Asset Exchange (NXT AE) as a core feature. Anyone can now issue assets on this totally decentralized and uncontrolled exchange and trade them.

You can monitor your Nxt asset purchases either via your client or via a number of independent web sites: NextBlocks, NXTReporting and SecureAE  (where you can also purchase Nxt and issue assets).

Read the asset descriptions and you’ll quickly gain an appreciation of the wide range of different applications and services that have already been built on top of the Nxt platform and they’re just the beginning; the start of what is set to evolve into an entire financial and economic ecosystem.

The key feature of the NXT AE for businesspeople is that they can fund their business via asset issuance, getting money from anyone (not just angels/VCs, as with KickStarter), and they can do so from day one and for a low fee.

Imagine getting funding directly from a community needing your product. And, wouldn’t it also be awesome to get feedback and community-powered decisions?

With the voting system I have finished recently that will all be possible. The voting system will be introduced in NRS (NXT Reference Software) 1.5. The latest release version is 1.4.16, so voting API & GUI is already accessible. I can share some API details right now as they will likely remain unchanged.

Also see: Nxt Voting Teaser video (GUI and functionality)

Consider the example of an indy developer making a game. First, he got some funds via the asset exchange. Then he made a promising v.1 of the game. Both the concept and its implementation are still raw but the fans are excited! So he wants to ask the community whether he should polish v.1 or instead build v.2 on the basis of a better concept, or… Having decided on the different options, he starts the poll:

    val question = "Further directions in game development. "
    val description = "I got some great reviews. I have 10000 NXTs left. How should I spend them?"

    val finishBlockHeight = Nxt.getBlockchain.getHeight + 1440 // ~= 1 day
    val options = Array("Improve graphics and release it ASAP", "Start to work on v.2 to get funds for it's development", "Better ask experts, e.g. attend GameDev Conference", "Game is abortive. Stop working on it.")

    val optionModel = Poll.OPTION_MODEL_CHOICE
    val votingModel = Poll.VOTING_MODEL_ASSET

    val pb = new PollBuilder(question, desc, options, finishBlockHeight, optionModel, votingModel)
    val assetId: Long =  // assetId here
    pb.optionsNumRange(1, 1) // only 1 option to choose

    issueTxToGodId(new Attachment.MessagingPollCreation(pb), phrase1)

A vote could be sent with following code:

    val poll = Poll.getByName(question).head
    val vote = Array(0.toByte, 1.toByte, 0.toByte, 0.toByte)
    val attachment = new Attachment.MessagingVoteCasting(poll.getId, vote)
    issueTxToGodId(attachment, phrase2) 

1440 blocks after starting the poll we can get and print to console poll results (where 1 asset=1 vote):

    val pr = PollResults.get(poll.getId).get
    pr match {
        case cpr: nxt.PollResults#Choice =
            val m = cpr.getResults.toMap

So, we are soon going to have fair, cheap, public and distributed shareholders voting! Just imagine how that could change the world of business.


1. This blog post (as revised) was first released by Kushti on 2. The minimum fee to issue an asset on the NXT AE is 1000 NXT. The transaction fee is currently 1 NXT.