Chapter 44: Loans

The terms loan, lender and borrower are used in the general CATS sense: the property owed need not be money and the loan may arise from a purchase awaiting delivery.

A loan is authorised by both lender and borrower when they enter into the agreement. CATS is supposed to represent a trusted third party, regardless of the node on which the loan arrangement is recorded.

A CATS node is not an interested party or private operator exercising judgment. It is a component of a trusted public mechanism executing the same deterministic rules as every other node.


entity Contract
{
    Integer id;
    String permanentReference;
    String digest;
    key {id};
    key {permanentReference};
}

value LoanRepayment
{
    TimeStamp time;
    Int64 amount where amount > 0;
}

value LoanIncrease
{
    TimeStamp time;
    Int64 amount where amount > 0;
    String reason;
}

value InterestAccrual
{
    TimeStamp periodStart;
    TimeStamp periodEnd;
    Int64 amount where amount > 0;
}

value LoanDischarge
{
    TimeStamp time;
    Person authorisedBy;
}

entity Loan
{
    NodeId node;
    Uint32 id;    
    Person lender;
    Person borrower;
    Denomination denomination;
    TimeStamp started;
    Contract terms;
    LoanIncrease[] loanIncreases where ordered by time;
    InterestAccrual[] interestAccruals where ordered by periodEnd;
    LoanRepayment[] loanRepayments where ordered by time;
    LoanDischarge loanDischarge?;
    → Int64 accruedBalance =
          loanIncreases.amount.Σsum 
        + interestAccruals.amount.Σsum 
        - loanRepayments.amount.Σsum;
    → Int64 balanceOwed =
        if loanDischarge.Σexists then 0 else accruedBalance;

    key {node,id};

    constraints
    {
        lender != borrower;
        accruedBalance >= 0;
    }
}

The first loan increase establishes the principal. Repayments cannot exceed the principal and accrued interest. A discharge forgives the entire remaining balance, after which no further loan increase, interest accrual or repayment may be recorded.

One authoritative CATS record

The complete authoritative history of a loan is stored on the CATS node identified by node. All changes to that history are local database operations on that node, so the loan itself requires no eventual-consistency mechanism between independently authoritative nodes. The choice of node has no legal significance, and physical replication for fault tolerance is an implementation detail beneath this logical model.

Enforcement of contracts

Because CATS records may provide the basis for coercive enforcement of contracts, CATS must act as an unbiased and reliable third party. It shall accept and update records only according to published mechanical rules derived from the Constitution and the relevant contract, without discretionary preference for any party.

CATS should mechanically determine only facts that follow from its trusted data. For example:

  • Whether a repayment was recorded.
  • The current amount owed.
  • Whether a contractual payment deadline has passed.
  • Whether interest was calculated according to the agreed formula.
  • Whether the required party authorized an increase or discharge.

Police enforcement should not follow merely from an accusation submitted by a lender. It should follow only from a valid determination made through the constitutionally authorized process. A safe sequence is:

  1. CATS records the contract and authenticated events.
  2. Mechanical rules determine whether an objectively specified condition has occurred.
  3. Any disputed external facts go through the agreed adjudication mechanism.
  4. CATS records the resulting authoritative determination.
  5. Only then can the constitutionally authorized enforcement system act.

No lender and borrower accounts

There are no accounts for the lender and borrower for the loan. Instead there is a single Loan entity which records all history about the loan, including accrued interest, loan increases and loan repayments.

This means the loan history remains separate from other accounts or loans. It also means a loan is unambiguously between one lender and one borrower. The claim cannot be transferred through ordinary account operations. The lender cannot use the outstanding balance as a payment medium.

The lender's economic position in the loan is balanceOwed, while the borrower's position is its negative. These positions contribute to the parties' net positions but are not transferable account balances.

Repayments and transfers of property

A LoanRepayment records a reduction of the contractual obligation; it does not itself transfer Runes or other property. The corresponding property transfer takes place separately through the appropriate accounts. CATS records the repayment only after receiving the evidence required by the contract, such as a Central Bank transfer reference or an authoritative adjudication.

Multiple lenders or borrowers?

Do we allow a loan to have two lenders? That would be a form of co-ownership, which we reject, just as we reject co-ownership of accounts of property.

Do we allow a loan to have two borrowers? That complicates what it means if only one is making repayments. Does it mean there is a default on the loan or not? It is better and simpler to avoid these questions and not allow multiple borrowers.

Splitting a loan is possible, it just means it splits into multiple distinct loans, and each loan remains a lender/borrower pair.

Changing the lender or borrower is treated as discharge of the old loan and creation of a new one.