Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.hadron.fi/llms.txt

Use this file to discover all available pages before exploring further.

Hadron allows you to segment flow i.e allow you to add or subtract spread to certain addresses to distinguish toxic flow from retail flow. Examples:
  • Reduce cyclic arbitrage: Reduce arbitrage from cyclic trading e.g. bots that buy from your pool and sell to a competing AMM pool. You can do this by adding a spread for trades involving competitive venue or to specific addresses.
  • Be more competitive with retail traders: Offer tighter spreads to txns with clear signs of retail traders like the phantom/solflare fee account or the jupiter ultra fee accounts.

updateSpreadConfig

Replace the pool’s spread trigger list in one call.
This is a full replacement of existing triggers, so pass the complete final triggers array you want on-chain.
pool.updateSpreadConfig(admin, {
  triggers: [
    {
      account: someProgramId,
      spreadBps: 25,
      matchMode: 1, // optional
    },
    {
      account: someAccount,
      spreadBps: 10, // matchMode defaults to 0
    },
  ],
});
ParamTypeDescription
adminPublicKeySpread config admin signer.
paramsUpdateSpreadConfigParamsUpdate payload.
params.triggersSpreadTriggerInput[]Full list of spread triggers to store (replaces previous list).
params.triggers[].accountPublicKeyAccount/program key to match against instruction context.
params.triggers[].spreadBpsnumberExtra spread in basis points to apply when matched
params.triggers[].matchMode?numberMatch behavior: 0 = Anywhere (default), 1 = AfterProgramId.