Skip to content

Part 1 of 7 · Restricted fund tracker series ~6 min read

A restricted fund tracker on AWS for a few dollars a month

A community charity running seven restricted grants closed its year and found two things in the same week. The youth project had spent £14,860 more than its grant, paid for by unrestricted money without anyone deciding it should be. The energy advice grant had £9,315 left over, and its agreement said unspent money goes back unless you ask before the grant period ends. The period had ended.

people standing in front of brown cardboard boxes
Photo by Joel Muniz on Unsplash

Key takeaways

  • Restricted money may only be spent on the purpose it was given for. The records have to show it.
  • Grant terms are dated rules: purpose, eligible costs, caps, period, reports and underspend.
  • Every cost carries its fund, the rule version that allowed it and the evidence.
  • A fund in deficit needs a decision on record, not a formula that absorbed it.
  • Designed on AWS for about $4 a month.

The whole system on one page

Before any code, here is the shape of what we are designing.

System: grant agreements, spend and time joined into fund balances and funder reportsThree boxes across the top sit outside the AWS account. On the left, Grant agreements: terms, budgets and variation letters. In the middle, Spend and time: invoices, payroll and timesheets. On the right, Funders and trustees: reports out and decisions back. The first two connect down to the AWS account container, labelled when signed or varied and as they arrive; the third is connected by an arrow pointing up out of the account, labelled reports and decisions. Inside the AWS account are three components in a row. Grant rules: what each fund may pay for. Coding and sharing: every cost, with the rule that allowed it. And Balances and reports: deficits, deadlines and funder reports. A note says the first box inside is the one nobody keeps, because the agreements exist, but as PDFs in a shared drive, read closely once by whoever wrote the bid.AWS ACCOUNTGrant agreementsterms, budgets andvariation lettersSpend and timeinvoices, payroll,timesheetsFunders and trusteesreports out,decisions backGrant ruleswhat each fundmay pay forCoding and sharingevery cost, with therule that allowed itBalances and reportsdeficits, deadlines,funder reportswhen signed orvariedas they arrivereports anddecisionsThe first box inside is the one nobody keeps. The agreements exist, but as PDFs in a shared drive, read closely once by whoever wrote the bid.
Fig 1. Three things outside the account, three pieces inside it. The first box inside is where most restricted fund failures start.
  • Security & identity
  • Analytics
  • People

Why this goes wrong in a charity that is otherwise well run

Because the grants arrive one at a time and the finance function does not. Each agreement is negotiated by whoever wrote the bid, it lands in a shared drive, and its terms live in that person’s head. The finance person, often part-time and shared across the whole charity, codes invoices to projects rather than to grants, and the gap between those two things is where the trouble starts.

A project is an activity. A grant is an agreement with a purpose, a budget, a period and a list of things it will not pay for. The same youth worker’s salary can be a perfectly good charge to one grant and an excluded one on another, and a nominal code called Youth cannot tell the two apart.

What runs (the inside)

  • Grant rules. Each agreement and variation turned into dated terms: purpose, eligible costs, caps, period, reporting dates and underspend. Part 2.
  • Coding. Every invoice and payroll line charged to a fund, with the rule that allowed it and the evidence behind it. Part 3.
  • Shared costs. The worker split across three grants, the rent and the finance time, allocated on a basis that is stored and can be shown. Part 4.
  • Balances and reports. Fund positions that cannot go below zero without a decision, and funder reports that trace to transactions. Part 5.

One charity, one year

One charity's year from seven grants to an overspend and an underspendA horizontal row of five boxes joined by arrows. Seven grants: seven agreements and seven rule sets. Restricted: three hundred and forty-seven thousand nine hundred and twenty pounds spent in the year. Shared: forty-one thousand three hundred and eighty pounds for a worker, the rent and finance time. Overspent: fourteen thousand eight hundred and sixty pounds on the youth grant, covered silently by unrestricted money. And Underspent: nine thousand three hundred and fifteen pounds on the energy advice grant, and repayable. A note says neither of the last two boxes was fraud or a mistake anyone could name, and that both came from rules no cost was ever tested against.ONE COMMUNITY CHARITY, ONE YEAR TO 31 MARCH7 grantsseven agreements,seven rule setsRestricted£347,920 spentin the yearShared£41,380: worker,rent, financeOverspent£14,860 youth,covered silentlyUnderspent£9,315 energy,and repayableNeither of the last two boxes was fraud, or a mistake anyone could name. Both came from rules that no cost was ever tested against.
Fig 2. The same year as one line. The first three boxes are what the accounts show; the last two are what the trustees found out in the week the accounts were drafted.

In plain words

Grant agreements come in when a bid succeeds, and again whenever a funder agrees a change. Each is read once and turned into a set of rules with a start date: what the money is for, which categories of cost it will pay, what share of overheads it will carry, when the period ends, when reports are due and what happens to anything left over. A person approves those rules before any cost is tested against them.

Spend arrives as supplier invoices and a monthly payroll export. Each invoice is read, a fund and a cost category are proposed with a one-sentence reason, and the proposal is tested against the rules of the grant it names. A cost outside the grant’s period or outside its eligible categories is not charged to it, however much room its budget line has.

Costs that belong to more than one grant are shared on a basis that is recorded rather than assumed. The project worker’s salary is split by the hours on the timesheets, the rent by the floor area each project uses, and the finance time by headcount. The basis and the numbers behind it are stored with every allocation.

Fund balances are recomputed as costs are charged. A restricted fund heading below zero produces a question for a named person in the week it happens, and a grant heading for an underspend produces one while there is still time to ask the funder. Reports are built from the same records, so every line can be walked back to its evidence.

Design rules that shaped every decision

  • Every cost charged to a restricted fund records the rule version that allowed it.
  • Grant rules are dated. A variation starts a new version; it never edits the old one.
  • Shared costs carry their basis and its numbers, not just a percentage.
  • A restricted fund may not go below zero without a decision recorded against it.
  • Underspend and reporting deadlines are dates in a calendar, not clauses in a PDF.
  • Model output is a proposal. A person approves rules, and the finance lead posts the journals.

What it does not do

It does not keep the books. The accounting package stays the ledger, with its own nominal codes and its own year end. This system holds what the ledger cannot: the rules each grant imposes, the reason every cost landed on the fund it did, and the working behind every allocation. It produces journals for the finance lead to post.

It does not decide whether to cover an overspend. Moving unrestricted money into a restricted fund in deficit is a legitimate thing to do, and the SORP provides for it as a transfer between funds. It is also a decision about money that could have been spent elsewhere, and it belongs to the trustees. The system makes sure the question is asked and the answer is recorded; it does not answer it.

And it does not judge whether the charity’s work meets a grant’s purpose. Costs the terms do not clearly cover go to a person who knows the funder.

The next four posts walk through each piece: turning an agreement into rules, charging a cost to the right fund, sharing costs on a basis you can show, and closing a period without a deficit nobody decided on. One diagram per post, a cost breakdown, and an engineering reference at the end.

All posts