PROPELOO

SMART CONTRACTS / PROTOCOL LOGIC

Smart Contract Development — audited, production-grade code.

PROPELOO engineers smart contract systems across EVM, Solana and Cosmos — from single contracts to multi-contract protocol architectures. A smart contract is not just code. It is a legally and economically binding rule set deployed to an immutable ledger. The design, testing and security review process matters more than the implementation speed.

Deployed contracts cannot be taken back. The design phase is where mistakes get made and where PROPELOO invests the most time.

Smart contract development is unlike any other form of software engineering. There are no patches. There is no customer support rollback. A vulnerability discovered six months after mainnet deployment may have already been exploited. The contracts we deploy are final — or they are upgradeable through a governance mechanism that itself must be secure. This is why PROPELOO treats the design phase of every contract engagement as the most expensive part of the project, not the implementation.

What smart contract engineering actually involves.

A production contract system is not a Solidity file. It is a set of design decisions, invariants, upgrade paths and security properties that must be correct before a single line is written.

System Layers

  • Design & Invariant Layer: Business rule formalisation, invariant definition, state machine design, access control model
  • Contract Architecture Layer: Single vs multi-contract, upgrade pattern, proxy design, interface definitions, storage layout
  • Implementation Layer: Solidity / Rust / CosmWasm development, gas optimization, event emission, error handling
  • Testing Layer: Unit tests, integration tests, fuzz testing, property-based testing, scenario simulation
  • Security & Audit Layer: Internal security review, static analysis, formal verification preparation, third-party audit

Core Technical Capabilities

  • EVM Contract Architecture

    Multi-contract system design for Ethereum, Polygon, Arbitrum, Base and other EVM chains — including storage layout planning, interface design and cross-contract interaction security.

  • Upgrade Pattern Design

    Transparent proxy, UUPS proxy and Diamond (EIP-2535) pattern implementation — with storage collision prevention, upgrade governance design and admin key security.

  • Access Control Systems

    Role-based access control (OpenZeppelin AccessControl), ownership patterns, multi-sig requirements and timelock enforcement for privileged operations.

  • Token Contract Engineering

    ERC-20, ERC-721, ERC-1155 and custom token standards — with transfer hooks, compliance extensions, vesting schedules and distribution mechanics.

  • Multi-sig & Governance

    Gnosis Safe integration, custom multi-sig contracts, on-chain governance with Governor contracts, voting periods and proposal execution timelocks.

  • Gas Optimization

    Storage packing, calldata optimization, assembly-level optimization for hot paths, gas profiling and cost benchmarking across contract operations.

How we think about smart contract engineering.

The hard part of smart contract development is not writing Solidity. It is defining the invariants that must always be true, and making sure the code enforces them.

  • Deployment is a commitment, not a release

    Every production software system has a rollback plan. Smart contracts on mainnet do not. We treat every deployment as an irreversible commitment and invest in the design phase accordingly.

    Axiom:

  • Invariants are the specification

    Before writing a function, we write what must always be true — before and after that function executes. These invariants are then encoded as property tests that run against every commit, not just before launch.

    Axiom:

  • Upgrade paths are attack surfaces

    An upgradeable contract system is only as secure as its upgrade governance. A proxy pattern with an insecure admin key is worse than an immutable contract with a known bug — the bug is bounded, the admin key exposure is not.

    Axiom:

  • Gas is a product constraint

    A contract that costs $200 in gas per transaction has a usability ceiling that no frontend design will overcome. Gas optimization is a product requirement, not a performance luxury.

    Axiom:

The decisions that define a smart contract system.

These choices are made before the first function is written. Changing them post-deployment requires migration — at the cost of user trust and TVL.

  • Immutable vs upgradeable contract

    Impact: Immutable contracts build maximum user trust but cannot be patched. Upgradeable contracts can be patched but require governance that is itself secure. There is no risk-free choice.

    • Immutable — maximum trustlessness, no admin key risk, no bug fixes post-deployment
    • Transparent proxy (OpenZeppelin) — standard upgrade path, clear separation, admin slot collision risk
    • UUPS proxy — gas efficient, upgrade logic in implementation, risk of bricking if upgrade function removed
    • Diamond (EIP-2535) — modular upgrade per-facet, most powerful, highest complexity
  • Proxy pattern selection

    Impact: Proxy selection affects gas costs on every transaction, upgrade mechanics and the security surface around the admin key.

    • No proxy — immutable, simple, no upgrade path
    • Transparent proxy — admin/user call separation, extra gas overhead per call
    • UUPS — upgrade logic in implementation, cheaper per call, can brick on bad upgrade
    • Diamond — facet-based modularity, complex storage layout, powerful for large systems
    • Minimal proxy (EIP-1167) — cheap clone deployment, no upgrade path
  • Access control model

    Impact: Owner key compromise gives full contract control. Role-based access limits blast radius. Timelocks give users time to react to malicious operations.

    • Single owner (Ownable) — simple, single point of failure
    • Role-based (AccessControl) — granular, multiple roles, more complex
    • Multi-sig owner — requires multiple keyholders, slower operations, more secure
    • Timelock controller — delay on privileged operations, governance-compatible
  • Single vs multi-contract architecture

    Impact: Multi-contract systems introduce cross-contract reentrancy risk that does not exist in single-contract systems. Each contract boundary requires security analysis.

    • Single contract — simple, all logic in one place, size limit (24KB) applies
    • Multi-contract — modular, each contract has clear responsibility, cross-contract call risk
    • Faceted (Diamond) — one address, many logic modules, complex but no size limit
  • Testing strategy

    Impact: Foundry's fuzzing capability is the single most effective tool for finding invariant violations before deployment. We use Foundry for security-critical paths on every engagement.

    • Hardhat only — JavaScript/TypeScript tests, large ecosystem, slower execution
    • Foundry only — Solidity tests, fast fuzzing, best for invariant testing
    • Both — Foundry for security/fuzz, Hardhat for integration and scripts
  • L1 vs L2 deployment

    Impact: Gas cost directly determines whether the product is usable. An app where each interaction costs $50 gas has a hard ceiling on its addressable market.

    • Ethereum L1 — highest security, $5–200 per complex transaction
    • Arbitrum / Optimism / Base (Optimistic rollup) — 10–100x cheaper, Ethereum security, 7-day L1 withdrawal
    • Polygon PoS — EVM compatible, very low fees, different trust model from L1
    • zkSync / StarkNet (ZK rollup) — fast finality, cheaper, different toolchain

What smart contract engineering powers.

  • Token Issuance System

    ERC-20 token contracts with vesting schedules, cliff/linear unlocks, transfer restrictions, distribution mechanics and cap table management.

  • DeFi Protocol Contracts

    AMM, lending and yield strategy contracts with invariant-based testing, oracle integration and upgrade governance designed before deployment.

  • NFT Contract System

    ERC-721 / ERC-1155 contracts with royalty enforcement, dynamic metadata, minting mechanics, allowlist management and marketplace integration.

  • Governance Contracts

    On-chain governance with Governor pattern, voting periods, quorum thresholds, timelock execution and emergency multi-sig override capability.

  • Payment & Escrow

    Conditional payment contracts, multi-party escrow, dispute resolution logic and streaming payment contracts for subscription or milestone-based payments.

  • Multi-sig Treasury

    Gnosis Safe configuration, custom treasury contracts, spending limits, proposal workflows and integration with on-chain governance for large treasury operations.

The smart contract engineering stack.

Language and tooling selection follows the target chain, not preference.

  • Languages

    Stack: Solidity, Rust (Anchor), CosmWasm, Vyper, Huff (optimization)

  • Frameworks & Testing

    Stack: Foundry, Hardhat, Anchor (Solana), Truffle, Waffle

  • Security Tools

    Stack: Slither, Mythril, Echidna, Manticore, Certora Prover, Semgrep

  • Libraries

    Stack: OpenZeppelin Contracts, Solmate, Safe Contracts, Chainlink, ERC-4337

  • Deployment & Ops

    Stack: Hardhat Deploy, Foundry Scripts, OpenZeppelin Defender, Tenderly, Etherscan Verification

  • Networks

    Stack: Ethereum, Arbitrum, Base, Polygon, Optimism, Solana, Cosmos

Smart contract security requires a different discipline than application security.

There is no patch cycle, no incident response that undoes a theft. The cost of a security failure is not a support ticket — it is a permanent loss of user funds.

  • Reentrancy

    Reentrancy attacks exploit the window between a state change and an external call. Check-effects-interactions pattern, reentrancy guards and careful ordering of external calls are required for every state-changing function that calls external addresses.

  • Integer Overflow & Underflow

    Solidity 0.8+ has built-in overflow protection, but unchecked blocks, type casting and assembly code create overflow risks that static analysis tools miss. All arithmetic in unchecked contexts requires explicit bounds verification.

  • Access Control Gaps

    Missing access control on privileged functions is the most common serious smart contract vulnerability. Every function that modifies state, manages funds or controls contract configuration requires explicit authorisation verification.

  • Selfdestruct & Force ETH

    Contracts that use address(this).balance as a security invariant can be broken by force-sending ETH via selfdestruct. Contracts that depend on a specific ETH balance for correctness require audit of all balance-dependent logic.

  • Delegatecall Vulnerabilities

    Delegatecall executes external code in the calling contract's storage context. Storage layout mismatch between proxy and implementation contracts, or untrusted delegatecall targets, can allow arbitrary storage overwrites — including access control variables.

  • Gas Griefing

    Contracts that forward all gas to external calls, or that depend on specific gas amounts for correctness, can be griefed by callers who manipulate gas. The check-call-build pattern and bounded gas forwarding protect against most gas griefing vectors.

