Minka Cloud
Search…
Clearinghouse

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.

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:
const minka = require('minka')
minka.domain.create(
"handle": "landia",
"labels": {
"handle": "Country of Landia",
"nature": "locale"
}
)
let landia = minka.domain("landia")
We will need to generate a random keeper that will be stored offline and used to sign Actions by the new Central Bank.
let mykeys = landia.keeper.create()
Next we will create a new Symbol (currency) that will he called Lukas.
let lukas = {
handle: [{
"handid": "$luk",
"nature": "tagtag"
}],
labels: {
"detail": "Lukas currency"
},
nature: "symbol"
}
landia.wallet.create(lukas).keeper(mykeys)
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.

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.
let bank1Keeper = keeper.create()
let banco1 = {
handle: [{
"handid": "$banco1",
"nature": "tagtag"
}],
labels: {
"detail": "The Blue Bank"
},
nature: "troupe" // troupe = organization
}
landia.wallet.create(banco1).keeper(bank1Keeper)
The second banks creates its wallet based on the instructions of Landia Central Bank:
let bank2Keeper = keeper.create()
let bank2 = {
handle: [{
"handid": "$banco2",
"nature": "tagtag"
}],
labels: {
"detail": "The Red Bank"
},
nature: "troupe" // troupe = organization
}
landia.wallet.create(banco1).keeper(bank2Keeper)

Back to the Central bank that holds the control of the $luk wallet it can assign (transfer) $luk to one of the banks.
const landia = minka.domain("landia")
let action = {
"source": "$luk",
"target": "$banco1",
"amount": "1.000.000",
"symbol": "$luk",
"labels": {
"detail": "inital guarantees"
}
landia.assign.create(action).keeper(lukKeeper)
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.
let action = {
"source": "$luk",
"target": "$banco2",
"amount": "500.000",
"symbol": "$luk",
"labels": {
"detail": "inital guarantees"
}
landia.assign.create(action).keeper(lukKeeper)
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

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

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.
const landia = minka.domain("landia")
let teaKeeper = landia.keeper.create()
let tea = {
"handle": [{
"handid": "$tea",
"nature": "phone"
}],
"labels": {
"finame": "Tea",
"laname": "Satoshi"
},
"nature": "person"
}
landia.wallet.create(tea).(teaKeeper)
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.
let landia = minka.domain("landia")
let andresKeeper = landia.keeper.create()
let andres = {
"handle": [{
"handid": "$andres",
"nature": "phone"
}],
"labels": {
"finame": "Andres",
"laname": "Nakamoto"
},
"nature": "person"
}
landia.wallet.create(andres).(andresKeeper)

Once the Wallets has been create a Bank can assign Lukas to a person
let landia = minka.domain("landia")
let action = {
"source": "$bank1",
"target": "$tea",
"amount": "1000",
"symbol": "$luk",
"labels": {
"detail": "motorcycle loan"
}
landia.assign.create(action).keeper(bank1Keeper)
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

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.
let landia = minka.domain("landia")
let action = {
"source": "$tea",
"target": "$andres",
"amount": "900",
"symbol": "$luk",
"labels": {
"detail": "buying a motorcycle"
}
landia.assign.create(action).keeper(teaKeeper)
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.

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.
Copy link
On this page
Overview
Central bank
Setup
Bank in the cloud
Assigning $luk
Low value ACH
Setup
Assign $luk to a person
Peer to peer payment
Clearing and settlement