Smart Contracts
Deployed addresses: the canonical, per-chain address list for the EVM contracts lives in the
deployments/directory of github.com/Dobprotocol/Dobhooks. For Stellar contracts, see release artifacts in github.com/Dobprotocol/stellar-distribution-contracts.
DobProtocol deploys smart contracts across two blockchain ecosystems:
- Stellar Soroban — distribution pools, crowdfunding, exit liquidity, and the DOB Validator mirror.
- EVM (Solidity) — the DobValidator on-chain attestation, the DobDex hook suite (Uniswap V4), and the older distribution-contracts (PoolMaster / TokenSaleMarket).
Stellar Soroban contracts
Repository: github.com/Dobprotocol/stellar-distribution-contracts
| Contract | Path | Purpose |
|---|---|---|
| Splitter (V1) | contracts/splitter/ | Push-based distribution (legacy). |
| Splitter V2 | contracts/splitter_v2/ | Lazy pull-based distribution with SAC participation tokens, time-gating, schedules, marketplace, and commission. |
| Crowdfunding V1 | contracts/crowdfunding_v1/ | Graduated crowdfunding campaign that, on success, hands off to a Splitter V2 distribution pool. |
| Validator (Projects) | contracts/validator/ | Soroban mirror of the DOB Validator: whitelist, add_project, set_project_approved, get_trufa_score. |
| Exit-Liquidity | contracts/exit-liquidity/ | Stellar exit-liquidity vault for shareholders who want to redeem ahead of distribution. |
Build & verification:
- Language: Rust (compiled to WASM).
- Verified builds: SEP-55 reproducible builds via GitHub Actions release artifact attestations.
- Networks: Stellar Mainnet (passphrase
Public Global Stellar Network ; September 2015) and Stellar Testnet (passphraseTest SDF Network ; September 2015).
EVM contracts
DobValidator (on-chain attestation)
Repository: github.com/Dobprotocol — DOBVALIDATOR/distribution-contracts/contracts/DOBValidator.sol
| Contract | Purpose |
|---|---|
DOBValidator.sol | Stores TRUFA scores for project hashes. Two roles via OpenZeppelin AccessControl: DEFAULT_ADMIN_ROLE and VALIDATOR_ROLE. |
DobDex (Uniswap V4 hook suite)
Repository: github.com/Dobprotocol/Dobhooks — Dobhooks/contracts/src/
| Contract | Purpose |
|---|---|
DobPegHook.sol | Uniswap V4 Custom-Accounting hook — buys at oracle peg, sells via LP-priced fills, RWA resale market, USDC LP pool. |
DobValidatorRegistry.sol | On-chain price + liquidation oracle (Owned, setPrice, setLiquidationParams). |
DobLPRegistry.sol | LP positions and per-asset backings (register, backAsset, queryAndFill, queryAndFillAtMarket, reserve holds). |
DobPooledLN.sol | Shared, pooled USDC vault that registers as a single LP in the registry — anyone deposits, operator decides backings. |
DobRwaVault.sol | Wraps approved RWA tokens into the dobRWA ERC-20. |
DobDirectSwap.sol | Standalone dUSDC↔USDC peg for chains without V4. |
DobSwapRouter.sol | User-facing wrapper around IPoolManager for V4 pools. |
DobTokenFactory.sol | Factory used in tests / demos. |
OracleAlertReceiver.sol | Receives cross-chain price/liquidation alerts on the destination chain. |
ReactiveOracleSync.sol | Reactive Network ReactVM contract that mirrors PriceUpdated/LiquidationEnabled events and fires callbacks. |
RWAFaucet.sol (MockRWA, MockUSDC) | Faucet ERC-20s for the testnet demo (1-hour cooldown per address). |
Legacy distribution-contracts (EVM)
Repository: distribution-contracts/contracts/contract/dob/ (path on disk: /home/kai/Escritorio/PROGRAMACION/DOBPROTOCOL/distribution-contracts/)
| Contract | Purpose |
|---|---|
PoolMaster.sol | EVM distribution-pool factory used by the older Token Studio EVM flow. |
PoolMasterConfig.sol | Configuration / parameters for PoolMaster deployments. |
TokenSaleMarket.sol | EVM share-marketplace contract used by the legacy Token Studio EVM flow. |
Network deployment status
Active deployment networks (per the Dobhooks deploy scripts and the Validator Hardhat tasks). For exact addresses, see the per-repo deployments/ folder.
| Network | Chain ID | DobValidator | DobDex | Notes |
|---|---|---|---|---|
| Ethereum Sepolia | 11155111 | Yes | — | Validator only. |
| Polygon Amoy | 80002 | Yes | — | Validator only. |
| Base Sepolia | 84532 | Yes | Yes (V4) | Full DobDex hook suite. |
| Base Mainnet | 8453 | Yes | — | Validator only (DEX is testnet). |
| Arbitrum Sepolia | 421614 | — | Yes (V4) | Full DobDex hook suite. |
| Arbitrum One | 42161 | — | — | Planned. |
| Unichain Sepolia | 1301 | — | Yes (V4) | Origin chain for ReactiveOracleSync. |
| Reactive Network (Lasna Testnet) | 5318007 | — | Reactive | ReactiveOracleSync only. |
| Robinhood Chain Testnet | 46630 | — | Yes (DirectSwap) | No Uniswap V4 — uses DobDirectSwap. |
SEP-55 verified builds (Stellar)
Stellar contracts use SEP-55 for reproducible builds: a GitHub Actions workflow builds the WASM from source in a deterministic environment, attaches it to a release, and signs the artifact via GitHub's attestation service.
# Verify the published WASM matches the source release
gh attestation verify soro_splitter_v2.wasm \
--repo Dobprotocol/stellar-distribution-contracts
| Tag pattern | Contract built |
|---|---|
v1.* | Splitter V1 (soro_splitter.wasm) |
v2.* | Splitter V2 (soro_splitter_v2.wasm) |
Architecture principles
Stellar contracts
- Pull-based distribution (V2):
create_distributionis O(1); each shareholder claims O(1). - SAC participation tokens: shares are Stellar Asset Contract tokens, native to the Stellar DEX.
- Pool types:
Reward,Payroll,Treasury,Crowdfunding(splitter_v2/storage.rs::PoolType).
EVM contracts
- Owner-only or AccessControl depending on contract —
DobValidatoris RBAC, the Dobhooks contracts use Solmate'sOwned. - Custom Accounting in the hook (
BeforeSwapDelta) replaces AMM math entirely. - Two-step LP model: register an LP position, then back specific assets per-asset.
- Cross-chain oracle: prices written on Unichain Sepolia are mirrored to other chains via Reactive Network.
Test coverage
| Suite | Framework | Notes |
|---|---|---|
| Splitter V2 | cargo test | 65 tests (per cargo test -p soro-splitter-v2). |
| Splitter V1 | cargo test | Full coverage retained for legacy. |
| Dobhooks (hooks + registries + pooled LN) | Foundry | Full suite under Dobhooks/contracts/test/. |
| DOBValidator | Hardhat / Vitest | Covered. |
Further reading
- Splitter V2 Contract — Lazy pull-based distribution for Stellar.
- EVM Validator Contract — On-chain TRUFA attestation.
- DEX Hook Contracts — Uniswap V4 Custom-Accounting hook architecture.