TokenBank: Financial Infrastructure for AI Services
Organizations: Nexilume Research
Abstract
AI services incur inference costs during execution, while revenue may arrive later. Changing API prices, limited upfront capital, and service failures can limit operators' ability to sustain or expand their services. Beyond reducing per-request costs, operators need to plan future spending, fund execution before revenue arrives, and obtain compensation for specified losses. This requires clear agreements across services with different pricing and execution conditions. These agreements must distinguish rights to consume services from rights to receive payments, define obligations under uncertain costs and income, and specify which failures qualify for compensation and how much can be paid. We present TokenBank, a financial infrastructure that represents these commitments through structured contracts. It supports service-consumption rights, agreements that settle API-price differences in cash (forwards), financing through limited rights to future service revenue, and protection claims for specified service failures. Contracts specify participants, covered services, validity, ownership, fulfillment conditions, and settlement rules. Evaluation combines replay of 899,441 API requests, real model-driven agent execution, and contract API tests. In a zero-discount rising-price resampling scenario, forwards reduce mean expenditure by USD 304.88 but increase its standard deviation from USD 1,152.45 to USD 1,190.82. A controlled replication with five portfolios per capital condition finds mean contribution differences between financing and self-funding of +1.0635, -0.1406, and -0.2962 experimental USD under low, baseline, and ample capital, respectively. The evaluation distinguishes contract correctness from economic effectiveness under declared economic and failure assumptions; supplier invoices and commercial revenue are unavailable.
Figures & tables
| Study | Cases | Calls | Responses | Successes |
|---|---|---|---|---|
| Repeated capital study | 540 | 1,082 | 1,081 | 456 |
| Controlled repeats and parameter tests | 624 | 1,247 | 1,246 | 487 |
| Initial controlled study | 84 | 150 | 150 | 51 |
| Retail contract study | 70 | 930 | 925 | 1 |
| Retail baseline | 10 | 368 | 360 | 4 |
| Symbol | Definition | Value |
| Mean known expense per scheduled calibration task | 0.127689 | |
| Largest amount set aside before a calibration request | 0.943300 | |
| Baseline own capital, | 1.070989 | |
| Added capital, (rounded up to a cent) | 0.520000 | |
| Assumed revenue per successful service, | 0.255378 | |
| Scheduled tasks between releases of earned revenue | 4 |
| Rule tested | Result |
|---|---|
| Forward payment and retry | Quantity 10 and an index change from 1.0 to 1.3 produce one 3.000000 transfer. |
| Funding and restart | A 0.060000 transfer leaves 0.040000; retry changes nothing and a further unfundable transfer is rejected. |
| Payment after a right is sold | Subsequent revenue follows the current holder rather than the former investor. |
| Resale to multiple holders | Resale to two holders across organizations preserves revenue allocation. |
| Covered service | A claim for a model service not covered by the contract is rejected. |
| Payment in full | One 60.000000 payment leaves 40.000000; another 60.000000 claim is not partially paid. |
| Scenario | Std. dev. (USD) | Mean (USD) | Over budget (%) | |
|---|---|---|---|---|
| flat | 0 | 1144.71 | +0.00 | 62.2 |
| flat | 1 | 1144.71 | +26.49 | 63.3 |
| rise | 0 | 1152.45 | +0.00 | 72.1 |
| rise | 1 | 1190.82 | -304.88 | 61.4 |
| fall | 0 | 1139.84 | +0.00 | 54.1 |
| fall | 1 | 1100.08 | +357.85 | 65.5 |
| Completed services | Contribution difference | ||||
|---|---|---|---|---|---|
| Capital | Own | Equal | Right | Right–own | Right–equal |
| 0.0 | 10.4 | 10.2 | 1.0635 | -0.3049 | |
| 10.6 | 12.0 | 12.0 | -0.1406 | -0.3174 | |
| 12.0 | 12.0 | 12.0 | -0.2962 | [-0.2742, -0.0975] | |
| Faults / recovery | Success | Eligible loss | Paid credit | Benefit | Benefit |
|---|---|---|---|---|---|
| 0 / no | 12 | 0.0000 | 0.0000 | -0.0100 | -0.0100 |
| 0 / yes | 12 | 0.0000 | 0.0000 | -0.0100 | -0.0100 |
| 6 / no | 6 | 0.2900 | 0.2900 | 0.2800 | -0.0100 |
| 6 / yes | 10 | 0.0900 | 0.0900 | 0.0800 | -0.0100 |
| 12 / no | 0 | 0.5500 | 0.5500 | 0.5400 | -0.0100 |
| 12 / yes | 9 | 0.1400 | 0.1400 | 0.1300 | -0.0100 |
| Recovery | Claim limit | Initial funds | Approved | Paid | Unpaid |
|---|---|---|---|---|---|
| no | 0.1300 | 1.5600 | 0.5500 | 0.5500 | 0.0000 |
| no | 0.1300 | 0.1300 | 0.5500 | 0.1300 | 0.4200 |
| no | 0.0300 | 0.1300 | 0.3600 | 0.1200 | 0.2400 |
| no | 0.0300 | 1.5600 | 0.3600 | 0.3600 | 0.0000 |
| yes | 0.1300 | 1.5600 | 0.1400 | 0.1400 | 0.0000 |
| yes | 0.1300 | 0.1300 | 0.1400 | 0.1400 | 0.0000 |
| Success | Contribution | Service credit | |||
|---|---|---|---|---|---|
| 0 | 0 | 0 | 9 | 0.6034 | 0.0000 |
| 0 | 0 | 1 | 9 | 0.5934 | 0.1400 |
| 1 | 0 | 0 | 9 | 0.9772 | 0.0000 |
| 1 | 0 | 1 | 9 | 0.9672 | 0.1400 |
| 0 | 1 | 0 | 9 | 0.3735 | 0.0000 |
| 0 | 1 | 1 | 9 | 0.3635 | 0.1400 |
Appendix figures & tables36 assets
Supplementary material from the paper’s appendix.
Appendix
| Family | Model-directed operation | Completion criterion |
|---|---|---|
| Extraction | Extract a reference, quantity, and city; submit the record | Submitted fields and final JSON match the request. |
| Order lookup | Invoke the order-lookup tool | The requested order is retrieved and final JSON matches its state. |
| Product selection | Query the catalog; select and quote an item | The quoted item is the cheapest eligible in-stock item; quantity, total, and final JSON are correct. |
| Component | Measurement and interpretation |
|---|---|
| Model and tool execution | Responses, returned usage, and completed operations are observed on the controlled task set. |
| Business records and faults | Constructed records and local fault schedules define the controlled execution conditions. |
| Prices and receipts | Experimental tariffs, success-triggered receipts, and terminal price indices define the scenario valuation. |
| Contract settlement | Account changes and service-credit payments are observed in isolated database experiments and reconciled independently. |
| Study population | Fixed task families define the repeated-study population; calibration, controlled evaluation, and retail cohorts retain separate denominators. |
| Role | Responses | Input tokens | Output tokens | Mean latency (s) |
|---|---|---|---|---|
| Agent | 237 | 1,658,417 | 13,796 | 9.87 |
| Simulated user | 121 | 157,622 | 7,009 | 9.49 |
| Evaluator | 2 | 9,604 | 180 | 4.19 |
| Task/repetition | Outcome | Tools (errors) | Agent tokens | Seconds |
|---|---|---|---|---|
| 26/0 | Success | 10 (2) | 140,455 | 373.7 |
| 26/1 | Success | 10 (2) | 128,610 | 247.7 |
| 25/0 | Success | 10 (4) | 126,529 | 385.0 |
| 25/1 | Unscored | 17 (6) | 223,946 | 600.0 |
| 72/0 | Failure | 10 (9) | 197,961 | 515.1 |
| 72/1 | Failure | 14 (6) | 147,962 | 314.7 |
| Scenario | ||||
|---|---|---|---|---|
| flat | 0.0 | 0.0 | +0.0 | +26.49 |
| rise | 4522.5 | -85383.2 | +89905.7 | -304.88 |
| fall | 4522.5 | 93585.4 | -89063.0 | +357.85 |
| spike | 47158.8 | -80862.3 | +128021.1 | -304.10 |
| lagged-load | 0.2 | 413.1 | -412.8 | +25.08 |
| Capital | Contrast | Mean / cost bound | Resampling envelope | blocks |
|---|---|---|---|---|
| Right–own | 1.0635 | [0.9506, 1.1786] | 5/0 | |
| Right–equal | -0.3049 | [-0.3324, -0.2806] | 0/5 | |
| Equal–own | 1.3684 | [1.2642, 1.4894] | 5/0 | |
| Right–own | -0.1406 | [-0.2657, -0.0155] | 2/3 | |
| Right–equal | -0.3174 | [-0.3507, -0.2835] | 0/5 | |
| Equal–own | 0.1769 | [0.0506, 0.3138] | 4/1 |
| Portfolio | Own tasks | Right tasks | tasks | profit | Recovery tasks |
|---|---|---|---|---|---|
| 1 | 11 | 12 | 1 | -0.1670 | 9 |
| 2* | 9 | 1 | -8 | [-2.1573, -1.2153] | 9 |
| 3 | 12 | 12 | 0 | -0.3065 | 9 |
| 4 | 10 | 12 | 2 | 0.0632 | 9 |
| 5 | 10 | 12 | 2 | -0.0799 | 9 |
| Condition | Own | Equal | Right | profit | Right–equal |
|---|---|---|---|---|---|
| Baseline | 11 | 12 | 12 | -0.1670 | -0.3065 |
| Receipt multiplier 1 | 10 | 12 | 12 | -0.1826 | -0.2081 |
| Receipt multiplier 1.5 | 11 | 12 | 12 | -0.2085 | -0.2298 |
| Receipt multiplier 3 | 11 | 12 | 12 | -0.2487 | -0.4597 |
| Capital multiplier 0.5 | 0 | 11 | 11 | 1.1919 | -0.2277 |
| Capital multiplier 1.5 | 12 | 12 | 12 | -0.3065 | -0.2516 |
| Arm | Success | Budget stop | Expense | Retained | Profit |
|---|---|---|---|---|---|
| Own capital | 9 | 3 | 1.1692 | 2.2754 | 1.1062 |
| Equal capital | 12 | 0 | 1.4749 | 3.0339 | 1.5590 |
| Revenue right | 12 | 0 | 1.4749 | 2.7274 | 1.2525 |
| Arm | Scored | Successes | Budget stops | Known cost | Held funds |
|---|---|---|---|---|---|
| own | 1 | 0 | 9 | 0.147368 | 0.000000 |
| equal | 4 | 0 | 6 | 0.515037 | 0.000000 |
| right | 0 | 0 | 9 | 0.342738 | 0.172938 |
| Initial budget | Budget ($/day) | Agent (%) | Provider (%) |
|---|---|---|---|
| 50th percentile | 3.05370 | +21.23 | +32.59 |
| 75th percentile | 41.65998 | -8.11 | +0.50 |
| 90th percentile | 166.25893 | -19.17 | -11.59 |
| Arm | Success | Reached | Loss | Funded | Scarce |
|---|---|---|---|---|---|
| Own / no recovery | 0 | 12 | 0.5600 | 0.5600 | 0.1400 |
| Own / recovery | 9 | 12 | 0.1400 | 0.1400 | 0.1400 |
| Right / no recovery | 0 | 12 | 0.5400 | 0.5400 | 0.1200 |
| Right / recovery | 9 | 12 | 0.1400 | 0.1400 | 0.1400 |
| Arm | Successes | Faults | Residual cost | Eligible | Funded paid | Scarce paid |
|---|---|---|---|---|---|---|
| Own / off | 0 | 8 | 0.356410 | 0.080000 | 0.080000 | 0.030000 |
| Own / on | 1 | 8 | 1.511219 | 0.020000 | 0.020000 | 0.020000 |
| Right / off | 0 | 8 | 0.426050 | 0.080000 | 0.080000 | 0.030000 |
| Right / on | 0 | 8 | 1.063093 | 0.020000 | 0.020000 | 0.020000 |
| DFS | Successes | Known-cost contribution | Service credit |
|---|---|---|---|
| 000 | 1 | -2.036122 | 0.000000 |
| 001 | 1 | -2.046122 | 0.020000 |
| 100 | 1 | -1.586435 | 0.000000 |
| 101 | 1 | -1.596435 | 0.020000 |
| 010 | 0 | -1.594640 | 0.000000 |
| 011 | 0 | -1.604640 | 0.020000 |
| Configuration | Forward discount | Economic expense ($) |
|---|---|---|
| 000: baseline | — | 3,438.59 |
| 100: forward only | 0% | 3,459.88 |
| 100: forward only | 10% | 3,282.46 |
| 111: all three | 10% | 3,605.09 |
| Configuration | Recorded measurement scope |
|---|---|
| Direct-provider pilot | Ten scored trials and no successful tasks. |
| Gateway-format pilot | Ten Agent requests and ten returned simulated-customer responses; the customer responses match gateway records. |
| Authenticated pilot | Three scored trials with no successes, three unscored trials, and four unattempted scheduled trials; all 181 returned responses reconcile with gateway records. |
| Fixed-schedule pilot | Two scored trials, including one success. |
| Recovery configuration pilot | Two scored trials, including one success. |
| Shortened pilot | No completed trial. |
| Configuration | Requests | Responses | Scored | Successes |
|---|---|---|---|---|
| Grounding | 53 | 52 | 2 | 0 |
| Reasoning, 60 s timeout | 6 | 0 | 0 | 0 |
| Reasoning, 240 s timeout | 6 | 0 | 0 | 0 |
| Reasoning, final batch | 21 | 21 | 2 | 0 |