Skip to content

DynaTrade

DynaTrade is a batch-based market engine for Spigot and Paper 1.21.x servers.

Instead of reacting to every buy or sell like a slot machine, it aggregates player trade pressure, applies controlled price movement in cycles, and persists trade intent with recovery-focused durability. The result is a market that feels alive without turning ordinary server play into chaos.


Current version: 0.8.6

Highlights of the current line:

  • architecture consolidation: thread safety (lock-free transaction buffer, volatile fields, ReentrantLock cycle transitions, ConcurrentHashMap on all shared state), durability (atomic file ops, FileChannel.force() directory sync), GuiDependencies record, factory-style runtime assembly, upfront config validation, PricingService constructor refactor
  • expanded /market hub with Explore, Categories, Insights, and personal trade history
  • Market Insights dashboard and ranking views: player-facing market summary, top gainers, top losers, most traded, most bought, and most sold
  • durable pending-trade journaling with stronger restart recovery
  • apply-before-signal ordering, staged runtime retry recovery, and recovery-aware pending item delivery / Vault credit
  • async durability batching and cycle persistence off the Bukkit thread
  • bounded main-thread apply backpressure for burst load
  • trade admission control for overload protection
  • player-aware pressure normalization as base pricing behavior
  • active participation reach for broader-economy participation context
  • momentum signal generation
  • optional momentum-driven quote adjustment, disabled by default
  • processing-state feedback during buy and sell execution
  • safer operator defaults for production servers
  • effective VREF calibration with 7 tuning parameters, EMA smoothing, ring buffer, blend weight, and max-change per cycle
  • calibration state persistence in market-state.yml with restart and reload restoration
  • calibration diagnostics in /dt item showing state, reason, VREF ratio, sample counts, and cap/floor flags
  • per-phase trade observability metrics for buy/sell timing diagnostics

Current status:

  • Technical Preview
  • usable for controlled evaluation

How it works

High-level trade flow:

/buy or /sell -> validation/admission -> apply queue -> economy/inventory apply -> durable journal -> transaction buffer -> pricing cycle

What this means in practice:

  • players still receive normal command and GUI feedback
  • market signals are made durable only after the real economy/inventory apply succeeds
  • the market still moves in cycles, not per click
  • the Bukkit thread is protected from the worst disk and burst-apply pressure

If apply succeeds but market journaling fails, the player effect remains and the price signal is omitted. This avoids recovery replaying pressure for a trade that never happened.

See Trade Consistency and Recovery for pending retry stages, pending delivery states, pending Vault credit, sell compensation, and operator procedures.

On restart, the last confirmed market state is restored. If market-state.yml is critically invalid, DynaTrade blocks startup rather than silently resetting prices.


Requirements

  • Spigot or Paper 1.21.x (validated against 1.21.4)
  • Java 21
  • Vault
  • A Vault-compatible economy provider - EssentialsX is the tested option

The documented validated surface is Spigot 1.21.4 and Paper 1.21.4.


Validation position

The current 0.8.6 line has recorded local smoke, benchmark, and recovery evidence, but those artifacts are environment-specific and should be read from the current validation materials rather than from fixed public summary numbers.

Compatibility note:

WARNING: Downgrade from 0.8.4+ to 0.8.3 is not supported. The rt3 audit log schema, PendingDeliveryService persistence format, and architecture hardening state are incompatible with 0.8.3. Downgrading may corrupt persisted state.

This is enough to treat the line as a technical preview runtime for controlled evaluation, not as a broad public performance guarantee.


For first-time setup, start with Installation and Quick Start.

For configuration and tuning, see Configuration.

For day-to-day operations, see the Admin Guide.