Skip to content

Add EVM/Solidity escrow family - #49

Open
MyNameIsZorojuro15 wants to merge 1 commit into
Cortex-XYZ:mainfrom
MyNameIsZorojuro15:solidity-escrow
Open

MyNameIsZorojuro15 wants to merge 1 commit into
Cortex-XYZ:mainfrom
MyNameIsZorojuro15:solidity-escrow

Conversation

@MyNameIsZorojuro15

Copy link
Copy Markdown
Collaborator

Adds the Solidity escrow deliverable under EVM/Solidity/.

What this adds

Four self-contained Foundry projects under smart-contracts/, sharing one safety model:

  • escrow: the base two-party ERC20 atomic swap, two implementations (gas-optimized and plain) against one frozen spec.
  • deposit-escrow: a one-sided deposit-release escrow, the confirm-or-timeout pattern.
  • arbitrated-escrow: a milestone escrow with ERC-792 dispute resolution and an optional ERC-3643-style compliance gate.
  • conditional-escrow: an oracle-gated swap whose fill is checked through a provider-agnostic ICondition seam, with a reference price-threshold adapter over a Chainlink-style feed.

Each variant ships a SPEC.md, unit and invariant tests, and Halmos symbolic proofs at full line and branch coverage. smart-contracts/VARIANTS.md explains the four trust models and how to choose a variant.

The oracles/, wallet-connect/, and compliance/ folders are integration references, each with a CUSTOMIZATION.md guide covering the extension surface a developer plugs into without changing the escrow. client/ and next-steps/ hold consumer notes and the forward roadmap.

CI

.github/workflows/evm-solidity-escrow-ci.yml is path-scoped to EVM/Solidity/smart-contracts/** and runs forge build, forge test, and the Halmos proofs across all four variants on a pinned Foundry v1.7.1.

Notes for review

  • forge-std is vendored under each variant's lib/, matching the repo convention that dependencies are committed for reproducible builds. That is most of the line count in this diff; the hand-written code is the contracts, tests, and docs.
  • The base escrow is assessed against its spec with 100% coverage, invariants, differential tests, mutation testing, and Halmos proofs. It has not had an independent third-party audit.

The Solidity escrow deliverable for the lab.

- smart-contracts/: four self-contained Foundry projects sharing one safety
  model. escrow (base two-party atomic swap, two implementations against a
  frozen spec), deposit-escrow (confirm-or-timeout), arbitrated-escrow
  (ERC-792 milestone with an optional ERC-3643 compliance gate), and
  conditional-escrow (oracle-gated fill through an ICondition seam with a
  reference price-threshold adapter). Each ships a SPEC, unit and invariant
  tests, and Halmos symbolic proofs at full coverage. VARIANTS.md explains the
  trust models and how to choose.
- oracles/, wallet-connect/, compliance/: integration references, each with a
  customization guide covering the extension surface a developer plugs into
  without changing the escrow.
- client/: how to consume the contracts from a client or frontend.
- Architecture, lifecycle, and boundary diagrams throughout the docs.
- forge-std is vendored per variant for reproducible builds.
- .github/workflows/evm-solidity-escrow-ci.yml: path-scoped build, test, and
  formal (Halmos) CI across the four variants.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant