What is Lity

Lity is a new programming language for building blockchain smart contracts. It consists of a dynamically extensible language, a compiler, and a virtual machine on the CyberMiles blockchain. It is a superset of the Solidity language and is more extensible, performant, and safe. Specifically,

  • The libENI dynamic VM extension allows native functions to be added to the virtual machine on the fly, without stopping, forking or upgrading the blockchain.

  • Lity language’s built-in function schedule allows smart contracts to schedule timer tasks to be executed in the future, which is required by many real-world business contracts such as trust, will, installment payments, insurance, stock options, and investment returns.

  • Lity language’s built-in function isValidator allows smart contracts to check whether the transaction sender is a current validator of the CyberMiles blockchain. Through the ValidatorOnly modifier, we can create “trusted” smart contracts that can only be updated by validators on the CyberMiles blockchain. A common use case of such trusted smart contracts is for them to serve as oracles to provide off-chain and cross-chain states.

  • The upcoming Lity Rules Engine allows formal business rules to be embedded in smart contracts. That could drastically increase developer productivity and reduce errors.

  • The Lity language prevents integer overflow errors. It introduces a new number type called safeuint. It is an unsigned integer (uint) but all safeuint operations are automatically wrapped in SafetMath functions. Furthermore, the CyberMiles Virtual Machine (CVM) detects and stops integer overflows at runtime. The use of safeuint and CVM eliminates a large class of smart contract errors that resulted in significant fund loss in the past.

  • The Lity language supports fixed point real numbers, as opposed to integer-only arithmetics in Solidity.

  • Lity smart contracts support alternative gas prices. For example, the system can give gas price discounts to certain types of contracts to promote certain use cases on the blockchain.

  • The Lity compiler provides tooling for security and error checks before the Lity smart contract is deployed. The ERC checker in the Lity compiler analyzes the source code and automatically checks if the contract conforms to known ERC standards. The compiler also integrates with the Oyente static analyzer to detect common error patterns from the compiled bytecode.

Still interested? Get started here!

The name Lity pays homeage to to Solidity, and inspires to be more flexible / expansible (liquid) and more performant (combustable) at the same time. Lity is developed by the CyberMiles Foundation in collaboration with Skymizer, and is released under GPL as Free Software. All rights reserved.