Skip to content

jcfinidori/postal-settle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

14 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🏦 AtomicPost

Cross-Border parcel Stablecoin settlement for postal operators

Replacing 7-30 day correspondent banking settlement with stablecoin infrastructure that settles in seconds: live on XRPL Testnet and Solana Devnet.

Python Flask XRPL Solana License


🚨 The problem

The global cross-border parcel business still runs on outdated financial rails. Settlements pass through multiple correspondent banks; triggering: fees, delays, trapped liquidity, currency risk.

Pain Point Current Reality
Settlement time 7 to 30 days
Correspondent banks 2 to 3 hops
Transaction cost 5 to 7% of value
Visibility None until funds arrive
Working capital Trapped in receivables
Reconciliation Manual, error-prone

Postal operators in developing markets bear the highest cost and have uneven access to correspondant banks.


βœ… The solution

AtomicPost is a stablecoin treasury infrastructure that replaces correspondent banking for cross-border postal settlement. It sits at the settlement layer. Same clearing logic: net positions, issue coins, execute. Final, in seconds. We’re building atomic settlement rails. No correspondent banks. No trapped cash. No FX exposure. This paves the way for programmable value-sharing.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚           TRADITIONAL SETTLEMENT            β”‚
β”‚                                             β”‚
β”‚  Operator A β†’ Bank β†’ Correspondent          β”‚
β”‚            β†’ Bank β†’ Operator B             β”‚
β”‚                                             β”‚
β”‚  Time: 7-30 days  β”‚  Cost: 5-7%            β”‚
β”‚  Hops: 2-3 banks  β”‚  Visibility: None      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚           POSTAL SETTLE                     β”‚
β”‚                                             β”‚
β”‚  Treasury confirms USD backing              β”‚
β”‚       ↓                                     β”‚
β”‚  Mint USD-ST stablecoin                     β”‚
β”‚       ↓                                     β”‚
β”‚  Operator A β†’ XRPL/Solana β†’ Operator B     β”‚
β”‚       ↓                                     β”‚
β”‚  Burn tokens, release USD                   β”‚
β”‚                                             β”‚
β”‚  Time: 3-5 sec  β”‚  Cost: <0.01%            β”‚
β”‚  Hops: 0 banks  β”‚  Visibility: Full        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

⛓️ Live Blockchain transactions

These are real transactions executed during development, publicly verifiable on Solana Devnet demonstrating the settlement protocol for Posts.

Solana Devnet: complete USD-ST lifecycle

Step Transaction Explorer
1 USD-ST Issuance: treasury mints stablecoin View on Solana
2 Cross-Border Settlement: operator payment View on Solana
3 Token Redemption: burn and release View on Solana

All three transactions demonstrate the complete stablecoin lifecycle: mint fiat-backed tokens on demand, execute cross-border settlement, burn tokens to release USD backing.

XRPL Testnet: full settlement dashboard

Complete 7-screen treasury application with real transactions including issuance, settlement, partial settlement with carry-forward, reconciliation and burn.

XRPL Demo (Full Application)

Steps to run app.py and walk through all seven screens. Reference DEMO.md for the complete walkthrough guide.

Solana Demo

python3 solana_service.py Shows settlement transactions on Solana devnet with explorer links.

🎯 Key features

Stablecoin treasury control

  • Manual USD backing confirmation per cycle
  • Single-action issuance authorization
  • Real-time reserve utilization monitoring
  • Hard cap enforcement on issuance

Cross-Border settlement

  • Full and partial settlement execution
  • Automatic carry-forward for partial obligations
  • Inbound and outbound settlement tracking
  • Settlement comparison: traditional vs blockchain

Blockchain integration

  • XRPL Testnet: native issued currency
  • Solana Devnet: SPL token program
  • Chain-agnostic architecture
  • Real transaction verification

Treasury operations

  • Automated reconciliation engine
  • Exception detection and management
  • Full audit trail with timestamps
  • CSV export for regulatory review

Hackathon track alignment

Cross-Border stablecoin treasury

Requirement AtomicPost
Mint fiat-backed stablecoins on demand βœ… USD-ST issuance against confirmed USD
Redeem stablecoins βœ… Burn flow with USD release
Move money across borders instantly βœ… 3-5 second settlement on XRPL/Solana
Automate treasury operations βœ… 7-screen dashboard with full lifecycle
Fewer intermediaries βœ… Zero correspondent banks
Audit and compliance βœ… Immutable on-chain audit trail

Architecture

CSV Parcel Data
      ↓
Off-Ledger Clearing Engine
      ↓
Treasury Dashboard (Flask)
      ↓
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ XRPL Layer  β”‚ Solana Layer β”‚
β”‚ xrpl-py     β”‚ solana-py    β”‚
β”‚ Issued curr β”‚ SPL Token    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
      ↓
Reconciliation Engine
      ↓
Audit Log + CSV Export

Application screens

Screen EPIC Function
Dashboard EPIC 0 Overview and quick actions
Clearing Setup EPIC 0 Net obligation entry
Reserve Governance EPIC 1 USD backing and authorization
Issuance EPIC 2 Mint and burn USD-ST
Settlement EPIC 3+4 Execute XRPL payments
Reconciliation EPIC 5 Auto-match transactions
Audit Log EPIC 6 Trail and CSV export

πŸš€ Quick start

Prerequisites

  • Python 3.9 or higher
  • Git

Installation

git clone https://github.com/jcfinidori/AtomicPost.git
cd AtomicPost
pip install -r requirements.txt
cp accounts_template.json accounts.json

Configure Wallets

XRPL testnet wallets and Solana Wallets installed.

Run the application

python3 reset_demo.py
python3 app.py

Open http://localhost:5000

Run Solana demo

python3 solana_service.py

πŸ“ Project structure

apostal_poc/
β”œβ”€β”€ app.py                  # Flask application
β”œβ”€β”€ database.py             # SQLite data layer
β”œβ”€β”€ xrpl_service.py         # XRPL integration
β”œβ”€β”€ solana_service.py       # Solana integration
β”œβ”€β”€ reset_demo.py           # Demo reset script
β”œβ”€β”€ requirements.txt        # Dependencies
β”œβ”€β”€ accounts_template.json  # Wallet template
β”œβ”€β”€ templates/              # Seven HTML screens
β”‚   β”œβ”€β”€ base.html
β”‚   β”œβ”€β”€ dashboard.html
β”‚   β”œβ”€β”€ clearing.html
β”‚   β”œβ”€β”€ reserve.html
β”‚   β”œβ”€β”€ issuance.html
β”‚   β”œβ”€β”€ settlement.html
β”‚   β”œβ”€β”€ reconciliation.html
β”‚   └── audit.html
└── sample_data/            # Sample CSV files

πŸ—ΊοΈ Roadmap

Phase 1 β€” Current PoC

  • Complete treasury dashboard on testnet
  • Real blockchain transactions verified
  • Solana devnet integration

Phase 2 β€” CSV integration

  • Automated clearing from parcel CSV data
  • Multi-operator netting engine

Phase 3 β€” Operator Pilot

  • Real designated operator participation
  • Middle East / Africa corridor

Phase 4 β€” Mainnet

  • Real USDC on XRPL and Solana mainnet
  • Production treasury controls

Phase 5 β€” Multi-chain

  • Liquidity pooling across chains
  • Automated FX conversion

🌍 Real-world context

I witness operators struggling with legacy banking infra, high inflation, currency instability. And now the global system itself is shifting; causing fragmentation.

Built for settlement corridors in complement of the Universal Postal Union (UPU) designated operator clearing rules.

Target corridors: Middle East to Africa; Asia/Pacific; Europe to Africa Operators: Designated postal operators

This PoC demonstrates that postal operators can settle cross-border obligations without correspondent banking infrastructure; making financial settlement accessible to operators in developing markets.


πŸ“„ License

MIT License β€” see LICENSE file

About

Stablecoin-based cross-border settlement infrastructure for postal operators. Built on XRPL Testnet with Solana devnet integration. Flask + Python PoC.

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors