Skip to content

SIP Specification

Core protocol specification for the Shielded Intents Protocol.

SIP provides privacy for cross-chain intents through:

  1. Pedersen Commitments - Hide transaction amounts
  2. Stealth Addresses - Unlinkable recipient addresses
  3. Viewing Keys - Selective disclosure for compliance
  4. ZK Proofs - Verify without revealing secrets
interface ShieldedIntent {
// Identification
intentId: string
version: string
privacyLevel: 'transparent' | 'shielded' | 'compliant'
// Timing
createdAt: number
expiry: number
// Output (public - needed for quoting)
outputAsset: Asset
minOutputAmount: bigint
maxSlippage: number
// Hidden fields (commitments)
inputCommitment: Commitment
senderCommitment: Commitment
// Stealth addressing
recipientStealth: StealthAddress
ephemeralPublicKey: HexString
// Proofs
fundingProof: ZKProof
validityProof: ZKProof
// Compliance (optional)
viewingKeyHash?: Hash
encryptedMetadata?: Encrypted
}
interface Commitment {
value: HexString // 33-byte compressed point
blindingFactor: HexString // 32-byte scalar
}
interface StealthAddress {
address: HexString // 33-byte compressed public key
ephemeralPublicKey: HexString
viewTag: number // 0-255
}
ParameterValue
Curvesecp256k1
Generator GStandard
Order n0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141
PurposeFunction
Shared secretSHA-256
Key derivationHKDF-SHA256
View tagSHA-256[0]
ComponentAlgorithm
SymmetricXChaCha20-Poly1305
Key derivationHKDF
Nonce size24 bytes

Independent generator H where log_G(H) is unknown:

GenerateH():
domain ← "SIP-PEDERSEN-GENERATOR-H-v1"
for counter = 0 to 255:
candidate ← SHA256(domain || counter)
if IsValidCurvePoint(candidate):
H ← LiftX(candidate)
if H ≠ G and H ≠ O:
return H
Commit(v, r):
Input: value v ∈ [0, n), optional blinding r
Output: commitment C, blinding r
1. If r not provided: r ← RandomBytes(32) mod n
2. If r = 0: r ← 1
3. C ← v·G + r·H
4. Return (C, r)
VerifyOpening(C, v, r):
1. r' ← r mod n
2. If r' = 0: r' ← 1
3. C' ← v·G + r'·H
4. Return C = C'
GenerateMetaAddress(chain):
1. p ← RandomBytes(32) // Spending private
2. q ← RandomBytes(32) // Viewing private
3. P ← p·G
4. Q ← q·G
5. Return {
metaAddress: (P, Q, chain),
spendingKey: p,
viewingKey: q
}
DeriveStealthAddress(P, Q):
1. r ← RandomBytes(32)
2. R ← r·G
3. S ← ECDH(r, P)
4. s ← SHA256(S)
5. A ← Q + s·G
6. viewTag ← s[0]
7. Return {
address: A,
ephemeralKey: R,
viewTag: viewTag
}
RecoverStealthKey(A, R, p, q):
1. S' ← ECDH(p, R)
2. s' ← SHA256(S')
3. a ← q + s' mod n
4. Assert a·G = A
5. Return a
sip:<chain>:<spendingKey>:<viewingKey>
Example:
sip:ethereum:0x02abc...def:0x03123...456
Where:
- chain ∈ {ethereum, solana, near, zcash, polygon, ...}
- spendingKey: 33-byte compressed public key (hex)
- viewingKey: 33-byte compressed public key (hex)

Proves: User has balance ≥ committed amount

Public inputs:
- commitment_hash
- minimum_amount
Private inputs:
- actual_balance
- blinding_factor
Constraints:
- actual_balance >= minimum_amount
- commitment = Pedersen(actual_balance, blinding_factor)

Proves: Intent is authorized by sender

Public inputs:
- intent_hash
- sender_commitment
Private inputs:
- sender_address
- signature
- blinding_factor
Constraints:
- signature valid for intent_hash
- sender_commitment = Pedersen(hash(sender_address), blinding)

Proves: Solver correctly executed the swap

Public inputs:
- intent_id
- output_commitment
- recipient_stealth
Private inputs:
- output_amount
- output_blinding
- execution_proof
Constraints:
- output_amount >= min_output_amount
- output_commitment = Pedersen(output_amount, output_blinding)
- funds sent to recipient_stealth
ParameterValueJustification
Curvesecp256k1128-bit security
HashSHA-256128-bit collision resistance
Key size256 bitsStandard security level
View tag8 bits256x scanning speedup
Nonce192 bitsXChaCha20 standard
CodeDescription
SIP_2000Validation failed
SIP_2002Invalid chain
SIP_2003Invalid privacy level
SIP_2004Invalid amount
SIP_3000Crypto operation failed
SIP_4000Proof generation failed
SIP_5000Network error
VersionDateChanges
1.0.0Nov 2025Initial specification