Introduction
SynapticChain is a next-generation Layer-1 blockchain built for Web4 — the evolution beyond Web3. With 6 shards, 18 neurons, and sub-500ms finality, SynapticChain delivers the speed, security, and scalability that decentralized applications demand.
What is Web4?
Web4 represents the convergence of blockchain, AI, and embedded identity. Unlike Web3's seed-phrase wallets and gas-guzzling transactions, Web4 features:
- Embedded device keys — No seed phrases, no browser extensions required
- Sub-500ms finality — Near-instant transaction confirmation
- ISO 20022 compliance — Native financial messaging (SWIFT-compatible)
- S=0 parallel execution — Compiler-driven scheduling, lock-free hot paths
Network Overview
| Parameter | Value |
|---|---|
| Consensus | SCBFT (Synaptic Consensus BFT) |
| Finality | < 500ms |
| Shards | 6 (3 Alpha US + 3 Bravo UK) |
| Neurons | 18 (9 per server) |
| Language | SynapticLang v2 |
| Token | SYN (testnet) |
| RPC | https://rpc.synapticchain.xyz |
| Chain ID | synaptic-alpha-1 |
Architecture
SynapticChain uses a unique S=0 architecture where the compiler drives parallel scheduling, eliminating lock contention on hot paths.
Server Topology
| Server | Location | Nodes | Shards | IP |
|---|---|---|---|---|
| Alpha | US | 9 | 3 | 79.143.177.212 |
| Bravo | UK | 9 | 3 | 147.93.1.73 |
| Charlie | Explorer | — | — | 203.161.56.222 |
| uhuru | Dev/API | — | — | Prometheus :3000/:9100 |
SCBFT Consensus
Synaptic Consensus BFT combines BLS threshold signatures with a fast commit pipeline:
- Transactions enter mempool, sorted by gas price + arrival time
- Leader proposes a block every 2 seconds
- Validators sign with BLS partial signatures
- Threshold aggregation produces a single BLS group signature
- Block is final after 2/3+1 signatures collected (<500ms)
Cross-Shard Atomicity
Atomic commits across all 6 shards use a two-phase protocol with proof-of-locking. If any shard fails to lock, the entire transaction is rolled back.
S=0 Parallel Execution
The compiler analyzes data dependencies and schedules non-conflicting transactions to run in parallel on separate CPU cores. Hot paths use lock-free data structures (DashMap, AtomicU64, mpsc channels).
Quick Start
1. Connect Your Wallet
const wallet = window.SynapticWallet;
await wallet.connect();
const address = wallet.getAddress();
console.log("Connected:", address); // syn1abc...
2. Get Test Tokens
Visit the Academy and use the faucet, or the wallet will auto-grant 1000 SYN in demo mode.
3. Query a Contract
const res = await fetch('https://rpc.synapticchain.xyz', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
jsonrpc: '2.0',
id: 1,
method: 'syn_callViewFunction',
params: {
contract: 'syn195fk50708yz0hjujhcuxnmxq0r9xk5x9ndc44z',
function: 'get_pool_count',
args: []
}
})
});
const data = await res.json();
console.log("Pools:", data.result);
4. Send a Transaction
const tx = {
contract: 'syn195fk50708yz0hjujhcuxnmxq0r9xk5x9ndc44z',
function: 'swap_exact_in',
args: ['SYN_tUSDT', 1000000, 'SYN', 0],
gasLimit: 6000,
value: 0
};
const txHash = await wallet.signAndSend(tx);
console.log("Tx sent:", txHash);
API Reference
JSON-RPC Endpoints
| Endpoint | Method | Description |
|---|---|---|
/rpc | POST | General JSON-RPC proxy to validators |
/rest/blocks | GET | Latest blocks (cached 2s) |
/rest/validators | GET | Active validator set (cached 5s) |
/rest/shards | GET | Shard distribution across Alpha/Bravo |
/rest/network/stats | GET | TPS, latency, block height |
/rest/metrics | GET | Prometheus aggregated metrics |
/health | GET | Gateway health + all 18 node statuses |
View Functions (No Gas)
// syn_callViewFunction — read contract state
{
"jsonrpc": "2.0",
"id": 1,
"method": "syn_callViewFunction",
"params": {
"contract": "syn195fk...",
"function": "get_pool_reserve0",
"args": ["syn1token0...", "syn1token1..."]
}
}
// syn_getBalance — check SYN balance
{
"jsonrpc": "2.0",
"id": 1,
"method": "syn_getBalance",
"params": { "address": "syn1user..." }
}
// syn_getTransactionReceipt — verify a tx
{
"jsonrpc": "2.0",
"id": 1,
"method": "syn_getTransactionReceipt",
"params": { "hash": "0xabc123..." }
}
Transaction Submission
// syn_sendTransaction — state-changing call (requires signing)
{
"jsonrpc": "2.0",
"id": 1,
"method": "syn_sendTransaction",
"params": {
"contract": "syn195fk...",
"function": "swap_exact_in",
"args": ["SYN_tUSDT", 1000000, "SYN", 0],
"gasLimit": 6000,
"value": 0,
"sender": "syn1user...",
"signature": "base64_bls_signature"
}
}
WebSocket Subscriptions
// Connect to wss://api.synapticchain.xyz/ws
// Subscribe to new blocks
{ "jsonrpc": "2.0", "id": 1, "method": "syn_subscribe", "params": ["newBlocks"] }
// Subscribe to contract events
{ "jsonrpc": "2.0", "id": 2, "method": "syn_subscribe", "params": ["events", "syn195fk..."] }
Smart Contracts
Five core dApp contracts are deployed on the Alpha testnet and verified.
Contract Addresses
| Contract | Address | Functions | Status |
|---|---|---|---|
| AMM DEX v4 | syn195fk50708yz0hjujhcuxnmxq0r9xk5x9ndc44z | 24 | Live |
| Lending Protocol v2 | syn1rchr8tmjs0rxk8dedeywau2www7xylu84esls0 | 36 | Live |
| Perpetuals v1 | syn15n3msctncgmtmp2w7jlr7nf0ql5qhpnpha59m8 | 38 | Live |
| Prediction Market v1 | syn1v9sm90jgm8c6j42ktjxgqja25vwafwzdmntv7h | 26 | Live |
| NFT Marketplace v1 | syn12x0vw0d6cn6wpumwaxd8gxw333edz9hnez3n6z | 39 | Live |
AMM DEX
Key Functions
create_pool(token_a, token_b, fee_tier)— Deploy new liquidity pooladd_liquidity(pool_id, amount_a, amount_b, min_a, min_b)— Provide liquidityremove_liquidity(pool_id, shares, min_a, min_b)— Withdraw liquidityswap_exact_in(pool_id, amount_in, token_in, min_out)— Swap tokensget_pool_reserve0(token_a, token_b)— View reserve (verified)
Events
PoolCreated, LiquidityAdded, LiquidityRemoved, Swap, Sync
Lending Protocol
Key Functions
deposit(token, amount)— Supply collateral, mint aTokenswithdraw(token, amount)— Withdraw (checks health factor)borrow(token, amount)— Borrow against collateralrepay(token, amount)— Repay debtliquidate(user, collateral_token, debt_token, debt_to_cover)— Liquidate
Events
Deposit, Withdraw, Borrow, Repay, Liquidation
Perpetuals
Key Functions
open_position(market_id, collateral, size, is_long)— Open leveraged positionclose_position(market_id, size_to_close)— Close positionadd_collateral(market_id, additional)— Add marginliquidate(trader, market_id)— Liquidate if margin ratio < 1%
Prediction Market
Key Functions
create_market(question, end_time, fee_bps, min_bet, max_bet)— Launch marketbuy_shares(market_id, outcome, amount)— Buy YES/NO sharessell_shares(market_id, outcome, shares)— Sell sharesresolve_market(market_id, vrf_proof)— Resolve with VRFclaim_payout(market_id)— Claim winnings
NFT Marketplace
Key Functions
create_collection(name, symbol, max_supply, base_uri, mint_price, royalty_bps, recipient)mint(collection_id, metadata_uri)— Mint NFTlist_for_sale(collection_id, token_id, price)— List NFTcancel_listing(collection_id, token_id)— Delistbuy(collection_id, token_id)— Purchase (handles royalties)batch_mint(collection_id, count, metadata_uris)— Mint up to 20 at once
SynapticLang v2
SynapticLang is a custom smart contract DSL with compile-time verification and native sharding support.
Language Features
| Feature | Syntax | Purpose |
|---|---|---|
| State variables | #[state] balance: Map<Address, u128> | Persistent on-chain storage |
| Gas limit | #[gas_limit(6000)] | Declare max gas per function |
| Constants | const FEE_BPS: u16 = 30; | Compile-time constants |
| Verify | verify amount > 0; | Runtime assertion (reverts on fail) |
| Static call | ::other_contract.function() | Read-only cross-contract call |
| Events | emit Swap { pool_id, amount_in, amount_out } | Log on-chain events |
Example: Simple Token
#[contract]
module MyToken {
#[state] balances: Map<Address, u128>;
#[state] total_supply: u128;
const DECIMALS: u8 = 6;
#[gas_limit(5000)]
fn transfer(to: Address, amount: u128) {
verify amount > 0;
let sender = msg.sender;
let sender_bal = balances.get(sender).unwrap_or(0);
verify sender_bal >= amount;
balances.insert(sender, sender_bal - amount);
let to_bal = balances.get(to).unwrap_or(0);
balances.insert(to, to_bal + amount);
emit Transfer { from: sender, to, amount };
}
}
Compilation
# Compile .syn to bytecode
synlang compile token.syn --output token.syn.bin
# Deploy via RPC
curl -X POST https://rpc.synapticchain.xyz \
-d '{"jsonrpc":"2.0","method":"syn_sendTransaction","params":{"type":"contract_deploy","bytecode":"BASE64...","gasLimit":50000}}'
Web4 Identity
SynapticChain's Web4 identity layer eliminates seed phrases through embedded device key cryptography.
How It Works
- Device generates an ed25519 keypair on first use
- Private key is encrypted with AES-GCM using a device-bound secret
- Public key is encoded as a bech32m address (prefix:
syn1) - No seed phrase, no password — biometric or PIN unlocks the key
Wallet SDK Methods
| Method | Returns | Description |
|---|---|---|
connect() | Promise<Address> | Prompt user to connect wallet |
disconnect() | void | Clear session |
getAddress() | Address | null | Current connected address |
getBalance(address) | Promise<u128> | Balance in micro-SYN |
signAndSend(tx) | Promise<Hash> | Sign and broadcast transaction |
isConnected() | boolean | Connection status |
Transaction Object
interface SynapticTx {
contract: string; // Contract address
function: string; // Function name
args: any[]; // Ordered arguments
gasLimit: number; // Max gas units
value?: number; // Micro-SYN to send
}
Demo Mode
If the wallet RPC is unreachable, the SDK falls back to demo mode with 1000 SYN automatically granted. This lets developers test dApp integration without a live validator connection.
Validator Setup
Requirements
| Resource | Minimum | Recommended |
|---|---|---|
| CPU | 4 cores | 8 cores |
| RAM | 16 GB | 32 GB |
| Storage | 200 GB SSD | 500 GB NVMe |
| Network | 100 Mbps | 1 Gbps |
| OS | Ubuntu 22.04 | Ubuntu 24.04 |
Installation
# 1. Download synapticchain-core
git clone https://github.com/syntechz/synapticchain-core.git
cd synapticchain-core
# 2. Build
make build-release
# 3. Generate validator keys
./synapticchain keygen --output /opt/synapticchain/keys
# 4. Configure
nano /opt/synapticchain/config/node.toml
# Set: shard_id = 0..5, server = alpha|bravo, bootnodes = [...]
# 5. Start
./synapticchain run --config /opt/synapticchain/config/node.toml
# 6. Stake (minimum 10,000 SYN)
./synapticchain stake --amount 10000000000000 --validator $(cat keys/address)
Monitoring
Each validator exposes Prometheus metrics on :3000/metrics and node-exporter metrics on :9100/metrics. The unified API gateway aggregates these for the testnet explorer dashboard.
Tutorials
Tutorial 1: Deploy Your First Contract
// 1. Write contract in SynapticLang
// 2. Compile: synlang compile mycontract.syn
// 3. Deploy via interactive script:
node scripts/deploy-all.js
// 4. Select contract, confirm gas, wait for receipt
// 5. Verify: curl -X POST /rpc -d '{"method":"syn_callViewFunction","params":{"contract":"NEW_ADDRESS","function":"get_owner"}}'
Tutorial 2: Mint an NFT
const NFT_CONTRACT = 'syn12x0vw0d6cn6wpumwaxd8gxw333edz9hnez3n6z';
// 1. Create collection
const tx1 = {
contract: NFT_CONTRACT,
function: 'create_collection',
args: ['My Art', 'ART', 1000, 'https://metadata.example.com/', 1000000, 250, wallet.getAddress()],
gasLimit: 15000
};
const collectionTx = await wallet.signAndSend(tx1);
// 2. Mint NFT
const tx2 = {
contract: NFT_CONTRACT,
function: 'mint',
args: [1, 'https://metadata.example.com/1.json'],
gasLimit: 8000
};
const mintTx = await wallet.signAndSend(tx2);
// 3. List for sale
const tx3 = {
contract: NFT_CONTRACT,
function: 'list_for_sale',
args: [1, 1, 5000000], // collection 1, token 1, 5 SYN
gasLimit: 6000
};
await wallet.signAndSend(tx3);
Tutorial 3: Use the DEX
const DEX = 'syn195fk50708yz0hjujhcuxnmxq0r9xk5x9ndc44z';
// 1. Check pool reserves
const reserves = await rpc.call('syn_callViewFunction', {
contract: DEX,
function: 'get_pool_reserve0',
args: ['SYN', 'tUSDT']
});
// 2. Estimate swap output
const estimate = await rpc.call('syn_estimateGas', {
contract: DEX,
function: 'swap_exact_in',
args: ['SYN_tUSDT', 1000000, 'SYN', 0],
sender: wallet.getAddress()
});
// 3. Execute swap
const tx = {
contract: DEX,
function: 'swap_exact_in',
args: ['SYN_tUSDT', 1000000, 'SYN', 900000],
gasLimit: Math.floor(estimate.gas * 1.2)
};
const hash = await wallet.signAndSend(tx);
Tutorial 4: Set Up a Payment Widget
// Include synaptic-wallet-sdk.js on your page
// Add the payment widget:
<div id="synaptic-pay" data-amount="1000000" data-recipient="syn1merchant...">
</div>
<script>
SynapticPay.init('#synaptic-pay', {
onSuccess: (tx) => console.log('Paid:', tx.hash),
onError: (err) => console.error('Failed:', err)
});
</script>
Chrome Extension
The SynapticChain Chrome extension (Manifest V3) injects window.SynapticWallet into every webpage for seamless dApp integration.
Features
- Background service worker for persistent key storage
- AES-GCM + PBKDF2 encrypted key storage
- Bech32m
syn1addresses - Origin-locked dApp permissions
- Auto-lock after 10 minutes inactivity
- Private key import/export for recovery
Installation
# 1. Download synaptic-extension.zip
# 2. Unzip to a folder
# 3. Chrome → Extensions → Developer Mode ON
# 4. Load Unpacked → Select the unzipped folder
# 5. Extension icon appears in toolbar
# Verify injection:
console.log(window.SynapticWallet); // Object with connect(), signAndSend(), etc.
Permissions
| Permission | Purpose |
|---|---|
storage | Encrypted key persistence |
activeTab | Inject inpage script into current page |
scripting | Content script injection (MV3) |
dApp Integration
// In your dApp, detect the wallet:
if (window.SynapticWallet) {
const wallet = window.SynapticWallet;
const address = await wallet.connect();
// User approved — proceed with contract calls
} else {
// Prompt user to install extension
showInstallPrompt('https://chrome.google.com/webstore/detail/...');
}
Glossary
| Term | Definition |
|---|---|
| Web4 | The next evolution of the web — embedded identity, AI integration, sub-500ms blockchain finality |
| Neuron | A single validator node. SynapticChain has 18 neurons (9 Alpha + 9 Bravo). |
| Shard | A parallel execution partition. 6 shards total — 3 per server, cross-shard atomic commits. |
| SCBFT | Synaptic Consensus BFT — our BLS threshold signature consensus with sub-500ms finality. |
| Synapse | A cross-shard communication channel. 3 synapses per server for intra-shard coordination. |
| SynapticLang | Custom smart contract DSL with compile-time verification and sharding primitives. |
| SYN | Native token of SynapticChain. Used for gas, staking, and governance. |
| Micro-SYN | Smallest unit of SYN. 1 SYN = 1,000,000 micro-SYN. |
| Health Factor | Lending protocol metric. HF < 1 = liquidation eligible. |
| VRF | Verifiable Random Function used for prediction market resolution. |
| BLS | Boneh-Lynn-Shacham signature scheme for threshold aggregation in SCBFT. |