Skip to main content

stability-nexus

Stability Nexus multi-protocol simulation library.

Installation

pip install stability-nexus

Quick Start

from stability_nexus.gluon.reactors import GluonZReactor
from stability_nexus.gluon.reactors.types import (
    GluonReaction,
    GluonZReactorParameters,
    GluonZReactorState,
    Tokeons,
)

# Configure reactor parameters
params = GluonZReactorParameters(
    critical_neutron_ratio=0.5,
    fission_fee=0.01,
    fusion_fee=0.01,
    beta_decay_fee_slope=0.1,
    beta_decay_fee_intercept=0.005,
    volume_decay_factor=0.99,
)

# Initialize reactor state
state = GluonZReactorState(
    reserves=1000.0,
    neutron_circulating_supply=500.0,
    proton_circulating_supply=500.0,
    prev_volume_delta=0.0,
    prev_reaction_time=0.0,
)

# Create reactor instance
reactor = GluonZReactor(params, state)

# Execute a fission reaction (basecoins -> neutrons + protons)
result = reactor.execute(
    GluonReaction.FISSION,
    balance=100.0,
    neutron_target_price=1.0,
    reaction_time=1.0,
)
print(f"Received: {result.reactor_output}")
print(f"New reserves: {result.reactor_state.reserves}")

Reactions

The Gluon protocol supports four reaction types:

  • FISSION: Convert basecoins into neutrons and protons
  • FUSION: Convert neutrons and protons back into basecoins
  • BETA_DECAY_PLUS: Convert protons into neutrons
  • BETA_DECAY_MINUS: Convert neutrons into protons

Types

The library uses type aliases for documentation:

  • Basecoin - Reserve currency amounts (float)
  • Neutron - Neutron token amounts (float)
  • Proton - Proton token amounts (float)
  • BasecoinPerNeutron - Price ratio (float)
  • BasecoinPerProton - Price ratio (float)
  • Tokeons - A dataclass containing neutrons and protons

Contributing

If you encounter bugs, need help, or have feature requests:

  • Please open an issue in this repository providing detailed information.
  • Describe the problem clearly and include any relevant logs or screenshots.

We appreciate your feedback and contributions!

© 2025 The Stable Order.

Metadata

Release files for stability-nexus 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for stability-nexus 1.0.0
File Size Uploaded Provenance Actions
stability_nexus-1.0.0.tar.gz 35.5 kB With provenance Details for stability_nexus-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for stability-nexus 1.0.0
File Interpreter ABI Platform Actions
stability_nexus-1.0.0-py3-none-any.whl Python 3 none any Details for stability_nexus-1.0.0-py3-none-any.whl

Total release size: 41.3 kB

Release files / stability_nexus-1.0.0.tar.gz

Download URL stability_nexus-1.0.0.tar.gz
Size 35.5 kB
Tags Source
SHA-256 checksum
How to use checksums
4c9b1b83fa40a2e65dc042be4ada10b59054650023548cac170de67c53e5ac98
BLAKE2b-256 checksum
How to use checksums
084a1d098a40ec5aeba697f47f7d6d1fbc350d83ba75ed1fb0073143953ea2aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.

Transparency log

Release files / stability_nexus-1.0.0-py3-none-any.whl

Download URL stability_nexus-1.0.0-py3-none-any.whl
Size 5.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
913472e4c31d0d4e89c52f82e59f66ed551afb2c9b6d6c5164f0074e13baea1f
BLAKE2b-256 checksum
How to use checksums
580252d418ffaad46285db827e3103b4abdc451108e4d8348b02da10dc9099ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.

Transparency log

Security for stability-nexus 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for stability_nexus-1.0.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page