zero dependenciesMIT licensed browser + CLI + MCP158 tests

accrual

Yield math for tokenized real-world assets. Day-count conventions, accrued interest, duration, convexity. It runs. In this page, as a CLI, and as an MCP server your agent can call.

the problem

Every tokenized treasury product quotes a yield. Almost none publish the day-count convention behind it. Same principal, same rate, same dates, six conventions, six different numbers. The spread is not rounding, it is money, and it is the first thing a settlement desk checks and the last thing a deck mentions.

conventions implemented
6
30/360 variants
3, not interchangeable
runtime dependencies
0
tests passing
158 / 158

calculator

Runs entirely in this page. Nothing is sent anywhere, there is no analytics and no network call. Change a field and the numbers move.

every input above lives in the link, nothing is sent anywhere
conventionyear fractiondays

install

One package, no dependencies. npm install accrual adds exactly one entry to your tree, which you can check yourself. Node 20 or newer.

$ npm install accrual
added 1 package
// the same numbers the calculator above runs on
import { accrueSimple, bondMetrics } from 'accrual';

accrueSimple({
  principal: 1_000_000,
  rate: 0.0525,
  from: '2025-01-31',
  to: '2025-07-31',
  convention: 'ACT/365F',
});  // interest 26034.25

check it yourself

Every number above is a claim, and the good news is you don't have to take my word for any of it. These four commands verify them in about a minute. Nothing here asks for your trust, only a terminal.

// the zero-dependency claim, in the install output itself
$ npm install accrual
added 1 package

// the whole tree, one entry deep
$ npm ls --all
└── accrual@0.1.1

// who built the tarball, and from which commit
$ npm audit signatures
1 package has a verified registry signature
1 package has a verified attestation

// every import in the source, none leaving its own directory
$ grep -rn "^import" node_modules/accrual/src/
tests run in public
every push, Node 20 and 22, on hardware I don't own
packaging tested
a job installs the tarball and drives the CLI and MCP server through it
provenance
0.1.1 on, built by the workflow and attested by GitHub in a public transparency log
0.1.0
published by hand, so it has a registry signature but no provenance

for agents

The same math as an MCP server over stdio, thirteen tools. It is a pure function over numbers: no RPC client, no signer, no key material anywhere in the package. It can value a position and cannot move one. Verify by reading the imports, there are none outside the source directory.

// claude_desktop_config.json, or any MCP client
{
  "mcpServers": {
    "accrual": { "command": "npx", "args": ["-y", "accrual", "accrual-mcp"] }
  }
}
// tools exposed
day_count         every convention for one date pair, and the spread
accrue_simple     simple interest, plus the same result under all six
accrue_compound   compound interest and the effective annual rate
bill_yields       discount yield vs the yield you actually earn
bond_metrics      price, duration, convexity, cashflow schedule
present_value     one future cashflow, discounted
compare_products  two offers on the same footing
year_fraction     one convention, when you know which you need
loan_payment      level payment, total interest, first-payment split
loan_schedule     every row, closing at exactly zero
loan_payoff       what overpaying saves, in money and in months
loan_implied_rate the rate behind a payment, nominal and effective
loan_affordable   what a given payment can borrow
// or from a shell
$ accrual days   --from 2025-02-28 --to 2025-03-31
$ accrual bill   --face 100 --price 97.80 --settle 2025-01-02 --maturity 2025-07-03
$ accrual loan   --principal 200000 --rate 6% --years 30
$ accrual payoff --principal 200000 --rate 6% --years 30 --extra 200

the token

The token contract address is published below. The tools above remain the product; a token does not represent a claim on their calculations or on any underlying asset.

launch status
contract address published
contract address
0xd3F5371ED630BAAbDAfa592Bd26f391D73C57D7B
yield to holders
none. this is a tool, not an instrument