Skip to main content

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

ContractPathPurpose
Splitter (V1)contracts/splitter/Push-based distribution (legacy).
Splitter V2contracts/splitter_v2/Lazy pull-based distribution with SAC participation tokens, time-gating, schedules, marketplace, and commission.
Crowdfunding V1contracts/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-Liquiditycontracts/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 (passphrase Test SDF Network ; September 2015).

EVM contracts

DobValidator (on-chain attestation)

Repository: github.com/DobprotocolDOBVALIDATOR/distribution-contracts/contracts/DOBValidator.sol

ContractPurpose
DOBValidator.solStores 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/DobhooksDobhooks/contracts/src/

ContractPurpose
DobPegHook.solUniswap V4 Custom-Accounting hook — buys at oracle peg, sells via LP-priced fills, RWA resale market, USDC LP pool.
DobValidatorRegistry.solOn-chain price + liquidation oracle (Owned, setPrice, setLiquidationParams).
DobLPRegistry.solLP positions and per-asset backings (register, backAsset, queryAndFill, queryAndFillAtMarket, reserve holds).
DobPooledLN.solShared, pooled USDC vault that registers as a single LP in the registry — anyone deposits, operator decides backings.
DobRwaVault.solWraps approved RWA tokens into the dobRWA ERC-20.
DobDirectSwap.solStandalone dUSDC↔USDC peg for chains without V4.
DobSwapRouter.solUser-facing wrapper around IPoolManager for V4 pools.
DobTokenFactory.solFactory used in tests / demos.
OracleAlertReceiver.solReceives cross-chain price/liquidation alerts on the destination chain.
ReactiveOracleSync.solReactive 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/)

ContractPurpose
PoolMaster.solEVM distribution-pool factory used by the older Token Studio EVM flow.
PoolMasterConfig.solConfiguration / parameters for PoolMaster deployments.
TokenSaleMarket.solEVM 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.

NetworkChain IDDobValidatorDobDexNotes
Ethereum Sepolia11155111YesValidator only.
Polygon Amoy80002YesValidator only.
Base Sepolia84532YesYes (V4)Full DobDex hook suite.
Base Mainnet8453YesValidator only (DEX is testnet).
Arbitrum Sepolia421614Yes (V4)Full DobDex hook suite.
Arbitrum One42161Planned.
Unichain Sepolia1301Yes (V4)Origin chain for ReactiveOracleSync.
Reactive Network (Lasna Testnet)5318007ReactiveReactiveOracleSync only.
Robinhood Chain Testnet46630Yes (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 patternContract built
v1.*Splitter V1 (soro_splitter.wasm)
v2.*Splitter V2 (soro_splitter_v2.wasm)

Architecture principles

Stellar contracts

  • Pull-based distribution (V2): create_distribution is 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 — DobValidator is RBAC, the Dobhooks contracts use Solmate's Owned.
  • 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

SuiteFrameworkNotes
Splitter V2cargo test65 tests (per cargo test -p soro-splitter-v2).
Splitter V1cargo testFull coverage retained for legacy.
Dobhooks (hooks + registries + pooled LN)FoundryFull suite under Dobhooks/contracts/test/.
DOBValidatorHardhat / VitestCovered.

Further reading