Working with NEAR Intents
NEAR Intents provide a declarative way to coordinate cross-chain operations, enabling seamless deposits from any chain into Zcash shielded pools.
What are NEAR Intents?
NEAR Intents are declarative statements that describe desired outcomes rather than specific actions. This allows for flexible and composable cross-chain operations.
Key Concepts
- Declarative: You describe what you want, not how to do it
- Composable: Intents can be combined and chained
- Cross-Chain: Native support for multi-chain operations
- Settled in TEE: Executed in Phala Trusted Execution Environment for security
How NEAR Intents Work in Zaunchpad
Deposit Flow
When you want to participate in a token launch:
- User Intent: “Deposit ETH/USDC/NEAR and swap to Zcash”
- Intent Created: NEAR Intent system receives your intent
- OneClick Swap: Automatic swap to Zcash (nep141:zec.omft.near)
- Shielded Pool Settlement: ZEC deposited into Zcash shielded pool
- Intent Settled: All operations complete in TEE
How NEAR Intents Go into Shielded Pools
The complete flow from deposit to shielded pool:

Step-by-Step Process
-
Deposit Initiation
- User deposits any supported token (ETH, USDC, NEAR, etc.)
- Intent created: “Swap [amount] of [token] to ZEC”
-
Automatic Swap
- NEAR Intents coordinates with OneClick Swap
- Swap executed automatically
- Destination: ZEC on NEAR (nep141:zec.omft.near)
-
Shielded Pool Entry
- ZEC enters Zcash Unified Shielded Pool
- Transaction becomes private
- No link between source and destination
-
TEE Verification
- Phala TEE verifies swap success
- Checks swap status via OneClick API
- Verifies recipient matches launch creator
- Confirms destination is ZEC
-
Proof Generation
- TEE generates ZK-SNARK proof
- Proof acts as claim ticket
- Unique reference assigned
Supported by NEAR Intents
Zaunchpad’s integration with NEAR Intents means:
- Verified Execution: Intents are settled in Phala Trusted Execution Environment
- Security Guarantees: TEE provides additional security for cross-chain operations
- Composability: Multiple intents can work together seamlessly
- Reliability: Intent system handles failures and retries automatically
- Privacy: All deposits settle in Zcash shielded pools
Supported Payment Tokens
You can deposit using:
- ETH: Ethereum
- USDC: USD Coin (multiple chains)
- NEAR: NEAR Protocol token
- Other tokens: As supported by OneClick Swap
All deposits are automatically swapped to ZEC and settled in shielded pools.
TEE Verification Process
What Gets Verified
The Phala TEE verifies:
- Swap Status: Swap completed successfully (SUCCESS status)
- Recipient Match: Swap recipient matches launch creator address
- Asset Verification: Destination asset is ZEC (nep141:zec.omft.near)
- Amount Verification: Correct amount swapped
Verification Endpoint
The TEE uses the OneClick API to verify swap status before generating proofs.
Privacy Benefits
Shielded Pool Settlement
When your deposit goes through NEAR Intents:
- Source Privacy: Your original token source is hidden
- Destination Privacy: ZEC deposit in shielded pool is private
- No Link: No on-chain link between deposit and claim
- Anonymity Set: You blend into the pool of participants
How Privacy is Maintained
- Deposit: Any token → NEAR Intents → ZEC
- Shielded Entry: ZEC enters shielded pool privately
- Mixing: Your transaction mixes with others
- Anonymity: Your identity hidden in anonymity set
- Claim: ZK proof allows claim without revealing source
Using NEAR Intents in Zaunchpad
For Participants
- Select Payment Token: Choose ETH, USDC, NEAR, or other supported token
- Check Price: Review the price and details before proceeding
- Confirm Intent: NEAR Intents handles the rest automatically
- Wait for Swap: System swaps to ZEC automatically
- Shielded Settlement: ZEC enters shielded pool
- Proof Generation: TEE generates your claim proof
For Token Creators
When creating a launch:
- Payment Options: Launch accepts deposits in multiple tokens
- Automatic Conversion: All deposits convert to ZEC
- Shielded Settlement: All capital settles in shielded pools
- Privacy Guaranteed: Participants remain anonymous
Monitoring Intent Status
During Deposit
- Intent Created: Intent submitted to NEAR Intent system
- Swap Processing: OneClick swap in progress
- Shielded Entry: ZEC entering shielded pool
- TEE Verification: Proof generation in progress
- Complete: Proof ready for download
Status Indicators
- Pending: Intent created, waiting for execution
- Processing: Swap and settlement in progress
- Verifying: TEE verification in progress
- Completed: Proof generated and ready
- Failed: Intent execution failed (can be retried)
Troubleshooting
Swap Fails
- Check if token is supported by OneClick
- Verify sufficient liquidity for swap
- Ensure sufficient funds for gas fees
- Try with different token or amount
Intent Stuck
- Check network connectivity
- Verify NEAR Intents system status
- Review intent parameters
- Contact support if persists
Proof Not Generated
- Verify swap completed successfully
- Check TEE endpoint status
- Ensure recipient matches creator
- Verify destination is ZEC
Best Practices
For Participants
- Use Supported Tokens: Stick to well-supported tokens (ETH, USDC, NEAR)
- Check Liquidity: Ensure sufficient liquidity for swap
- Monitor Status: Watch intent status during deposit
- Save Proofs: Download and save proof ZIP files
- Understand Privacy: Know that deposits settle in shielded pools
For Token Creators
- Accept Multiple Tokens: Enable deposits from various chains
- Monitor Deposits: Track deposits through dashboard
- Verify Settlements: Confirm deposits in shielded pools
- Privacy First: Respect participant privacy
Technical Details
Phala Trusted Execution Environment
NEAR Intents are settled in Phala’s TEE, which provides:
- Confidentiality: Intent details remain private
- Integrity: Intent execution cannot be tampered with
- Attestation: Cryptographic proof of correct execution
- Swap Verification: Verifies OneClick swaps before proof generation
Intent Lifecycle
- Creation: Intent created with deposit parameters
- Submission: Intent submitted to NEAR Intent system
- Swap Execution: OneClick swap to ZEC
- Shielded Entry: ZEC enters shielded pool
- TEE Execution: Intent executed in Phala TEE
- Verification: Swap verified via OneClick API
- Proof Generation: ZK-SNARK proof created
- Settlement: Results recorded, proof ready