[PR #131] [MERGED] SMP 0.19.0: the bank (/bank), savings paid by the Treasury #133

Closed
opened 2026-11-03 04:03:31 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon-mods/pull/131
Author: @ludovic111
Created: 11/1/2026
Status: ✅ Merged
Merged: 11/1/2026
Merged by: @ludovic111

Base: main ← Head: feat/smp-bank


📝 Commits (1)

  • 27bfc9d SMP 0.19.0: the bank (/bank), savings paid by the Treasury

📊 Changes

9 files changed (+521 additions, -13 deletions)

View changed files

📝 native/smp/Cargo.lock (+1 -1)
📝 native/smp/Cargo.toml (+1 -1)
📝 native/smp/README.md (+16 -3)
📝 native/smp/mixins/smp/glue.rs (+31 -3)
📝 native/smp/mixins/smp/horizon-mixin.toml (+7 -1)
➕ native/smp/mixins/smp/smp_bank.rs (+442 -0)
📝 native/smp/mixins/smp/smp_tax.rs (+20 -3)
📝 native/smp/proof.py (+1 -1)
📝 native/smp/src/lib.rs (+2 -0)

📄 Description

🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself.

The bank (smp-econ-1, round 2): savings that earn a small interest paid from the Treasury, never minted.

What

  • /bank, /bank deposit <amount|all>, /bank withdraw <amount|all>: coins move between the wallet and the bank pool, free, at any time. Each move is one audit line (bank_deposit, bank_withdraw); accounts live in economy.json (ext.bank), written with the money.
  • Interest 0.1% a day (bank.daily_basis_points 10), paid at 00:00 UTC from the Treasury (bank_interest, a pool move: nothing minted) on the lowest amount saved since the last payment: depositing before midnight and withdrawing after earns nothing. Only the first 10,000 coins of an account earn; at most 25,000 saved; one night's interest for everyone is at most 5% of the Treasury, pro rata when that's short; an empty Treasury pays nothing.
  • The wealth tax now counts savings with the wallet (paid from the wallet), so the bank can't hide wealth.
  • No loans: collateral (items) can't be held safely by the mod, and a loan without it is free money for an alt that never pays back.

Why these numbers: 0.1%/day ≈ 3%/month on at most 10,000 coins = at most 10 coins a night per saver, a reason to keep coins out of circulation (and out of the market) without a meaningful money source; the 5% Treasury cap keeps the Treasury from being drained whatever the deposits.

Tests: cargo test --lib 87 passed (new: interest from the next full day and from the Treasury only, the deposit-before-midnight trick earns nothing, caps and pro-rata cut, empty Treasury, restart; savings counted by the wealth tax), clippy -D warnings, fmt. Game build: CI's horizon (smp). proof.py: config key bank. Not run locally (Mac mini disk).

Version 0.19.0 (#129 also says 0.19.0: whoever merges second bumps).

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon-mods/pull/131 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/smp-bank` --- ### 📝 Commits (1) - [`27bfc9d`](https://github.com/horizon-rust/horizon-mods/commit/27bfc9da13b52a4504ab4ce2744f6dcc275090de) SMP 0.19.0: the bank (/bank), savings paid by the Treasury ### 📊 Changes **9 files changed** (+521 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `native/smp/Cargo.lock` (+1 -1) 📝 `native/smp/Cargo.toml` (+1 -1) 📝 `native/smp/README.md` (+16 -3) 📝 `native/smp/mixins/smp/glue.rs` (+31 -3) 📝 `native/smp/mixins/smp/horizon-mixin.toml` (+7 -1) ➕ `native/smp/mixins/smp/smp_bank.rs` (+442 -0) 📝 `native/smp/mixins/smp/smp_tax.rs` (+20 -3) 📝 `native/smp/proof.py` (+1 -1) 📝 `native/smp/src/lib.rs` (+2 -0) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. The bank (smp-econ-1, round 2): savings that earn a small interest paid from the Treasury, never minted. **What** - `/bank`, `/bank deposit <amount|all>`, `/bank withdraw <amount|all>`: coins move between the wallet and the `bank` pool, free, at any time. Each move is one audit line (`bank_deposit`, `bank_withdraw`); accounts live in `economy.json` (`ext.bank`), written with the money. - Interest 0.1% a day (`bank.daily_basis_points` 10), paid at 00:00 UTC from the Treasury (`bank_interest`, a pool move: nothing minted) on the **lowest** amount saved since the last payment: depositing before midnight and withdrawing after earns nothing. Only the first 10,000 coins of an account earn; at most 25,000 saved; one night's interest for everyone is at most 5% of the Treasury, pro rata when that's short; an empty Treasury pays nothing. - The wealth tax now counts savings with the wallet (paid from the wallet), so the bank can't hide wealth. - No loans: collateral (items) can't be held safely by the mod, and a loan without it is free money for an alt that never pays back. **Why these numbers**: 0.1%/day ≈ 3%/month on at most 10,000 coins = at most 10 coins a night per saver, a reason to keep coins out of circulation (and out of the market) without a meaningful money source; the 5% Treasury cap keeps the Treasury from being drained whatever the deposits. **Tests**: `cargo test --lib` 87 passed (new: interest from the next full day and from the Treasury only, the deposit-before-midnight trick earns nothing, caps and pro-rata cut, empty Treasury, restart; savings counted by the wealth tax), clippy -D warnings, fmt. Game build: CI's `horizon (smp)`. proof.py: config key `bank`. Not run locally (Mac mini disk). Version 0.19.0 (#129 also says 0.19.0: whoever merges second bumps). 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:03:31 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon-mods#133
No description provided.