Skip to content

Solution: LP-0013 — Token Program Improvements: Authorities#65

Open
edenbd1 wants to merge 1 commit into
logos-co:masterfrom
edenbd1:solution/lp-0013-edenbd1-v2
Open

Solution: LP-0013 — Token Program Improvements: Authorities#65
edenbd1 wants to merge 1 commit into
logos-co:masterfrom
edenbd1:solution/lp-0013-edenbd1-v2

Conversation

@edenbd1
Copy link
Copy Markdown

@edenbd1 edenbd1 commented May 24, 2026

Solution: LP-0013 — Token program authorities

Submitted by: edenbd1

Summary

Rotatable mint authority model for the LEZ Token program — four additive instruction variants, backward-compatible Borsh layout, and a reusable RFP-001 approval library published on crates.io.

Repository

What's implemented

  • lez-approval crate — RFP-001 agnostic approval library, published on crates.io
  • NewFungibleDefinitionWithAuthority — create token with mint authority
  • MintWithAuthority — authority-gated minting (cryptographic verification via pre_state is_authorized)
  • RotateAuthority — atomic authority rotation
  • RevokeAuthority — permanent terminal revocation
  • Wallet SDK facade + CLI subcommands
  • Three examples (fixed-supply, variable-supply, config-PDA-gate for RFP-001 §4)
  • Two IDLs: hand-authored (completeness) + SPEL-generated (provenance)
  • 72 tests, CI green, clippy clean
  • Real CU measurements: MintWithAuthority 166,746 cycles, RotateAuthority 124,085, RevokeAuthority 101,425
  • On-chain lifecycle confirmed on standalone sequencer: create → mint → revoke → rejection
  • 9 documentation files (architecture, design, error-codes, security, benchmarks, deployment, SPEL status, criteria checklist)

On-chain evidence

Full lifecycle confirmed on native standalone LEZ sequencer (RISC0_DEV_MODE=0):

[1/4] NewFungibleDefinitionWithAuthority → supply=1000, nonce=1
[2/4] MintWithAuthority 500             → supply=1500, nonce=2
[3/4] RevokeAuthority                   → supply=1500, nonce=3
[4/4] MintWithAuthority (post-revoke)   → REJECTED: "Renounced: authority has been permanently revoked"

Token ImageID: 363204b8c92d5fd683b9f3d28f0b54022c99e6641dd452d7199b78b8fec8742d

See solutions/LP-0013.md for full details.

Terms & Conditions

By submitting this solution, I confirm that I have read and agree to the Terms & Conditions.

@github-actions
Copy link
Copy Markdown

✅ Validation passed

A reviewer will assess against the prize criteria.
ℹ️ Solution submission for LP-0013.
ℹ️ Checking repo: https://github.com/edenbd1/lp-0013-token-authorities


Automated check. See solution template and TERMS.

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