Skip to content

[PROPOSAL] RFP-002 — Freeze Authority Library #56

Description

@bristinWild

Applicant

GitHub: https://github.com/bristinWild
Track record:

  • LP-0012 winner (merged) — Structured Event System for LEZ Programs
  • LP-0013 submitted — Token Program Improvements: Authorities (PR [PROPOSAL] RFP-002 — Freeze Authority Library #56, validation passed)
  • RFP-001 proposal submitted — Admin Authority Library (building on production-tested lez-authority)

Relevant Experience

  • Built lez-authority — a standalone, program-agnostic authority library already
    integrated into the LEZ token program as part of LP-0013. The authority pattern
    used for freeze authority (set, transfer, revoke) is the same primitive.
  • Deep familiarity with LEZ account model — AccountId, AccountWithMetadata,
    is_authorized, program-owned accounts, PDA derivation.
  • LP-0012 winner with code reviewed and merged by the Logos team.
  • RFP-001 proposal in review — freeze authority naturally extends the same codebase.

Proposed Solution

Architecture

The freeze authority library builds directly on top of lez-authority and adds
two new state primitives:

// lez-freeze/src/lib.rs
 
pub struct FreezeState {
    /// The freeze authority. Controlled by admin authority.
    /// None = freeze authority revoked by admin.
    pub authority: AuthoritySlot,
 
    /// Whether the entire program is frozen.
    /// When true, all non-freeze interactions are rejected.
    pub program_frozen: bool,
 
    /// Set of frozen account IDs.
    /// Accounts in this set cannot interact with the program.
    pub frozen_accounts: HashSet<AccountId>,
}
 
impl FreezeState {
    /// Freeze the entire program. Only freeze authority can call this.
    pub fn freeze_program(&mut self, signer: [u8; 32]) -> Result<(), FreezeError>
 
    /// Unfreeze the entire program. Only freeze authority can call this.
    pub fn unfreeze_program(&mut self, signer: [u8; 32]) -> Result<(), FreezeError>
 
    /// Freeze a specific account. Only freeze authority can call this.
    pub fn freeze_account(&mut self, signer: [u8; 32], account: AccountId) -> Result<(), FreezeError>
 
    /// Unfreeze a specific account. Only freeze authority can call this.
    pub fn unfreeze_account(&mut self, signer: [u8; 32], account: AccountId) -> Result<(), FreezeError>
 
    /// Check if an interaction should be allowed.
    /// Returns Err if program is frozen OR the specific account is frozen.
    pub fn check_interaction(&self, account: AccountId) -> Result<(), FreezeError>
 
    /// Change freeze authority. Only admin authority can call this.
    pub fn set_freeze_authority(&mut self, admin_signer: [u8; 32], new_authority: Option<[u8; 32]>) -> Result<(), FreezeError>
}

Integration with Admin Authority

Freeze authority is subordinate to admin authority:

  • Admin sets the freeze authority at init
  • Admin can change or revoke freeze authority at any time
  • Freeze authority cannot modify itself — only admin can
    This creates a clean two-level hierarchy:
AdminAuthority (lez-authority)
    └── FreezeAuthority (lez-freeze)
            ├── freeze_program()
            ├── unfreeze_program()
            ├── freeze_account(account_id)
            └── unfreeze_account(account_id)

Crate Structure

lez-authority/                    (already built, LP-0013)
├── src/lib.rs                    — AuthoritySlot
 
lez-freeze/                       (new for RFP-002)
├── src/lib.rs                    — FreezeState, FreezeError
└── tests/                        — unit tests for all 7 functionality requirements
 
freeze-authority-program/         (standalone sample program)
├── core/src/lib.rs               — FreezeConfig PDA, Instruction enum
├── src/                          — handlers: init, freeze, unfreeze,
│                                   freeze_account, unfreeze_account,
│                                   set_freeze_authority
└── methods/guest/src/main.rs     — guest binary
 
spel-freeze/                      (SPEL integration)
├── src/lib.rs                    — #[freeze_check] annotation
└── examples/                     — end-to-end usage example

Milestone Breakdown

Milestone Deliverable Duration Payout
1 lez-freeze core library — all 7 functionality requirements, unit tests, CI green Week 1 $2,000
2 Standalone freeze-authority-program deployed on devnet, integration tests Week 2 $1,500
3 SPEL framework integration, documentation, transaction overhead measurement Week 3-4 $1,500

Total: $5,000 USD over 4 weeks


Implementation Plan

Week 1 — Core library

  • lez-freeze crate with FreezeState implementing all 7 hard requirements
  • Unit tests for every requirement:
    • freeze/unfreeze program
    • freeze/unfreeze specific account
    • set/revoke freeze authority via admin
    • check_interaction rejects frozen program
    • check_interaction rejects frozen account while program is live
  • CI green

Week 2 — Sample program + integration tests

  • Standalone LEZ guest program using lez-freeze
  • Deployed on LEZ devnet via logos-scaffold
  • Integration tests against live sequencer

Weeks 3-4 — SPEL integration + documentation

  • #[freeze_check] annotation for SPEL programs
  • README: step-by-step integration guide
  • Transaction overhead measurement and documentation
  • End-to-end usage example

Tech Stack

  • Rust (lez-freeze crate + LEZ guest program)
  • lez-authority from LP-0013 (admin authority layer)
  • logos-scaffold for local development and devnet deployment
  • SPEL framework for annotation integration
  • LEZ wallet CLI for integration testing

Why Choose This Proposal

  • Builds on proven foundationlez-authority is already production-tested
    in LP-0013 and reviewed by the Logos team. The freeze authority pattern
    is a natural extension of the same codebase.
  • RFP-001 + RFP-002 together — delivering both admin authority and freeze
    authority from the same codebase reduces integration effort for consumer
    programs and ensures consistent API design.
  • Established credibility — LP-0012 winner, LP-0013 submitted and validated,
    RFP-001 proposal in review. danisharora099 has already reviewed this authority code.
  • Concrete milestone pricing — $5,000 with clear deliverables per milestone.

Timeline

4 weeks


Budget

$5,000 USD

Milestone 1: $2,000
Milestone 2: $1,500
Milestone 3: $1,500


License

MIT + Apache-2.0


Open Source

Yes, fully open source on GitHub.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    RFP-002Proposals for RFP-002proposalProposal submitted for an RFP

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions