Comprehensive Review: Smart Contracts with DAL (Current State)

Version: 2.0
Date: 2026-03-20
Purpose: Single, up-to-date reference for DAL smart-contract workflows: trust split model, EVM path maturity, ABI/decode reliability, and remaining gaps.


1. Executive Summary

DAL now supports a stronger smart-contract path than the previous review:

What is still not complete:


2. DAL Contract Model

2.1 Services as Contract Units

DAL “contracts” are services with trust and chain attributes. There is no separate contract keyword.

Key attributes:

Attribute Role
@trust("decentralized" | "hybrid" | "centralized") Declares trust model and policy envelope
@chain("...") Declares chain context and allowed chain namespace usage
@secure / @public Access semantics; mutually exclusive
@compile_target("blockchain") Routes service into blockchain compile backend

2.2 Trust Split (Current Enforcement)

Important product direction:


3. EVM Compile Path: What Works Today

3.1 Blockchain Backend

@compile_target("blockchain") currently supports:

3.2 Hybrid Auto-Split Artifacts

For @trust("hybrid") + @compile_target("blockchain"):

This enables one hybrid service definition to produce dual artifacts without silent cross-boundary leakage.


4. Chain Runtime and Typed Evidence

4.1 Typed Chain Surfaces

Both carry evidence contracts including:

chain::deploy/chain::call remain as compatibility wrappers.

4.2 Strict Mode

Strict policy controls synthetic fallback behavior:


5. ABI/Decode Maturity (Major Progress)

5.1 Vector-Hardened Coverage

ABI golden vectors now cover:

5.2 Extracted Typed Codec Surface

src/stdlib/abi_codec.rs now contains decode-focused helpers:

This extraction is additive and compatibility-safe: behavior remains pinned by vectors.


6. ABI Registry Integration (Current State)

6.1 Registry Model

ABI metadata is registered per contract identity:

Registration occurs during add_sol::register_contract(...).

6.2 Runtime Decode Resolution

chain::call_typed now attempts decode through registry identity:

6.3 Overload Safety

For overloaded function names:

This is aligned with audit-ready deterministic behavior.


7. add_sol Boundary Status

add_sol is now runtime-integrated (no longer “stdlib-only/not wired”):

Typed boundary fields include:


8. Security and Policy Posture


9. Remaining Gaps (Honest Status)

Area Current gap
Full decentralized codegen Broad subset still pending; many generated method bodies remain conservative
End-to-end production contract path Still not equivalent to “drop-in Solidity replacement” for all patterns
Typed decode conventions in DAL call-sites Signature-hint conventions and guidance are still being normalized
Audit package completeness In progress; not yet final-form

10. Practical Guidance: Use DAL for Smart Contract Work

Good fit now

Use caution / expect work-in-progress


11. Reference Pointers (Live Source of Truth)


Bottom line: DAL’s smart-contract path is now materially stronger than earlier states: typed evidence, hardened ABI decode, hybrid dual-artifact split, and overload-safe registry decode are in place. The strategic goal remains unchanged: continue converting this reliable integration/runtime surface into a full audit-ready contract-native path by closing the remaining decentralized codegen and final operational audit gaps.