Created
August 19, 2025 09:07
-
-
Save vlad-ds/e92c13df5892bd3ed3886f81728459f6 to your computer and use it in GitHub Desktop.
Bilancio Payment Mechanisms Demo - Simple scenario demonstrating intra-bank, inter-bank, and cash payments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: "Payment Mechanisms Demo" | |
| description: "Simple scenario demonstrating intra-bank, inter-bank, and cash payments" | |
| agents: | |
| - id: CB | |
| kind: central_bank | |
| name: "Central Bank" | |
| # Two banks | |
| - id: BANK_A | |
| kind: bank | |
| name: "Alpha Bank" | |
| - id: BANK_B | |
| kind: bank | |
| name: "Beta Bank" | |
| # Two households at Alpha Bank | |
| - id: ALICE | |
| kind: household | |
| name: "Alice (Alpha Bank)" | |
| - id: BOB | |
| kind: household | |
| name: "Bob (Alpha Bank)" | |
| # Two households at Beta Bank | |
| - id: CHARLIE | |
| kind: household | |
| name: "Charlie (Beta Bank)" | |
| - id: DIANA | |
| kind: household | |
| name: "Diana (Beta Bank)" | |
| initial_actions: | |
| # Give banks some reserves | |
| - mint_reserves: | |
| to: BANK_A | |
| amount: 10000 | |
| - mint_reserves: | |
| to: BANK_B | |
| amount: 10000 | |
| # Give households some cash | |
| - mint_cash: | |
| to: ALICE | |
| amount: 5000 | |
| - mint_cash: | |
| to: BOB | |
| amount: 5000 | |
| - mint_cash: | |
| to: CHARLIE | |
| amount: 5000 | |
| - mint_cash: | |
| to: DIANA | |
| amount: 5000 | |
| # Households deposit most of their cash | |
| - deposit_cash: | |
| customer: ALICE | |
| bank: BANK_A | |
| amount: 4000 | |
| - deposit_cash: | |
| customer: BOB | |
| bank: BANK_A | |
| amount: 4000 | |
| - deposit_cash: | |
| customer: CHARLIE | |
| bank: BANK_B | |
| amount: 4000 | |
| - deposit_cash: | |
| customer: DIANA | |
| bank: BANK_B | |
| amount: 4000 | |
| # Day 1: Three types of payments | |
| # 1. Intra-bank payment (same bank) | |
| - create_payable: | |
| from: ALICE | |
| to: BOB | |
| amount: 500 | |
| due_day: 1 | |
| # 2. Inter-bank payment (cross-bank) | |
| - create_payable: | |
| from: ALICE | |
| to: CHARLIE | |
| amount: 1000 | |
| due_day: 1 | |
| # 3. Cash payment (will use cash since BOB has limited deposits) | |
| - create_payable: | |
| from: BOB | |
| to: DIANA | |
| amount: 4200 # More than BOB's deposits, forcing cash usage | |
| due_day: 1 | |
| # Day 2: More inter-bank flows in opposite direction | |
| - create_payable: | |
| from: CHARLIE | |
| to: ALICE | |
| amount: 800 | |
| due_day: 2 | |
| - create_payable: | |
| from: DIANA | |
| to: BOB | |
| amount: 700 | |
| due_day: 2 | |
| # Day 3: Final settlements | |
| - create_payable: | |
| from: BOB | |
| to: ALICE | |
| amount: 300 | |
| due_day: 3 | |
| - create_payable: | |
| from: DIANA | |
| to: CHARLIE | |
| amount: 400 | |
| due_day: 3 | |
| run: | |
| max_days: 10 | |
| quiet_days: 2 | |
| check_invariants: daily | |
| show: | |
| events: detailed | |
| balances: | |
| - BANK_A | |
| - BANK_B | |
| - ALICE | |
| - BOB | |
| - CHARLIE | |
| - DIANA |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment