When I was 5, my father gave me Jamaican money. Due to my age and naivety at the time, I thought I was rich for the few minutes before he informed me that it was practically worthless in terms of Canadian money. This made me wonder why a form of currency existed if it was so worthless, and why this specific currency was so valueless. When I was a bit older, I conducted some research, and it was not just this one currency; there were many "black" countries around the world with currencies that hold very little value in the global market. This problem is larger than just a currency issue; financial instability is not a universal problem. It predominantly affects marginalized communities such as the black community. People who identify as a part of the black community tend not to only be last hired in times of economic expansion, but also the first fired during times of financial instability. To combat this systemic issue, we developed "Unmined Value Insurance".

How it works:

Unmined

An automated banking system powered by the XRP ledger. Made for NBSEHacks 2026

Purpose

This system is designed to hold an amount of XRP at the current exchange rate of USD to XRP, and when withdrawn, a new amount is calculated with the formula $$ReturnedAmount = \frac{R_o}{R_c}DepositedAmount\tag{1}$$ (1) where $R_o$ is the old rate that the transaction was held at, and $R_c$ is the current market rate. This is such that the net equivalent value of XRP is returned instead of a value that can have inflated or deflated. Since XRP is a deflationary currency, the limit of holding is 1 year, where afterward the tokens are clawed back and the funds are returned to the owner.

How it works

The main operating principle of unmined is the use of Multi-Purpose Tokens (MPTs) that due to their ability to hold metadata, are used to retain the price that the original transaction was made at for further calculation later. The main framework goes as follows:

  1. Client sends payment to a predetermined wallet
    This wallet is watched by the server for when unsolicited XRP transactions are made. when this happens, the surcharge is calculated out of the payment and the system moves onto step 2.
  2. An MPT is generated for this transaction set
    This MPT logs the current exchange rate and returns an MPT issuance ID for the client to authorize.
  3. Client authorizes the MPT for transaction
    This is a requirement of the XRPL and as of current we did not find a way to get around this. maybe an AMM (AutomatedMarketMaker)?
    The server watches for this action to be taken and automatically goes to step 4.
  4. Server issues a quantity of the MPT
    The amount is the same as the initial principle - surcharge (0.5%). This is done for easier calculations later.
  5. The MPTs are held by the client until they wish to withdraw some or all of it (after a waiting period of 1 hour) or until a year when it is force refunded.
    In order to withdraw the client just needs to transfer the MPTs back to the server address it initially deposited to.
  6. Server automatically notices the withdrawal attempt, it will send back the funds using equation 1.

Scripts

Name Function
main.py runs a commandline based client that automatically does a full deposit and withdraw sequence, ignoring the time limits.
oracle.py updates the on-chain oracle for XRP-USD exchange rate.
server.py runs the backend for the functions
api_serv.py runs the backend as a rest api, see API.md for endpoints

Running

Minimal test

  1. In order to run a minimal test, first install requirements:

    git clone https://github.com/idscc/hbsehacks_unmined.git unmined
    cd unmined
    python -m venv .venv
    source .venv/Scripts/activate # depends on OS and shell
    pip install -r requirements.txt
    
  2. Create a .env file in the root directory with the following values

| key | value | |---------------|-----------------------------------------------------------------------| | BANK_SECR | Bank Secret Key | | BANK_ADDR | Bank Public Address | | CLIENT_SECR | Client Secret Key | | CLIENT_ADDR | Client Public Address | | STOCK_API_KEY | Alpha Vantage API key |

  1. Update the oracle shell python ./src/oracle.py
  2. Start the server shell python ./src/server.py
  3. In another shell, start the client shell python ./src/client.py

Note

When running this example, it is slightly interactive, as although the server and client are independent when running (they only interact over XRPL), in order to authorize the transaction the client must somehow acquire the MPT issuance ID. So take note that once the client does the initial transaction, the server will generate the MPT issuance ID and print it out as

issuance_id <MPT_issuance_id>

Copy it and paste it into the client when prompted. The rest is automated
A large challenge faced through this project was correctly creating a financial plan to ensure the sustainability and stability of this project. We found that the average annual cost of ~1.3% from the depreciation of currency can be offset by investing held funds. Our current investment plan is an investment in the S&P 500, where we will be able to receive a return of ~9.8% yearly.

While the likelihood of a large crash in a currency's exchange rate is relatively low, this could be devastating for those who already face oppressive systems and do not have luxuries such as savings or familial wealth to fall back on. This high severity causes this possibility to become a medium-high risk to high risk scenario when assessed with a risk assessment matrix

Built With

Share this project:

Updates