# Welcome to the Corda repository!

This documentation describes the prototype of a proposed architecture for distributed ledgers.

The goal of this prototype is to explore fundamentally better designs for distributed ledgers than what presently exists on the market, tailor made for the needs of the financial industry. We are attempting to prove or disprove the following hypothesis:

The combination of

- An upgraded state transition model
- Industry standard, production quality virtual machines and languages
- An advanced orchestration framework
- Limited data propagation
- Conflict resolution without proof of work or blocks

is sufficiently powerful to justify the creation of a new platform implementation.

Read on to learn:

Overview

- What’s included?
  - Contracts
  - Kotlin
- Getting set up
  - If IntelliJ complains about lack of an SDK
  - Doing it without IntelliJ
- Data model
  - Overview
  - Comparison with Bitcoin
  - Comparison with Ethereum
  - Rationale for and tradeoffs in adopting a UTXO-style model
  - Rationale
  - Pros
  - Cons
- Transaction Data Types
  - Amount
  - Contract State
  - FungibleAssets and Cash
  - Transaction Types
  - Party and PublicKey
  - Date Support
- Consensus Model
  - Notary
  - Validation
  - Multiple Notaries
  - Timestamping
  - Implementation & Usage
- Networking and messaging
  - Messaging vs networking
  - Interfaces
  - In memory implementation
  - Network Map Service
- Running the demos
  - Trader demo
  - IRS demo
- Node administration
  - Monitoring your node
  - Uploading and downloading attachments
  - Uploading interest rate fixes
- The Interest Rate Swap Contract
  - Creating an instance and lifecycle
  - Technical Details

Tutorials

- Where to start
  - The trader demo
- Writing a contract
  - Starting the commercial paper class
  - States
  - Commands
  - The verify function
  - Using state groups
  - Checking the requirements
  - How to test your contract
  - Adding a generation API to your contract
  - Non-asset-oriented based smart contracts
- Protocol state machines
  - Introduction
  - Theory
  - A two party trading protocol
  - Suspendable methods
  - The state machine manager
  - Implementing the seller
  - Implementing the buyer
  - Progress tracking
- Writing oracle services
  - Introduction
  - The two basic approaches
  - Asserting continuously varying data that is publicly known
  - Asserting occasionally varying data that is not publicly known
  - Implementing oracles in the framework

Appendix

- Release process
- Steps to cut a release
- Release notes
  - Unreleased
  - Milestone 0
- Using the visualiser
- Code style guide
  - 1. General style
  - 2. Comments
  - 3. Threading
  - 4. Assertions and errors
- Building the documentation
  - Requirements
  - Build