Rift-Network is an experimental Solana protocol implemented with Anchor. It combines a core accounting layer with a separate token issuance layer to preserve a strict mathematical invariant while offering RIFT SPL token minting.
The repository is built as an Anchor workspace with two programs:
ultra_core_rift: the core economic state machine and invariant enforcement layer.rift_token: the token issuance layer that mints RIFT shares based on core state.rift-common: shared protocol constants and error definitions.
This README is based on the actual implementation in the repository and the protocol model defined in SPEC.md.
- Overview
- Motivation
- Architecture
- Repository Structure
- Economic Model
- Core Program
- Token Program
- Protocol Invariants
- Implemented Functionality
- Roadmap
- Build Instructions
- Test Instructions
- CI Description
- License
Rift-Network is a research-oriented protocol that tracks participant balances with a shared scalar field and enforces supply accounting through an explicit economic invariant. The system separates the core mathematical state from the token layer so that the SPL token interface can read core state without modifying invariant logic directly.
The protocol is designed to explore a participant-based supply model that supports:
- uniform field-based balance shifts across all participants,
- controlled redistribution of supply,
- negative entropy decay,
- directed edge transfer costs,
- SPL token issuance tied to core economic state.
Separating the core accounting layer from the token layer improves safety by keeping critical invariant logic contained in a dedicated program while exposing an SPL token interface through a separate program.
Rift-Network uses an Anchor workspace with two programs and a shared common crate.
ultra_core_rift: core accounting, participant state, and invariant enforcement.rift_token: token issuance, fee collection, and minting logic.rift-common: shared protocol constants and error definitions.
The core program owns the protocol state and executes invariant-preserving transitions. The token program reads core state and mints RIFT shares according to current field pressure.
flowchart LR
Core[ultra_core_rift]
Token[rift_token]
Common[rift-common]
Core --> Common
Token --> Common
Token --> Core
.
├── Anchor.toml
├── Cargo.toml
├── SPEC.md
├── crates/
│ └── rift-common/
│ └── src/lib.rs
├── programs/
│ ├── ultra_core_rift/
│ │ └── src/lib.rs
│ └── rift_token/
│ └── src/lib.rs
└── .github/workflows/
└── rust.yml
Rift-Network is based on the following protocol primitives:
p: participant count.base_balance: signed participant balance stored in the core program.global_field: signed scalar field applied uniformly to all participants.total_base_sum: sum of all participantbase_balancevalues.total_supply: unsigned protocol supply.total_mintedandtotal_burned: cumulative mint and burn counters.dust_accumulator: redistribution remainder.
Each participant's effective balance is conceptually:
effective_balance = base_balance + global_field
This means every participant is shifted by the same global_field amount in the economic model.
The core program can redistribute supply by increasing global_field and minting the corresponding amount into total_supply. Redistribution splits the amount evenly across p, and any remainder is stored in dust_accumulator.
Negative entropy decreases global_field by a fixed constant NEG_E and adjusts total_base_sum so the invariant remains valid.
Transfers may include a directed edge cost. The cost is applied to the sender in addition to the transfer amount:
- positive weight burns supply,
- negative weight mints supply,
- zero weight behaves as a normal transfer.
The protocol enforces a dynamic debt ceiling to bound negative participant balances. The debt limit is derived from current supply and participant count so that no participant can create unbounded debt.
programs/ultra_core_rift implements the protocol state machine and invariant logic.
The program stores:
gate: privileged authority key.paused: transfer pause flag.global_field: signed scalar field.total_base_sum: sum of base balances.total_supply: unsigned supply.total_minted: total minted amount.total_burned: total burned amount.p: participant count.dust_accumulator: redistribution remainder.
initialize(gate): create a newCoreState.set_paused(paused): gate-only pause control.register(user): gate-only participant registration; preserves the invariant by adjustingtotal_base_sum.unregister(): gate-only participant removal; disallows debt and burns any positive remaining balance.transfer(amount): participant-to-participant transfer without edge cost.transfer_with_edge(amount): transfer with a directed edge cost and explicit target authorization.set_edge(_from, _to, weight): gate-only set or update an edge weight.redistribute(amount): gate-only increaseglobal_fieldand mint supply across participants.apply_neg_entropy(): gate-only apply a negative entropy tick and adjusttotal_base_sum.
CoreState: global protocol state.UserAccount: per-participant account, PDA['user', authority].EdgeAccount: directed edge weight, PDA['edge', from, to].
programs/rift_token provides an SPL token layer on top of the core state.
The token program stores:
authority: gate authority forrebase.core_state: boundCoreStateaddress.admin_vault: SOL fee recipient and founder share recipient.decimals: token decimal precision.fee_bps: issuance fee, capped at 10 basis points (0.10%).total_shares: minted RIFT shares.rift_multiplier: cached field multiplier.
initialize(decimals, fee_bps, initial_supply): create token state and mint 3.14% ofinitial_supplyto the admin vault.issue_rift(base_amount): user-facing mint function that accepts SOL, deducts the protocol fee, computes field pressure, and mints RIFT shares.rebase(): gate-only refresh the cachedrift_multiplierfrom the current coreglobal_field.
issue_rift computes RIFT shares as:
field_pressure = max(|global_field|, MIN_FIELD_PRESSURE)
mint_multiplier = 1e15 / field_pressure
shares_to_mint = (base_amount - fee) * mint_multiplier / 1e12
A floor on field_pressure prevents the multiplier from diverging when global_field is close to zero.
- verifies
core_stateagainst the stored bound address. - verifies
admin_vaultagainst the stored admin vault. - checks
core.pausedbefore minting. - requires
shares_to_mint > 0.
The implementation enforces the following invariant conditions:
total_supply = total_base_sum + global_field × ptotal_supply = total_minted − total_burnedtotal_supply ≤ i128::MAXtotal_minted ≥ total_burned- if
p > 0,dust_accumulator < p
The core program validates these conditions in CoreState::check_invariant() after every state-changing instruction.
The repository currently implements:
- core initialization and gate-authorized administration,
- participant registration and safe unregistering,
- participant transfers and edge-cost transfers,
- protocol redistribution and negative entropy ticks,
- SPL token issuance based on core field pressure,
- founder share minting and SOL fee collection,
- cached token multiplier updates via rebase.
Future work includes:
- more extensive integration and invariant tests,
- formal verification of state transitions,
- improved Anchor deployment and upgrade tooling,
- off-chain tooling for monitoring and indexing state,
- governance and authority management solutions.
- Rust toolchain.
- Solana CLI.
- Anchor CLI.
cargo build --workspacecargo fmt --allcargo clippy --workspace --exclude ultra_core_rift --exclude rift_token --all-targets --all-features -- -D warnings -A unexpected-cfgsThe current repository test workflow excludes the Anchor programs:
cargo test --workspace --exclude ultra_core_rift --exclude rift_tokenThe repository CI workflow is defined in .github/workflows/rust.yml and currently performs:
- checkout
- install Rust toolchain
1.85.1withrustfmtandclippy - cache Cargo registry and build artifacts
cargo fmt --all -- --checkcargo clippy --workspace --exclude ultra_core_rift --exclude rift_token --all-targets --all-features -- -D warnings -A unexpected-cfgscargo test --workspace --exclude ultra_core_rift --exclude rift_token
Licensed under Apache License 2.0 — see LICENSE for details.
Key terms:
- Attribution required
- Patent protection included
- Derivative works allowed with conditions
- Commercial use allowed
Built in Rust · Verified by Mathematics · Zero Compromises
Reality Fractal Theory Core · © 2026 Eugeny (RFT-SIRM)