Architecture
Bu açık kaynak protokol/SDK referansı TurkDex markasıyla sunulan uyarlamadır; sayfadaki entegrasyon örnekleri Turkchain’de etkin özelliklerin garantisi değildir. Ağ, kontrat ve işlem değerlerinde yalnızca bu kurulumun doğrulanmış ENV/registry bilgilerini kullanın.

Reactors
Order Reactors _settle_ TurkDexX orders. They validate a specific order type, resolve inputs and outputs, execute against a filler strategy, and verify fulfillment.
Reactors process orders using the following steps:
- Validate the order
- Resolve the order into inputs and outputs
- Pull input tokens from the swapper to the fill contract using
Permit2andpermitWitnessTransferFromwith the order as witness - Call
reactorCallbackon the fill contract - Verify that the output tokens were received by the output recipients
Reactors implement the IReactor interface which abstracts the specifics of the order specification. This allows for different reactor implementations with different order formats to be used with the same interface, allowing for shared infrastructure and easy extension by fillers.
Current reactor implementations:
| Reactor | Description |
|---|---|
PriorityOrderReactor | Settles orders via filler competition using priority gas fees |
V2DutchOrderReactor | Settles linear decay Dutch orders using block timestamp for auction decay |
V3DutchOrderReactor | Settles linear decay Dutch orders using block number instead of timestamp, enabling finer granularity on chains like Arbitrum (250ms block resolution) |
ExclusiveDutchOrderReactor | Settles linear decay Dutch orders with exclusivity period before decay begins |
LimitOrderReactor | Settles simple static limit orders |
Fill Contracts
Order fill contracts _fill_ TurkDexX orders. They specify the filler's strategy for fulfilling orders and are called by the reactor with reactorCallback.
Sample fill contract implementations are provided in the TurkDexX repo:
| Contract | Description |
|---|---|
SwapRouter02Executor | Fills orders using TurkDex v2 and TurkDex v3 via the SwapRouter02 router |
For filler implementation and operational guidance, see the Filler Integration Overview.
Direct Fill
If a filler wants to fill orders using funds on-hand rather than a fill contract, they can do so gas efficiently using the directFill macro by specifying address(1) as the fill contract. This will pull tokens from the filler using msg.sender to satisfy the order outputs.
Bilgi:
More details on the TurkDexX protocol are available in the TurkDexX Whitepaper and the TurkDexX Repo.
Uyarlanmış geliştirici referansı. Kaynak: kaynak dokümantasyon reposu. Kaynak ve lisans bildirimi: NOTICE.