Stateset
Stateset is a next-generation, secure, sales and finance automation platform for the world. There will be a collective oneness for all businesses where contracts, assets, capital, transactions and messages can be securely transacted freely without intermediaries or enforcement agents. Our vision for the enterprise software, SaaS computing and financial services industry is there will be an interoperable network of blockchains using a composable set of distributed b2b business and financial workflows that have a shared common global view between organizations.
Stateset is created on the most modern web application stack and framework I could find. I wanted to use the latest, fastest, most advanced technology stack on the planet to develop my b2b sales automation and financing platform. Stateset is the global set of states between companies and the latest set of UTXOs in the network. Stateset allows companies to transact directly for commerce with the expectation that the other party will act with integrity. The typical web application stack today is front-end repo for UI and back-end repo for services / classes / logic to update a database. The states that are being created between nodes in the network are automatically brought to the web application using a subscription API powered by GraphQL. For data that does not require multiple parties, or plain objects / entities, I am directly mutating the database but can do joins with states and reference that data is a state transitions.
Stateset is a global network of nodes transacting sale and finance information. Modules for different processes between counterparties are richly composable and distributed amongst a network of peers and nodes in the network. We exchange the paradigm of custom implemented and siloed workflows withing one organization for a new orchestrated, shared and agreed upon set of flows between nodes in a globally distributed network. We imagine entire value chains of trade partners onboarding into the network in groups of producers or consumers, lenders or merchants, brokers or providers, controllers or processors of data subjects; any form of party and counterparty. Robust data mapping has been built into the platform to ensure that these types of trade partners are using a platform the is logically centralized but organizationally decentralized across network participants. This is the natural progression of computing. Going from on-premise databases, to distributed cloud multi-tenant instances, to a completely decentralized global platform for business to business workflows involving sales, finance, back office and other key revenue driving processes. Stateset is the infrastructure for the future of this computing paradigm. There will be a network of interoperable economically incentivized blockchain networks; the cornerstone of the infrastructure of global economy over the next two decades.
Stateset at the infrastructure level is comprised of a distributed network of Corda Nodes used for business to business workflows. The network allows for net new nodes on the network to join and leave the network at will with unspent output recovery with other nodes in the network through the cluster of notary nodes. The Stateset Network is the authoritative, single state across multiple networks using a deterministic virtual machine. Stateset Network is logically centralized but organizationally decentralized across 1000’s of organizations around the world that are managing front, middle, back office and working capital lifecycles. The network leverages a thin waist and uniform peer-to-peer networking protocol for assimilation and standardization across the network. An organizations services on the network consists of the docker containers for user interface, Graphql engine, Spring REST service and each nodes PostgreSQL. Containers are provisioned using CodeShip and Terraform and are orchestrated using Kubernetes. Docker files are used to containerize the application as well as to update different services on the network. PostgreSQL is used as the underlying RDBMS. Known entities on the network will be identifiable on Stateset upon login and known entities on the network are able to be directly transacted with in a secure and privacy preserving manner. Nodes on the network are able to instantly communicate with other nodes on the network in real-time on a global transaction network that is secured and replicated in trusted executable environments.
All of the business information that is executed will be the same shared business execution logic across same across every node in the network. Shared execution logic ensures that counterparties are viewing the same exact data when transacted with. There is not concept of global state but a set of peer-to-peer UTXO sets across a globally distributed network of a nodes. The UTXO sets are maintained between companies for post-contract and asset lifecycles and managing data mapping processes across organizations. Double spending of input states is prevented using a cluster of nodes using Tendermint BFT which communicate with the Stateset State Machine using ABCI (Application Blockchain Interface).
Stateset is going to displace legacy enterprise software, on-premise and cloud business solutions; with next-generation technology that is more secure and robust. It is built on state-of-the-art Byzantine Fault Tolerant engine and an enterprise-grade, distributed state machine. It will be a constant, an infrastructure and shared system of record network of nodes that are able to exchange assets, messages and other types of state and information securely and instantly across the globe.
State models
There are many different types of assets that can be transacted on the Stateset.
Customer States are transferred between stakeholders on the network.
Accounts
The first state to be deployed on the network is the Account
. Version 0.1 of the Account
State has the following structure:
// *********
// * Account State *
// *********
data class Account(val accountId: String,
val accountName: String,
val accountType: TypeOfBusiness,
val industry: String,
val phone: String,
val yearStarted: Int,
val annualRevenue: Double,
val businessAddress: String,
val businessCity: String,
val businessState: String,
val businessZipCode: String,
val controller: Party,
val processor: Party ) : ContractState, QueryableState {
The Account has the following business flows
that can be called:
CreateAccount
- Create an Account between your organization and a known counterparty on the StatesetTransferAccount
- Transfer the Account between your organization and a counterparty on the StatesetShareAccount
- Share the Account Data with a counterpartyEraseAccount
- Erase the Account Data
Contacts
The second state to be deployed on the network is the Contact
. Version 0.1 of the Contact
State has the following structure:
// *********
// * Contact State *
// *********
data class Contact(val contactId: String,
val firstName: String,
val lastName: String,
val email: String,
val phone: String,
val controller: Party,
val processor: Party,
override val linearId: UniqueIdentifier = UniqueIdentifier())
The Contact has the following business flows
that can be called:
CreateContact
- Create a Contact between your organization and a known counterparty on the StatesetTransferContact
- Transfer the Contact between your organization and a counterparty on the StatesetShareContact
- Share the Contact Data with a counterpartyEraseContact
- Erase the Contact Data
Leads
Version 0.1 of the Lead
State has the following structure:
// *********
// * Lead State *
// *********
data class Lead(val leadId: String,
val firstName: String,
val lastName: String,
val company: String,
val title: String,
val email: String,
val phone: String,
val country: String,
val controller: Party,
val processor: Party,
override val linearId: UniqueIdentifier = UniqueIdentifier())
The Lead has the following business flows
that can be called:
CreateLead
- Create a Lead between your organization and a known counterparty on the StatesetTransferLead
- Transfer the Lead between your organization and a counterparty on the StatesetShareLead
- Share the Lead Data with a counterpartyEraseLead
- Erase the Lead DataConvertLead
- Convert a Lead State into an Account State and Contact State
We created the Carmen Dashboard
to provide the ability for organizations to create Accounts
, Contacts
, and Leads
with counterparties on the network.
Cases
// *********
// * Case State *
// *********
data class Case(val caseId: String,
val description: String,
val caseNumber: String,
val caseStatus: CaseStatus,
val casePriority: CasePriority,
val submitter: Party,
val resolver: Party,
override val linearId: UniqueIdentifier = UniqueIdentifier())
The Case has the following business flows
that can be called:
CreateCase
- Create a Case between your organization and a known counterparty on the StatesetStartCase
- Start on an unstarted CaseCloseCase
- Close the Case with a counterpartyEscalateCase
- Escalate the Case
Messages
Message States are transferred between stakeholders on the network. Messages are encrypted and directly sent to individual users at nodes on the network.
Version 0.1 of the Message
State has the following structure:
// *********
// * Message State *
// *********
data class Message(val id: UniqueIdentifier,
val body: String,
val fromUserId: String,
val to: Party,
val from: Party,
val toUserId: String,
val sentReceipt: Boolean?,
val deliveredReceipt: Boolean?,
val fromMe: Boolean?,
val time: String?,
val messageNumber: String,
override val participants: List<AbstractParty> = listOf(to, from)) : ContractState
Agreements
The Agreement
has the following structure:
// *********
// * Agreement State *
// *********
data class Agreement(val agreementNumber: String,
val agreementName: String,
val agreementStatus: AgreementStatus,
val agreementType: AgreementType,
val totalAgreementValue: Int,
val party: Party,
val counterparty: Party,
val agreementStartDate: Date,
val agreementEndDate: Date,
val active: Boolean,
val createdAt: Instant,
val lastUpdated: Instant,
override val linearId: UniqueIdentifier = UniqueIdentifier())
The Agreement has the following business flows
that can be called:
CreateAgreement
- Create an Agreement between your organization and a known counterparty on the StatesetActivateAgreement
- Activate the Agreement between your organization and a counterparty on the StatesetTerminateAgreement
- Terminate an existing or active agreementRenewAgreement
- Renew an existing agreement that is or is about to expireExpireAgreement
- Expire a currently active agreement between you and a counterparty
The Agreement Status
and Agreement Type
enums are listed as follows:
@CordaSerializable
enum class AgreementStatus {
REQUEST, APPROVAL_REQUIRED, APPROVED, IN_REVIEW, ACTIVATED, INEFFECT, REJECTED, RENEWED, TERMINATED, AMENDED, SUPERSEDED, EXPIRED
}
@CordaSerializable
enum class AgreementType {
NDA, MSA, SLA, SOW
}
Agreement Line Items
The Reference State of the Agreement to Agreement Line Items.
In order to cope with the increased complexity that multiple state types introduce, we can use the concepts of high cohesion and low coupling.
The Agreement
and the Agreement Line Item
are bounded together by Command to that the creation of the states via a transaction occur simultaneously as well as a StateRef in the child state property.
The Agreement Line Item
state is as follows:
// ****************************
// * Agreement Line Item State *
// ****************************
data class AgreementLineItem (val agreement: Agreement,
val agreementNumber: String,
val agreementLineItemName: String,
val agreementLineItemStatus: AgreementLineItemStatus,
val agreementLineItemValue: Int,
val party: Party,
val counterparty: Party,
val lineItem: LineItem,
val active: Boolean,
val createdAt: String,
val lastUpdated: String,
override val linearId: UniqueIdentifier = UniqueIdentifier()) : LinearState, ContractState {
override val participants: List<AbstractParty> get() = listOf(party, counterparty)
}
Invoices
data class Invoice(val invoiceNumber: String,
val invoiceName: String,
val billingReason: String,
val amountDue: Amount<Currency>,
val amountPaid: Amount<Currency> = Amount(0, amountDue.token),
val amountRemaining: Amount<Currency> = Amount(0, amountPaid.token),
val subtotal: Amount<Currency> = Amount(0, amountDue.token),
val total: Amount<Currency> = Amount(0, subtotal.token),
val party: Party,
val counterparty: Party,
val dueDate: String,
val periodStartDate: String,
val periodEndDate: String,
val paid: Boolean?,
val active: Boolean?,
val createdAt: String?,
val lastUpdated: String?,
override val linearId: UniqueIdentifier = UniqueIdentifier()) : ContractState, LinearState, QueryableState
The Invoice has the following business flows
that can be called:
CreateInvoice
- Create an Invoice between your organization and a known counterpartyPayInvoice
- Pay the Invoice between your organization and a counterpartyFactorInvoice
- Factor a the invoice and generate a loan
Loans
// *****************
// * Loan State *
// *****************
@BelongsToContract(LoanContract::class)
data class Loan(val loanNumber: String,
val loanName: String,
val loanReason: String,
val loanStatus: LoanStatus,
val loanType: LoanType,
val amountDue: Int,
val amountPaid: Int,
val amountRemaining: Int,
val subtotal: Int,
val total: Int,
val party: Party,
val counterparty: Party,
val dueDate: String,
val periodStartDate: String,
val periodEndDate: String,
val paid: Boolean?,
val active: Boolean?,
val createdAt: String?,
val lastUpdated: String?,
override val linearId: UniqueIdentifier = UniqueIdentifier()) : ContractState, LinearState, QueryableState {
The Loan has the following business flows
that can be called:
CreateLoan
- Create a Loan between your organization and a known counterpartyPayLoan
- Pay off a Loan