Skip to documentation
Resources/Docs
MarketsSinjoh v2

Trading & execution

The four trade types, actual-fill quotes, routing, approvals, limits and refunds.

3 min read·
On this page

Four trade types

TypeYou specifyExecution promise
Buy · exact inputMaximum backing/payment amountReturn the tokens bought by actual execution, and refund unused input on a partial fill.
Buy · exact outputFinal token outputDeliver that token amount within maximum input, or revert.
Sell · exact inputToken inputPay the actual backing output after applicable taxes; unused input is returned when partially filled.
Sell · exact outputFinal backing output after taxDeliver that backing amount within maximum token input, or revert.

A price display is a marginal valuation. A trade quote includes the requested size, pool price impact, every applicable tax and any executable depth/floor behavior. Multiplying a displayed token price by quantity does not reproduce a fill.

From quote to confirmed execution

  1. 01Choose market & amount
  2. 02Get a fresh quote
  3. 03Review bounded approvals
  4. 04Sign atomic swap
  5. 05Check receipt & actual output

SinjohQuoter runs the swap path inside an eth_call and returns the actual-fill result. It has no need to hold your funds or receive an allowance. Quotes are exact for the state simulated, not a guarantee that the same state persists until mining. The launch surcharge can also change with time during seconds 0–4.

Set minimum output, maximum input and a deadline. An exact-output trade must enforce final received output, not merely a raw intermediate pool delta. A reverted atomic trade does not leave a completed half-conversion, although transaction gas is still a cost.

Hosted provider routing versus the direct SDK

Execution pathApproval / routing behavior
Hosted appUniswap API is primary and 0x is fallback when no executable primary quote is available. The quote binds chain, market, wallet, amount, slippage, provider fees and atomic transaction.
Uniswap provider flowUse the direct-approval spender supplied by that flow; the server returns a bounded quote and transaction together.
0x provider flowApprove its returned AllowanceHolder spender. Never substitute an allowance to Settler.
Direct SDK / Universal RouterUse the token-to-Permit2 allowance and Permit2-to-router allowance returned by approvals.

Do not combine one provider’s approval with another provider’s transaction. Provider support for chain 4663 alone does not prove support for every Sinjoh hook or trade type. An unavailable quote remains unavailable in the app.

ETH and other payment assets

The market itself trades token against backing. A payment in another asset first converts into backing in the same atomic transaction. The direct ETH builder wraps ETH to canonical WETH, executes the required path and market swap, and unwraps unused WETH for the refund. Hosted provider routes can use other liquid payment assets when they return a compatible executable transaction.

Automated routes and rewards use Settings-approved paths. Their availability is independent of whether a user-trade provider can assemble a route. Every intermediate conversion must consume its required input; a positive first-hop output does not prove that the entire route fills.

When a trade does not execute

  • A changed price or tax makes the transaction exceed its min/max limits.
  • The deadline has passed, an allowance is missing, the connected account changed, or the wallet is on another chain.
  • A conversion pool cannot fill the required amount, even though a smaller quote succeeds.
  • The selected hook, token transfer behavior or router cannot satisfy the required path.
  • A paused/restricted operation or unavailable provider prevents a quote or execution.