stability-nexus
Stability Nexus multi-protocol simulation library.
Installation
pip install stability-nexus
Quick Start
from stability_nexus.gluon.reactors import GluonWReactor
from stability_nexus.gluon.reactors.types import (
GluonReaction,
GluonWReactorParameters,
GluonWReactorState,
)
# Configure reactor parameters
params = GluonWReactorParameters(
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_window=10.0,
)
# Initialize reactor state
state = GluonWReactorState(
reserves=1000.0,
neutron_circulating_supply=500.0,
proton_circulating_supply=500.0,
beta_decay_history=[],
)
# Create reactor instance
reactor = GluonWReactor(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}")
The Gluon W Reactor
GluonWReactor implements the Gluon W protocol:
- the normalized neutron ratio is capped at the critical ratio (
min(q, q*)), and - the beta decay fee is based on the signed sum of beta decay volumes within a sliding time window of length
volume_window.
A Gluon Z variant (damped ratio, exponentially decaying volume) is planned once its specification is finalized.
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 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| stability_nexus-2.0.0.tar.gz | 38.9 kB | With provenance | Details for stability_nexus-2.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| stability_nexus-2.0.0-py3-none-any.whl | Python 3 | none | any | Details for stability_nexus-2.0.0-py3-none-any.whl |
Total release size: 45.2 kB
Release files / stability_nexus-2.0.0.tar.gz
| Download URL | stability_nexus-2.0.0.tar.gz |
|---|---|
| Size | 38.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
41795acb1df61328252c0137008de483044b179b0e1d10dcea448149d77f79f2
|
|
BLAKE2b-256 checksum How to use checksums |
5658f500e9e4a08dda2e4897d5063d2849fdc93bfabd123fa0bbe911c3905d6e
|
| 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 logRelease files / stability_nexus-2.0.0-py3-none-any.whl
| Download URL | stability_nexus-2.0.0-py3-none-any.whl |
|---|---|
| Size | 6.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3718afb2d25322575fc7b5d9a6e31df71ba0209300cad774d14dc15cf9dc83a9
|
|
BLAKE2b-256 checksum How to use checksums |
8826a7242e81bf38742048e629f320a2df070098ca68198eda4fd3fb08307c59
|
| 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 logSecurity for stability-nexus 2.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.
Attestation for stability_nexus-2.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 logA 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.