Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ members = [
"crates/deadcat-iroh",
"crates/deadcat-node",
"crates/deadcat-cli",
"crates/deadcat-rfq-provider",
]

[workspace.package]
Expand Down Expand Up @@ -41,6 +42,7 @@ deadcat-contracts = { path = "crates/deadcat-contracts" }
deadcat-client = { path = "crates/deadcat-client" }
deadcat-rpc = { path = "crates/deadcat-rpc" }
deadcat-iroh = { path = "crates/deadcat-iroh" }
deadcat-rfq-provider = { path = "crates/deadcat-rfq-provider" }

# The CLI and Rust libraries must remain on the exact same smplx release.
# smplx 0.0.9 caps simplicityhl at 0.6.x; Cargo.lock pins the newest
Expand Down
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,14 @@ packets remain in `docs/` as explicitly marked historical records.
direction: the planned initial venue is a separate noncustodial liquidity
service, with a client-side router responsible for quote validation and
transaction construction. A future AMM or decentralized limit-order book can
implement the same venue boundary. The RFQ service remains separate from
`deadcat-node`; future AMM and DLOB protocols are not implemented by this
repository today.
implement the same venue boundary. [ADR 0007](docs/adr/0007-rfq-provider-state-machine.md)
defines the provider's durable reservation and commit-before-sign boundary.
The transport-free provider state core is implemented, while its wallet,
pricing, transaction validator, signer adapter, remote service, and relay
layers remain future work. Until the validator and signer adapter land, the
safety-critical commit and signed-result transitions are intentionally
crate-internal. The RFQ provider remains separate from `deadcat-node`; future
AMM and DLOB protocols are not implemented by this repository today.

## Assurance

Expand Down
20 changes: 20 additions & 0 deletions crates/deadcat-rfq-provider/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[package]
name = "deadcat-rfq-provider"
description = "Durable inventory reservation and signing state for a noncustodial Deadcat RFQ provider."
version.workspace = true
edition.workspace = true
publish.workspace = true

[lints]
workspace = true

[dependencies]
elements.workspace = true
postcard.workspace = true
redb.workspace = true
serde.workspace = true
sha2.workspace = true
thiserror.workspace = true

[dev-dependencies]
tempfile.workspace = true
31 changes: 31 additions & 0 deletions crates/deadcat-rfq-provider/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
//! Transport-free durable state for a noncustodial RFQ provider.
//!
//! This crate owns neither networking nor wallet keys. Its job is narrower:
//! make inventory allocation and the provider's signing point of no return
//! durable and auditable. The required ordering is:
//!
//! `validate -> commit exact payload -> sign -> persist signed bytes -> release`
//!
//! Only an uncommitted reservation can expire or be cancelled. Once a signing
//! payload is committed, every reserved outpoint remains retired even across
//! expiry, process restart, signer ambiguity, mempool eviction, or reorg.
//!
//! This first state-only layer does not yet expose the commit or signed-result
//! transitions outside the crate. A later concrete transaction validator and
//! signer adapter must be the only producers of those transition inputs.

mod model;
mod store;

pub use model::{
AuditEntry, AuditEvent, Clock, FeePolicy, FeePolicyViolation, FeeSizeMetric, IdempotencyKey,
InventoryItem, InventoryState, InventoryView, MAX_RESERVATION_INPUTS, MAX_SETTLEMENT_BYTES,
ModelError, OwnerId, ProviderId, ProviderIdentity, QuoteCommitment, RecoveryAction,
ReleaseReason, ReservationAccess, ReservationId, ReservationPlan, ReservationState,
ReservationView, SignedArtifact, SignedArtifactDigest, SigningCommitment, SigningJob,
TransactionFee, UnixMillis,
};
pub use store::{
CommitOutcome, MAX_EXPIRATION_BATCH, ProviderError, ReservationBook, ReserveOutcome,
SCHEMA_VERSION, SignedOutcome,
};
Loading
Loading