Lock

Lock(resource lock) contracts enable sophisticated asset management beyond simple token transfers. While basic staking contracts offer time-delayed withdrawals, advanced resource lock systems introduce multiple stakeholder roles to enable programmable, cross-chain, and intent-based asset operations.

Core Implementation Differences

Aspect
TheCompact
FlashFunds

Asset Identification

ERC6909arrow-up-right tokens with packed ID structure

Simple mapping stakes[user][token]

Stakeholder Model

Multi-party (Sponsor, Allocator, Arbiter)

Single-party (Staker only)

User Interaction

Complex claim mechanisms + forced withdrawal

Direct staking functions + simple withdrawal

Withdrawal Authorization

Cryptographic proofs + allocator approval

Time delay + direct ownership

State Management

Complex resource lock lifecycle

Simple staking state machine

TheCompact's Multi-Party Architecture

Why Multiple Stakeholders?

  • Sponsor: Owns the locked assets but cannot unilaterally withdraw them

  • Allocator : Authorized to release locked assets only for specific purposes

  • Arbiter : Validates and executes authorized claims against locked assets

This separation prevents users from arbitrarily disposing of their locked assets while enabling programmatic execution through authorized intermediaries. Unlike traditional approaches where users maintain direct control, TheCompact creates enforceable commitments where assets remain locked until specific conditions are cryptographically proven.

Account Abstraction & Chain Abstraction Integration

When implementing cross-chain intent settlement, TheCompact prevents source chain fund manipulation through cryptographic proofs and multi-party validation, ensuring that once a user submits a cross-chain intent, their assets remain locked until specific conditions are satisfied across multiple chains. FlashFunds relies on time-based locks that cannot adapt to dynamic cross-chain execution requirements, making it unsuitable for conditional release scenarios.

For account abstraction integration, TheCompact enables smart accounts to express complex cross-chain intents with guaranteed asset commitment, while FlashFunds supports only basic single-chain operations where simple time delays provide adequate security. The key difference lies in conditional versus temporal asset control: TheCompact locks assets until specific cross-chain conditions are met, while FlashFunds locks assets for predetermined time periods regardless of execution outcomes.

Last updated