Skip to content

Repository files navigation

DupDub Stellar Contracts

Soroban smart contracts powering the DupDub crypto-to-fiat settlement platform on Stellar.

Overview

This repository contains the Soroban (Stellar smart contract platform) contracts that back DupDub's on-chain settlement flow — payment escrow, merchant registry, fee handling, and related infrastructure. It does not contain the backend API or frontend application; those live in their own repositories:

  • Backend (Settlement API)dupdap-backend
  • Frontend (Merchant & Customer Portal)dupdap-frontend

Contracts

All contracts live under dupdapp_contract/contracts/:

Contract Purpose
admin_timelock Timelocked admin actions
batch_payments Batched payment processing
fee_calculator Fee computation logic
fee_distributor Fee distribution to recipients
liquidity_router Liquidity routing for settlements
merchant_registry Merchant registration and metadata
multisig_admin Multi-signature admin control
payment_escrow Escrow for customer payments (approve → deposit → settle)
payment_request Payment request lifecycle
rbac_access Role-based access control
reconciliation Settlement reconciliation
settlement_ledger On-chain settlement record-keeping
slippage_protection Slippage guards for conversions
stellar_confirmations Confirmation tracking for Stellar transactions

Development

Prerequisites

  • Rust with the wasm32v1-none target
  • stellar-cli (for deployment)
  • wasm-opt (binaryen), for optimised release builds
rustup target add wasm32v1-none

Build & test

make build              # debug build of all contracts
make build-optimised    # release build + wasm-opt -Oz
make check-wasm-size    # enforce the 64 KB per-contract WASM limit
make test               # cargo test across the workspace

Or directly with cargo, from dupdapp_contract/:

cd dupdapp_contract
cargo build --target wasm32v1-none --release
cargo test

CI/CD

  • CI (.github/workflows/ci.yml) — runs cargo test, coverage (tarpaulin), and a WASM build on every push/PR.
  • Deploy (.github/workflows/deploy.yml) — builds and optimises WASMs, then deploys to Stellar testnet on merges to main and to mainnet on version tags (manual approval required).

Monitoring

Grafana/Loki/Promtail configs under grafana/ and docker-compose.yml are provided for local observability tooling; see monitoring/ for uptime/status-page setup.

Docs

Links

Releases

Packages

Contributors

Languages