Where you are. Eight lessons have turned module 0’s map into machinery: money as entries in a list, double entry with balanced legs, the bank as a balance sheet under one invariant, the two tiers as typed ledgers, physical cash as the bearer exception, submit and settle as the moment a payment becomes final, and, in lesson 8, an interbank payment settled in reserves across the central bank. Every posting so far had one thing in common: it moved money that already existed. The one place money entered the world was endow, the setup helper you were asked to take on trust. This lesson shows the posting that creates most of the money there is - and it is already sitting in the Bank class you are building.
Where does a mortgage come from?
A friend completes on a flat. On the morning it all goes through, the bank “advances” her mortgage: a number larger than any she has held before appears in her account, sits there for an hour, and travels on to the seller. Ask where that money came from and the folk answer arrives ready-made: from savers. The bank gathered deposits from people with money to spare and passed them to someone who needed it; banking as matchmaking, the bank as a warehouse with a queue at each door.
Eight lessons of this module have taught you to check stories against ledgers, so check this one. If the bank lent out its savers’ deposits, then on that morning some saver’s balance fell. Whose? Open the bank’s books and hunt for the debit. There is none. No saver was debited; no customer’s balance anywhere dropped because a mortgage was advanced. The folk answer describes a posting the books do not contain - so put the story down and watch what the ledger actually does.
The idea in one paragraph
A bank loan grows both sides of the bank’s balance sheet at once. One posting, two legs, both increases: the loan, an asset of the bank, up by the amount; the borrower’s deposit, a liability of the bank, up by the same amount. The posting balances, so the sheet still balances afterwards. No reserves move. No saver is debited. The deposit the borrower goes on to spend was not moved from anywhere; it was minted by the posting itself, brand-new commercial-bank money, and repayment runs the posting in reverse and destroys it again. What limits this - something must - is not a vault of loanable money running dry. The limits are the bank’s capital, the reserves that drain away once the minted deposit is spent, and the price the central bank puts on replacing them.
The posting, in the library you are building
Here is the whole mechanism, verbatim from the Bank class in miniledger v1:
def lend(self, borrower: str, amount: int) -> None:
"""Loans create deposits: both sides of the bank's sheet grow at once.
No reserves move. That is not a shortcut in the toy; it is how bank
lending works, and lesson 9 is the walk through why.
"""
if amount <= 0:
raise LedgerError("a loan is a positive amount")
self.post([("loans", amount), (borrower, amount)], memo=f"lend to {borrower}")
One post, two legs, both increases. loans is an asset account: the borrower’s promise to repay, which the bank owns and expects to collect on. The borrower’s account is a liability: the bank’s IOU to her, the same object a deposit has been since the goldsmith’s receipt. Assets up by the amount, liabilities up by the same amount, so the balance rule from lesson 3 - the change in assets equals the change in liabilities plus the change in equity - passes, and assert_balanced holds afterwards because it held before. The sheet did not shuffle. It grew.
And read the legs once more for what is not there. No ("reserves", ...) leg: lending, at the moment of lending, touches neither the bank’s reserves nor the central bank nor any other customer. Two rows change, and both of them belong to this loan.
Wider than the screen; scroll it sideways.
The numbers are the exercise’s, and they are stylised on purpose - round amounts on a toy bank called Alder, so the shape is unmissable. Alder starts with reserves of 100 backing carol’s deposit of 100, plus 50 of equity standing under 50 of earlier loans. Then alder.lend("carol", 400): loans go 50 to 450, carol’s deposit goes 100 to 500, and reserves finish exactly where they started, at 100.
The story the books refuse to tell
Two folk models die on that posting. Loanable funds - the warehouse story from the hook - needs a leg debiting some saver, and there is no such leg; savers’ balances are not an input to lending. The money multiplier - the older textbook story, in which banks take central bank money and “multiply it up” by re-lending some fixed fraction of reserves - needs reserves to be an ingredient the loan consumes, and there is no reserves leg either. Neither story survives contact with the posting, and this is not a quirk of the miniledger being a toy. It is the documented behaviour of the system the toy models.
The plumbing’s name for what lend does is money creation, and the name is exact: not lending out, not multiplying up, but creating - two entries posted into existence together, one of which is money in someone’s account.
Now run lend five times in a row and watch the two lines the folk stories care about. The figure below does exactly that, stylised: a bank starting with 100 of deposits and 100 of reserves makes five loans of 80 each. Deposits staircase from 100 to 500 while the reserves line lies flat at 100 the whole way. Lending, by itself, drains nothing; the drain begins when the minted deposits are spent, and that is the next section.
What actually limits it
If a loan conjures its own funding, why is any loan ever refused? Because three constraints bite, and none of them is a vault.
Capital. Loans go bad. When a borrower defaults, the loan asset is written down and the balancing leg comes out of equity - the bank’s own money, the slice you met in lesson 4 - and regulation holds that slice above a floor fraction of the bank’s assets, so equity is the bank’s permission to hold risk. The exercise turns this into one number: capital_ratio, equity over loans. Alder carries 50 of equity under 450 of loans, about 11 percent, stylised. And notice the direction of travel: every loan mints its own deposit but never mints equity, so each one thins the ratio toward the floor. A bank runs out of permission long before it runs out of anything physical.
The reserve drain. The minted deposit does not sit still. Your friend’s mortgage was in her account for an hour before it left for the seller, and the seller banks somewhere else. Lesson 8 walked you through what happens then: the deposit legs alone leave the two banks out of square, and reserves settle the difference across the central bank’s ledger. So every spent loan eventually presents a reserves bill. Lending is free at posting time and paid for afterwards: to keep settling, the bank must attract deposits back in or borrow reserves, and both cost money. In the lending-sequence figure the reserves line is flat only because nobody has spent yet.
The price of reserves. What that replacement funding costs is anchored by the central bank’s rate: the price it charges and pays on reserves. Raise it, and loans that were worth writing at the old price stop being written. That is the steering wheel the 2014 paper pointed at, and the next lesson is spent entirely at the wheel.
Check yourself
1. The folk answer says the bank lends out its savers’ deposits. What legs would that posting need, and which legs does the ledger actually show?
Lending out a deposit would need a debit somewhere: some saver’s balance down, the borrower’s up. The real posting has no such leg. It is two increases - loans up on the asset side, the borrower’s deposit up on the liability side - and no other account appears: not a saver’s, not reserves. The folk story describes a posting the books never contain.
2. post rejects unbalanced postings, yet lend posts two increases and passes. Why is a posting with no negative leg balanced?
Balanced never meant “positives cancel negatives”; it means the change in assets equals the change in liabilities plus the change in equity. lend raises assets by the amount and liabilities by the same amount, so the equation holds, and the sheet balances afterwards because it balanced before. A balance sheet is allowed to grow; it is not allowed to grow on one side only.
3. Carol repays her 400. What single posting records it, and what happens to the money supply?
The reverse of lend: [("loans", -400), ("carol", -400)], both legs negative, still balanced. Both sides of Alder’s sheet shrink, and the 400 of deposit money is destroyed, not transferred to the bank; the money supply falls by exactly the repayment. Interest is separate - the bank’s fee, posted to its own income - which is why repaying loans shrinks the money supply while the bank still earns its living.
4. In the lending-sequence figure, reserves stay flat across five loans. Does lending cost the bank nothing, then?
It costs nothing at posting time - the lend posting has no reserves leg, and the flat line shows exactly that. The costs arrive later, and they are the limits: each loan thins the capital ratio, because deposits are minted but equity is not; and once borrowers spend, the deposits scatter to other banks and reserves drain with each settlement, at a funding price the central bank’s rate anchors. The figure is honest about creation and silent about spending; the limits live in the spending.
Do this
Ten minutes, standard library only, working from module-01-money-at-rest. Open code/loans_create_deposits.py. The scene is the schematic’s: a World with one bank, Alder; carol endowed with a stylised 100; then 50 of equity standing under 50 of earlier loans, written straight into the account objects - a stylised shortcut, labelled as such in the file, because raising equity is machinery this course does not need yet. One TODO(you) remains: capital_ratio, equity over loans, read from the bank’s own accounts with bank.balance.
python code/loans_create_deposits.py
Run unmodified, the starter stops at the NotImplementedError inside capital_ratio. Filled in, the script posts alder.lend("carol", 400), asserts this lesson’s two claims - the deposit appeared, and no reserves moved - then prints loans 450 on equity 50: capital ratio 11.1% and ends with the line
the loan minted its own deposit; the limit is capital, not a vault
Then push on the limit. After the final print, lend again - alder.lend("carol", 450) - and print the ratio a second time: 50 of equity now stands under 900 of loans, and 5.6% comes out. Nothing refused the second loan; miniledger v1 has no regulator. Run a few more and you are watching a bank lend its way through the floor a real one must stop at. The completed version is in solutions/loans_create_deposits.py.
What you can now do. You can post the loan that mints its own deposit and defend every word of that sentence with legs: one balanced posting, loan asset up, deposit liability up, no reserves leg, no saver anywhere in it; and the reverse posting at repayment, which destroys what lending created. You can name what actually limits the minting - capital against losses, measured by the ratio you just computed; the reserves that drain away as minted deposits are spent across banks; and the central bank’s price on replacing them - and you can say why a vault appears nowhere on that list. The last two limits are levers in one institution’s hand, and the next lesson watches the hand: how the central bank steers the whole system with a rate and a balance sheet of its own, and what endow, the setup magic you have been taking on trust, has been modelling all along.