Vault Balance
VAULT
0XTM
Protected by M-of-N component vault
Quorum Policy
M-OF-N
2-of-3
3 active badge holders · ECDSA verified
Epoch Spend Cap
0%
100,000 XTM
0 XTM spent in epoch 142
Replay-Proof Nonce
MONOTONIC
#1
1 settled · 0 replay violations
Checks JWK public keys, canonical payload hash, signer uniqueness, and M-of-N quorum.
#[template]
mod ootle_safe {
use super::*;
pub struct OotleSafe {
name: String,
vault: Vault,
signer_badge_resource: ResourceAddress,
active_signers: BTreeSet<NonFungibleId>,
threshold: u32,
nonce: u64,
next_proposal_id: u64,
epoch_spend_cap: Option<Amount>,
last_spend_epoch: u64,
epoch_spent: Amount,
proposals: BTreeMap<u64, Proposal>,
}
impl OotleSafe {
pub fn create_treasury(
name: String,
initial_funds: Bucket,
signer_badge_resource: ResourceAddress,
signers: Vec<NonFungibleId>,
threshold: u32,
epoch_spend_cap: Option<Amount>,
) -> Component<Self> { /* enforces 1 <= M <= N, unique signer badges, Vault::from_bucket */ }
pub fn propose_transfer(&mut self, signer_proof: Proof, recipient: ComponentAddress, amount: Amount, memo: String, expiry_epoch: u64) -> u64 { /* ... */ }
pub fn propose_signer_change(&mut self, signer_proof: Proof, new_signers: Vec<NonFungibleId>, new_threshold: u32, memo: String, expiry_epoch: u64) -> u64 { /* ... */ }
pub fn approve_proposal(&mut self, proposal_id: u64, signer_proof: Proof) -> ProposalStatus { /* ... */ }
pub fn revoke_approval(&mut self, proposal_id: u64, signer_proof: Proof) -> ProposalStatus { /* ... */ }
pub fn cancel_proposal(&mut self, proposal_id: u64, signer_proof: Proof) { /* ... */ }
pub fn execute_proposal(&mut self, proposal_id: u64, signer_proof: Proof) -> Option<Bucket> {
// Verifies signer_proof via Proof::assert_resource + NonFungibleId membership
// Enforces Consensus::current_epoch() <= expiry_epoch, valid_approvals >= threshold,
// epoch spend cap, vault balance, and monotonic replay-proof nonce++
}
}
}
60s HD Walkthrough · 1280×720 H.264
Watch OotleSafe End-to-End in 60 Seconds
Real browser capture of 2-of-3 treasury proposal creation, Web Crypto ECDSA P-256 co-signing (1/2 → 2/2), atomic settlement, Ootle Transaction Manifest & Substate Diff export, and 1-byte tamper rejection.