πŸ‘¨β€πŸ’»Developer Integration

This guide provides the contract addresses and interfaces needed to integrate with Stimpak Duels programmatically.

Contract Addresses

Arbitrum Mainnet (Chain ID: 42161)

Contract
Address

CompetitionHub

0xF439c778446A3875Bb1583fCeDaD4873533fB5EA

CompetitionAdmin

0x3804698cCA04cf09F325901Ae92783C41b29801c

Settings

0x25F8cD7bBC8102b7Ac29B7d9f29fDf8F3D4bD334

Reader

0x36553D6b996690737c8a239D26e6204284863692

USDC

0xaf88d065e77c8cC2239327C5EDb3A432268e5831

Arbitrum Sepolia Testnet (Chain ID: 421614)

Contract
Address

CompetitionHub

0xd973D63fcd543e634A24fFB6B4392A1C618A0ff0

CompetitionAdmin

0xEC3De72e28088C82E6c6aF95E6f7A48B47C351dC

Settings

0xA950098AC296BDedb66c188755F37A243Fde89c9

Reader

0x3a12bf16809DC8ab9e2B4dA2835f48840e3090d1

USDC

0x3253a335E7bFfB4790Aa4C25C4250d206E9b9773

Supported Markets

Arbitrum Mainnet

Market
Address
Max Leverage

BTC/USD

0x47c031236e19d024b42f8AE6780E44A573170703

100x

ETH/USD

0x70d95587d40A2caf56bd97485aB3Eec10Bee6336

100x

SOL/USD

0x09400D9DB990D5ed3f35D7be61DfAEB900Af03C9

100x

LINK/USD

0x7f1fa204bb700853D36994DA19F830b6Ad18455C

100x

Arbitrum Sepolia

Market
Address
Max Leverage

BTC/USD

0x3A83246bDDD60c4e71c91c10D9A66Fd64399bBCf

100x

ETH/USD

0xb6fC4C9eB02C35A134044526C62bb15014Ac0Bcc

50x


Core Interfaces

Creating a Duel

Duels are created through the CompetitionHub contract. There are two types:

1. Head-to-Head (H2H) Duel

2. Deathmatch (Multi-player)


Joining a Duel

Note: Before joining, users must approve the CompetitionHub to spend their USDC:


Trading in a Duel

Once joined, each participant gets a Trader contract deployed for them. Trading is done through this contract.

Open a Position

Close a Position

Cancel an Order

Note: Trading functions require ETH for GMX execution fees (typically 0.0001-0.001 ETH).


Reading Duel Data

Get Competition Data

Get Participant's Trader Contract


Competition Status Codes

Status
Value
Description

Awaiting Opponent

0

H2H waiting for opponent

Registration Open

1

Deathmatch accepting entries

Active

2

Trading is live

Ended

3

Trading complete, awaiting finalization

Finalized

4

Winner determined, prizes distributed

Cancelled

5

Duel cancelled, refunds available

Elapsed

6

Expired without sufficient participants

No Contest

7

Ended with no valid trades


Example Integration (ethers.js v6)


Signature Requirements

All duel creation and joining requires a backend signature for validation. Contact the Stimpak team for API access to obtain signatures programmatically.

Signature Format

The signature validates:

  • User address

  • Competition parameters

  • Nonce (to prevent replay attacks)

  • Expiration timestamp


Resources


Events to Listen For

Last updated