feat(cacp): add protocol-enforced costly abort demo - #704
Draft
Warrenhimself wants to merge 8 commits into
Draft
Conversation
Bind custodial terms into the proposal and execute native stake deposits and forfeiture through the LEZ vault and authenticated transfer programs. Keep the external resolver and inscription boundaries explicit.
Bind bond state to the initiator-approved transaction, participant-owned keys, and the complete accepted candidate. Add challenge-driven disclosure, complete timeout exits, exact fee-proof validation, and adversarial demo checks. The challenge flow remains optimistic and requires response-window monitoring.
Update transaction and test-context APIs for the current dev branch. Advance stale-parent fixtures with a valid signed CACP transaction and rebuild the bond artifact.
Warrenhimself
force-pushed
the
cacp-protocol
branch
from
August 20, 2026 16:58
08fab21 to
b177252
Compare
Charge challengers and responders fixed fees to a neutral-zone collector. Keep participant stakes refundable on valid responses and forfeit only unanswered challenged stakes.
Bind both participants to the exact Mantle transaction hash and all executable bond terms. Prepay challenge and response fees, route them to a fixed program sink, and forfeit only stake after an unanswered challenge.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎯 Purpose
Add a CACP reference implementation and a protocol-enforced costly-abort mechanism for LEZ. The goal is to demonstrate atomic two-zone inscription submission together with executable public-account stake forfeiture, without relying on inscription execution or a trusted resolver.
⚙️ Approach
cacp_bondLEZ program with proposal-specific state and escrow PDAs.just demo-cacpentry point.The demo starts one local Bedrock Docker node, participant Zone A and Zone B with one sequencer each, and a third neutral bond execution zone with its own sequencer.
The joint Bedrock transaction contains exactly two business operations, both
ChannelInscribe. The Bedrock wallet may append one finalTransferoperation for the transaction fee. The bond program executes separately because inscriptions do not provide execution semantics.Each participant locks 1,000 units from a distinct LEZ public account. A challenge adds a 100-unit bond. Program-controlled chained transfers move the balances into or out of a proposal-specific escrow PDA.
🧪 How to Test
Expected results:
cross_zone: 9 tests passed.cacp_bond_core: 1 test passed.ALL 5 LIVE CACP SCENARIOS PASSED.The demo covers:
🔗 Dependencies
No dependent PRs.
🔜 Future Work
This PR intentionally excludes bridges, application tokens, ping programs, an indexer, a web UI, and additional ZK protocol work.
The demo runs on a real local LEZ development network, not a public testnet or mainnet. The demo command uses
RISC0_DEV_MODE=1for practical local execution.📋 PR Completion Checklist