Lightweight Smart Contracts — Smart Contracts 2.0

Lightweight Smart Contracts are at the intersection of business and blockchain technology.

Lightweight Smart Contracts 2.0 are deployed on the Ignis blockchain of the Ardor Platform and solve serious shortcomings and vulnerabilities of the common smart contracts that popular blockchains are still trying to fix.

This means Smart Contracts on Ignis are ready for your business or digital application (dApp) now. Combined with more than 12 transactional features built into the blockchain and more than 250 APIs available, Lightweight Smart Contracts 2.0 substantiate the reputation of Ardor Platform as a true Blockchain-as-a-Service.

You don’t need to learn a new programming language to get started. Lightweight Smart Contracts 2.0 are written in the very popular Java language. If you are familiar with smart contracts and ready to get started, find the technical information you need on the Ardor Learning Hub.Write a Smart Contract

What is a Smart Contract

  • A smart contract is an agreement between two parties written in computer code. Smart contracts run on the blockchain. That means they are stored on a decentralized, public database and cannot be hacked or changed.
  • The transactions in a smart contract are processed by the blockchain based on programmed events or triggers that execute automatically and do not depend on a third party.
  • Issue of trust and dependability on outside services to guarantee the contract are eliminated because a Smart Contract depends on conditions written into the code and not on people.

Shortcomings of Smart Contracts on Popular Blockchains

Recently many shortcomings and vulnerabilities of well-known smart contract frameworks have been exposed and render them unreliable as reliable tools for mainstream business use. Some of the problems have been identified in the following list:

  • Repairing Bugs in the Code – If there is a mistake in the code or security bug is discovered it is almost impossible to redeploy the contract.
  • Transaction Fees – To use the popular smart contract platforms you need to buy some “gas”, a special cryptocurrency used to pay the transaction fees. This means there will be learning curve hurdles and even cryptocurrency related tax implications for your end users.
  • Integration with Oracles and External Services – Common Smart Contracts belong to a blockchain network and cannot interact with external systems like a cloud based service, local databases or game engines.
  • New Coding Languages to Learn– Solidity and RIDE are new, complex and relatively unknown coding langauges to even experienced software developers create a barrier to learning and executing smart contracts for mainstream business use. These platforms also provide are also fewer reliable libraries and tools to use in the development process.
  • Privacy – The nature of a decentralized blockchain makes it nearly impossible or very complex to create verifiably replicable random numbers to use in smart contract creation and to store secret information.

Common smart contracts on well known blockchains have experienced these vulnerabilities and the result has been the loss of user funds or circumstances where the funds become unavailable. Lightweight Smart Contracts 2.0 solved these problems and provide easy to use methods to create and execute smart contracts on the Ignis blockchain of the Ardor Platform.

How Lightweight Smart Contracts 2.0 Solve Common Problems

Lightweight Smart Contracts on the Ardor platform offer a new approach to improve the common smart contract vulnerabilities and shortcomings. These new “stateless” contracts are written in Java, allowing developers to automate business processes on the blockchain in a well-known coding language, while leveraging 250+ APIs to launch digital assets, marketplaces, voting systems, cloud storage solutions, messaging applications, and more. The issues of first-generation smart contracts, lightweight contracts address those issues of security bugs and broken code, transaction fees, integration with oracles and external systems, and privacy are addressed with these unique features:

  • Two Step Contract Deployment – Smart Contract code is deployed to Ignis and other Ardor child chains as a cloud data item, which stores a signed and time-stamped copy of the executable code on the blockchain, and a contract reference, which serves as a pointer from a specific contract runner account to the contract code, while defining setup parameters for the contract. This level of indirection simplifies contract upgrades- all developers need to do is deploy a new version of the contract and then gradually update existing references to it.
  • Owner Sponsored Fees – Transaction fees can be covered by the application or business service owners using the customized “bundlers” feature of the Ardor Blockchain Platform. This means the end users do not have the burden of learning about or dealing with cryptocurrency. They just use your service and you handle the fees on the backend.
  • Oracles and External Data Integrations – Lightweight Smart Contracts easily Interface with external data systems, like cloud services and game engines. This feature makes is easier to integrate legacy business systems with the blockchain.
  • Privacy – Random numbers can be generated use in Lightweight Smart Contracts and secret information can be saved privately on.

Lightweight Smart Contracts are deployed on individual, selected nodes on the blockchain network, with optional verification and approval nodes reproducing results to ensure transparency and fairness. This provides a significant level of confidence in the output transactions of Lightweight Smart Contracts. This is a completely new approach and the question is asked “What happens if a user sends a transaction to the node running a “contract runner” – and the node fails to execute the contract?”

Hashed Secrets Solve Single Node Trust Issues

The trust problem lies at the core of all systems looking to deploy smart contracts on individual nodes. After several months of research, the developers at Jelurida finally found their solution by repurposing a lesser-known feature deployed on NXT back in 2015, known as phased transactions by hashed secrets. The basic idea is that funds sent by the user are not credited to the contract runner account. Instead, funds are held in a temporary escrow by the blockchain itself until the contract runner executes the contract and the user, after validating the resulting transaction, reveals the secret. As a result, the user transaction and the contract reply transactions are either both approved or both ignored and funds are unable to be permanently locked or stolen.

Jelurida - developers of Ardor / Ignis / Nxt Cryptocurrencies and Blockchains

The ingenuity of Jelurida, the developers of Ardor, Ignis and Lightweight Smart Contracts is evident again as they pave the way with blockchain innovation. While others are still talking, Ardor delivers.

Advantages of Lightweight Smart Contracts 2.0 Over Traditional Contracts

  • Autonomy
  • Trust
  • Backup
  • Safety
  • Speed
  • Savings
  • Accuracy

How Lightweight Smart Contracts 2.0 Will Change How We Do Business

  • Government
  • Business Management and Work Flow
  • Supply Chain
  • Health Care
  • ICO and STO
  • Financial Instruments
  • More