From business rule to deployed contract.

  1. 01. Contract Design

    Business rule formalisation, invariant definition, state machine design, access control model and upgrade strategy decision.

  2. 02. Architecture Document

    Contract system design, storage layout, proxy pattern specification, interface definitions and integration points for off-chain systems.

  3. 03. Test Suite First

    Invariant tests written before implementation — property-based tests in Foundry that define what must always be true, guiding the implementation.

  4. 04. Implementation

    Contract development with continuous static analysis (Slither on every commit), gas profiling and test coverage requirement of 95%+.

  5. 05. Security Review

    Internal security review against OWASP Smart Contract Top 10, Echidna fuzz campaign, manual code review and audit preparation documentation.

  6. 06. Audit & Remediation

    Third-party audit coordination, bug fix cycle with regression tests for every finding, re-verification and audit report sign-off.

  7. 07. Testnet → Mainnet

    Staged testnet deployment, integration testing with all dependent systems, deployment scripts with verification and mainnet deployment checklist.

Frequently Asked Questions

What is the difference between an upgradeable and immutable contract?

An immutable contract's code is fixed at deployment — it cannot be changed, and there is no admin key that controls it. This maximises trustlessness and eliminates admin key risk, but means bugs cannot be patched. An upgradeable contract uses a proxy pattern — users interact with a proxy address, and the underlying logic contract can be replaced. This allows bug fixes but introduces admin key risk: whoever controls the upgrade key controls the entire contract's behaviour. The choice is not which is "better" but which risk profile matches your system.

When should we use a proxy pattern?

Use a proxy pattern when: the business logic is complex enough that the probability of a post-deployment bug is meaningful, the system holds enough value that a patch-and-upgrade cycle is preferable to a full redeployment, and you can design a governance mechanism for the upgrade key that is as secure as the contract itself. Do not use a proxy pattern as a default — immutable contracts are simpler, cheaper and more trustworthy for use cases where upgrade capability is not genuinely needed.

How do you test smart contracts?

We use a three-layer testing approach: unit tests for individual functions (Hardhat or Foundry), integration tests for multi-contract interactions and external system integration (Hardhat), and property-based fuzz tests for invariants (Foundry + Echidna). The fuzz tests are the most valuable — they test the things you didn't think to write unit tests for. We also run Slither static analysis on every commit and perform manual code review before any audit engagement.

What does a smart contract audit involve?

A third-party audit involves manual code review by security researchers specifically looking for: reentrancy, access control gaps, arithmetic errors, oracle manipulation, logic errors in business rules and design-level issues that automated tools miss. Auditors work from the codebase, the natspec documentation and the invariant definitions. A well-prepared codebase — high test coverage, clear documentation, no outstanding TODOs — gets better audit results. Audits find fewer issues when the internal review is thorough.

How do you handle access control in a multi-role system?

We use OpenZeppelin AccessControl as the base pattern for most multi-role systems — it allows granular role definitions, role admin hierarchies and role revocation. Privileged roles (minting, pausing, upgrading) are assigned to multi-sig addresses rather than EOAs. Timelocks are added to roles that control high-stakes operations. The access control model is defined explicitly before implementation begins, with a role table that maps every sensitive function to the roles that can call it.

What is the difference between Solidity and Rust for smart contracts?

Solidity targets the EVM (Ethereum, Polygon, Arbitrum, etc.) — the largest ecosystem, most tooling and most auditors. Rust (via Anchor) targets Solana — account-based programming model, high throughput, cheaper transactions but different mental model and fewer security tools. CosmWasm (Rust) targets Cosmos chains. The choice is chain-driven, not preference-driven. For most products, EVM + Solidity is the right default because of ecosystem depth. Solana makes sense for high-throughput use cases that the EVM cannot service at acceptable cost.

What gas costs should we expect?

On Ethereum mainnet, a simple ERC-20 transfer costs 21,000–65,000 gas (~$1–10 at $30/ETH and 10 gwei). A complex DeFi interaction (AMM swap, lending deposit) costs 100,000–500,000 gas ($3–50+). Contract deployment costs 1–5M gas depending on size. On L2s (Arbitrum, Base, Optimism) costs are typically 10–100x lower. Gas estimation is part of every architecture decision — a contract that costs $50 per operation has a hard ceiling on its usable market.

How do you handle contract versioning?

For immutable contracts, versioning means coordinated migration — new contract deployment, state migration (if needed) and updating all dependent systems to point to the new address. For upgradeable contracts, versioning is managed through the upgrade process with changelogs, storage layout verification and governance approval. We maintain deployment registries that track contract addresses, versions and upgrade history for all production deployments.

What is the Diamond pattern?

The Diamond pattern (EIP-2535) uses a single proxy address that delegates calls to multiple "facet" contracts based on function selector routing. Each facet handles a subset of functions, and facets can be added, replaced or removed independently. This eliminates the 24KB contract size limit and allows per-function upgrade granularity. The trade-off is significant complexity — storage layout across facets must be carefully managed, and auditing a Diamond system requires understanding the entire facet graph. We use Diamond for large, complex protocol contracts where the modularity justifies the complexity.

How long does a smart contract project take?

A single well-specified contract with full test coverage and internal security review: 2–4 weeks. A multi-contract system (e.g., token + vesting + governance): 4–8 weeks. A full DeFi protocol with audit: 12–20 weeks. Timeline is dominated by the design and testing phases, not implementation. Contracts that skip design or compress testing to ship faster are the ones that result in exploits. We scope every engagement with the assumption that the design phase takes at least as long as the implementation.