Class OnchainSendGates
- Namespace
- NArk.ArkadeIntents.Onchain
- Assembly
- NArk.ArkadeIntents.dll
The checks run immediately before an onchain send is funded — never at quote time.
public static class OnchainSendGates
- Inheritance
-
OnchainSendGates
- Inherited Members
Remarks
This corridor's danger is not in either contract but in the relationship between them. Two deadlines on two chains govern one swap, and getting their order wrong is the single failure that can cost both legs at once, which is why it is checked here rather than left to the solver.
Fields
ClaimMarginSeconds
Time that must remain to claim on L1 after the funding has confirmed.
public const long ClaimMarginSeconds = 5400
Field Value
MaxMinConfirmations
The most confirmations this corridor will wait for before claiming.
public const int MaxMinConfirmations = 6
Field Value
Remarks
A ceiling, not a preference: a solver naming a large number turns the claim window into a wait the locktime may not outlast, and the quote is refusable now rather than stuck later.
MinHeadroomSeconds
Minimum time before the Arkade refund opens, mirroring the Lightning send leg.
public const long MinHeadroomSeconds = 5400
Field Value
OrderMarginSeconds
How far the Arkade refund must open after the L1 one.
public const long OrderMarginSeconds = 7200
Field Value
Remarks
Reorg margin. The solver takes the Arkade side using the preimage the client's L1 claim revealed, so the client's own Arkade refund must be the last door to open — otherwise there is a window in which the client can reclaim on Arkade while the solver can still reclaim on L1, and one leg pays for both.
SecondsPerBlock
Nominal seconds per block, for turning a confirmation count into a wait.
public const long SecondsPerBlock = 600
Field Value
Methods
AssertFundable(RfqQuote<OnchainSendQuoteProfile>, long)
Refuse a quote this corridor cannot safely fund.
public static void AssertFundable(RfqQuote<OnchainSendQuoteProfile> quote, long now)
Parameters
quoteRfqQuote<OnchainSendQuoteProfile>The solver's quote.
nowlongThe current time, unix seconds.
Exceptions
- OnchainSendNotFundableException
Any check refused.
ClaimWindowIsOpen(long, long)
Whether there is still time to claim the L1 HTLC before its refund leaf opens.
public static bool ClaimWindowIsOpen(long htlcLocktime, long now)
Parameters
Returns
- bool
truewhile claiming is still safe.
Remarks
Claiming near the locktime is a race that can be lost after showing our hand: a broadcast that does not confirm before the counterparty's refund does leaves it with its sats back and our preimage out of the mempool, which takes the Arkade side too. Both legs, for the sake of a few minutes. Declining costs only the covenant refund, which is still ours.