Minka Cloud
Search…
Clearinghouse

Overview

An automated clearing house (ACH) [1], or automated clearinghouse, is an electronic network for financial transactions, generally domestic low value payments.
ACHs are designed for high-volume, low-value payments, and charges fees low enough to encourage the transfer of low-value payments. The system is usually designed to accept payment batches, so that large numbers of payments can be made at once.
Most of the ACHs are using the NATCHa text based standard and are using batches to process payments that can take hours or days.
The following is an example of a ACH implementation based on the Minka Cloud that would allow low cost, real-time transactions.

Central bank

Setup

The central bank usually manages the units of account for the system - Symbol. For the purpose of the Demo, the Central Bank Wallet has the control of the Symbol of the system and can manage the supply of the unit of accounts in the fictive country of Landia.
Central bank usually works as a high value payments system that clears transactions between banks (Settlement).
This is an oversimplified demo of a clearing house, but not too far from real world process.
In order to create an information space we will create a Domain specific for the country of Landia:
1
const minka = require('minka')
2
3
minka.domain.create(
4
"handle": "landia",
5
"labels": {
6
"handle": "Country of Landia",
7
"nature": "locale"
8
}
9
)
10
11
let landia = minka.domain("landia")
Copied!
We will need to generate a random keeper that will be stored offline and used to sign Actions by the new Central Bank.
1
let mykeys = landia.keeper.create()
Copied!
Next we will create a new Symbol (currency) that will he called Lukas.
1
let lukas = {
2
handle: [{
3
"handid": "$luk",
4
"nature": "tagtag"
5
}],
6
labels: {
7
"detail": "Lukas currency"
8
},
9
nature: "symbol"
10
}
11
12
landia.wallet.create(lukas).keeper(mykeys)
Copied!
The create wallet call will generate a new wallet and a new signer based on the provided keys.
As mentioned anyone can create a new unit of account (Symbol) simply by creating a wallet type Symbol. A Symbol has infinite inferior limit - unlimited balance.

Bank in the cloud

Next we will create accounts of the two Bridge accounts that will represent two banks in our Landia.
Since the banks have the credentials to access landia, they create their own Wallets and Signers.
1
let bank1Keeper = keeper.create()
2
3
let banco1 = {
4
handle: [{
5
"handid": "$banco1",
6
"nature": "tagtag"
7
}],
8
labels: {
9
"detail": "The Blue Bank"
10
},
11
nature: "troupe" // troupe = organization
12
}
13
14
landia.wallet.create(banco1).keeper(bank1Keeper)
Copied!
The second banks creates its wallet based on the instructions of Landia Central Bank:
1
let bank2Keeper = keeper.create()
2
3
let bank2 = {
4
handle: [{
5
"handid": "$banco2",
6
"nature": "tagtag"
7
}],
8
labels: {
9
"detail": "The Red Bank"
10
},
11
nature: "troupe" // troupe = organization
12
}
13
14
landia.wallet.create(banco1).keeper(bank2Keeper)
Copied!

Assigning $luk

Back to the Central bank that holds the control of the $luk wallet it can assign (transfer) $luk to one of the banks.
1
const landia = minka.domain("landia")
2
3
let action = {
4
"source": "$luk",
5
"target": "$banco1",
6
"amount": "1.000.000",
7
"symbol": "$luk",
8
"labels": {
9
"detail": "inital guarantees"
10
}
11
12
landia.assign.create(action).keeper(lukKeeper)
13
Copied!
Notice that the source and the symbol are the same value. It is what could be mapped to a real world "issuing" a currency.
And for the Bank of 2.
1
let action = {
2
"source": "$luk",
3
"target": "$banco2",
4
"amount": "500.000",
5
"symbol": "$luk",
6
"labels": {
7
"detail": "inital guarantees"
8
}
9
10
landia.assign.create(action).keeper(lukKeeper)
Copied!
To assign a Symbol, clearing house usually asks for guarantee in the form of bonds or deposits form the financial institution.
Current status of the economic system is:
Wallet
Symbol
Balance
$luk
$luk
-1.500.000
$bank1
$luk
+1.000.000
$bank2
$luk
+500.000

Low value ACH

To create a low value ACH we will need to represent the people accounts.

Setup

The banks hold people deposits, usually in the form of issuing credit to the users.
As a first step we need to create person Wallets for each Bank.
1
const landia = minka.domain("landia")
2
3
let teaKeeper = landia.keeper.create()
4
5
let tea = {
6
"handle": [{
7
"handid": "$tea",
8
"nature": "phone"
9
}],
10
"labels": {
11
"finame": "Tea",
12
"laname": "Satoshi"
13
},
14
"nature": "person"
15
}
16
17
landia.wallet.create(tea).(teaKeeper)
Copied!
Notice that the specific Keeper has been set for Andres. It should stored on the device of Andres.
The second Bank creates a wallet for Andres.
1
let landia = minka.domain("landia")
2
let andresKeeper = landia.keeper.create()
3
4
let andres = {
5
"handle": [{
6
"handid": "$andres",
7
"nature": "phone"
8
}],
9
"labels": {
10
"finame": "Andres",
11
"laname": "Nakamoto"
12
},
13
"nature": "person"
14
}
15
16
landia.wallet.create(andres).(andresKeeper)
Copied!

Assign $luk to a person

Once the Wallets has been create a Bank can assign Lukas to a person
1
let landia = minka.domain("landia")
2
3
let action = {
4
"source": "$bank1",
5
"target": "$tea",
6
"amount": "1000",
7
"symbol": "$luk",
8
"labels": {
9
"detail": "motorcycle loan"
10
}
11
12
landia.assign.create(action).keeper(bank1Keeper)
Copied!
To follow the money in a real life example, a bank usually issues a credit to Tea generating more money.
At this moment the status of the Wallets are:
Wallet
Symbol
Balance
$luk
$luk
-1.500.000
$bank1
$luk
+999.000
$bank2
$luk
+500.000
$tea
$luk
+1.000
$andres
$luk
0

Peer to peer payment

The peer to peer payment is initiated on the source Wallet, usally on the device of the sender.
Since Tea has funds to buy a motorcycle now, she sends the funds to Andres.
1
let landia = minka.domain("landia")
2
3
let action = {
4
"source": "$tea",
5
"target": "$andres",
6
"amount": "900",
7
"symbol": "$luk",
8
"labels": {
9
"detail": "buying a motorcycle"
10
}
11
12
landia.assign.create(action).keeper(teaKeeper)
Copied!
Since Tea owns the Keeper for her wallet, she owns her funds and is the one signing the action without the interaction of the Bank1.

Clearing and settlement

Since all the wallets are tracked in the Cloud and signed by Keepers there is no need for settlement or clearing process - the updates are made in real time. Clean and simple.