<aside>
📣
Hadron program upgrade — Wednesday 4 November 2026 (TBD)
Your pools will experience no downtime. Swaps keep working without changes; some prices change slightly (see below). If you manage a pool (with our SDK, your own scripts or a multisig), please do the steps below before the upgrade.
</aside>

Before the upgrade
- [ ] P0: Do your transactions set a loaded-accounts data size limit (
SetLoadedAccountsDataSizeLimit)? Raise it now, by at least 100,000 bytes. Ahead of the upgrade, Hadron enlarges the account that holds the program so the new version fits, and every transaction that calls Hadron counts that account toward the limit: from then on, transactions with a tight limit fail with MaxLoadedAccountsDataSizeExceeded. The SDK doesn't set this limit; if you don't set it either, nothing changes.
- [ ] P0: Update your Hadron SDK to the new version (Rust
hadron-sdk-v2 ≥ 0.4.1, TypeScript @hadron-fi/sdk-v2 ≥ 0.4.1). Version ranges such as ^0.1 don't pick it up automatically: change the dependency yourself. It works before and after the upgrade. Older versions stop working for pool creation, curve updates, spread-config changes and staleness updates.
- [ ] P1: Do your bots pass a sequence on curve switches (a timestamp, slot or counter)? After the upgrade, curve updates (SetCurve / SetRiskCurve) must carry a sequence at least as high as the pool's current one. Pass the same value you use on switches. Pools that never used a non-zero sequence are not affected.
- [ ] P2: Token has a transfer fee and you adjusted your curves for it? Remove the adjustment right after the upgrade. If it stays on, your users pay the fee twice: your spreads effectively increase post-upgrade.
- [ ] P2: Running long-lived bots? Once the upgrade completes, call
refetchStates() (Rust: refetch_states) or reload pools with Hadron.load(). A spread-trigger edit from a client that hasn't refreshed is rejected without changing anything; refresh, then retry. If you build spread-config updates yourself with buildUpdateSpreadConfig (Rust: build_update_spread_config), pass program version 2 after the upgrade (read it with resolveProgramVersion from the global FeeConfig): refetchStates() only updates Hadron instances.
- [ ] P3: Want to add a spread config to a pool (new or existing) after the upgrade? Send us your pool-authority wallet so we can allowlist it. Pools that already have one don't need this. Operators who already use a spread config are allowlisted by us right after the upgrade: no need to send anything.
- [ ] P3: Do you have a drawdown guard and an oracle staleness limit? After the upgrade, deposits and withdrawals fail with StaleOracle (37) while the oracle is older than your staleness limit. Put an oracle update in the same transaction as the deposit or withdrawal.
- [ ] P3: Don't leave Hadron proposals pending in your multisig (or durable-nonce transactions signed ahead of time) across the upgrade window — including pool creation and curve updates. Execute or cancel them first. Spread-trigger edits can't be prepared ahead: execute them before the upgrade, or create them after it.
What's changing
- New pools start with swaps off (
RejectSwaps). With the new SDK nothing changes: it sets the starting state you ask for. If you create pools with your own code, see the SDK migration page.
- Transfer-fee tokens are priced correctly. When someone sells a token that has a transfer fee, the price is now based on what the pool actually receives, instead of the maker absorbing the fee.
- Rounding is tightened against the trader. The protocol fee rounds up and curve rounding moves toward the pool, on every swap. Quotes can be slightly lower, by a few atoms at most; on very small trades or pairs with a very large price ratio this can be a noticeable share of the trade, and dust-sized trades may be rejected.
- Drawdown guard: a swap that would push your pool past its drawdown threshold now fills part of the trade — the largest output that keeps the pool within the threshold, if it meets the trader's minimum output (the trader still pays the full input). The pool then pauses, as before. For instance, with a 5% threshold, a sell that would take the pool to 7% fills only up to 5%, and the pool then pauses. Traders should always set a real minimum output.
- Curve updates carry a sequence number, which the SDK fills in.
- Oracle staleness updates are 2 bytes.
UpdateDeltaStaleness now takes a 2-byte value (u16, little-endian); a 1-byte instruction fails. The SDK (≥ 0.4.1) already sends 2 bytes; check any code that builds it by hand, including pool-creation transactions.
- Spread configs: creating one requires Hadron to allowlist your pool-authority wallet. Existing ones keep working as they are; to edit them after the upgrade, use the new SDK.
- Price cap and surcharges: on pools where your price cap (
combined_factor_max_q32) is reached, spread-trigger surcharges are applied before the cap, so where the cap is reached they add less, or nothing.