Not logged in
SOROBAN • RUST • WASM

🗄️ Multi-Sig Vault Contract

Secure Treasury Management — OLIGHFT SMART COIN Black Tier

BLACK VAULT
OLIGHFT SMART COIN Multi-Sig Treasury
🗄️
Contract ID
CBLK8VLT2QK3R5VAULTF6EHJG9SVX1SEC
Network
Stellar Testnet
Signers
3-of-5
Timelock
24h
SOROBAN RUNTIME v21
Vault Balance
$12.4M
Signers
5
Executed
72

🔐 Multi-Sig Withdrawal Flow

01
📝 Propose
02
✅ Sign 1
03
✅ Sign 2
04
✅ Sign 3
05
⏳ Timelock
06
💸 Execute

📝 Contract Source

Rust — vault.rs
#![no_std]
use soroban_sdk::{
    contract, contractimpl, contracttype,
    Address, Env, Vec, token,
};

#[contracttype]
pub enum TxState {
    Pending, Approved, Executed, Cancelled,
}

#[contracttype]
pub struct VaultTx {
    pub id: u32,
    pub proposer: Address,
    pub recipient: Address,
    pub token: Address,
    pub amount: i128,
    pub approvals: Vec<Address>,
    pub state: TxState,
    pub execute_after: u32, // timelock ledger
}

#[contracttype]
pub struct VaultConfig {
    pub signers: Vec<Address>,
    pub threshold: u32, // min approvals needed
    pub timelock_ledgers: u32,
    pub daily_limit: i128,
}

#[contract]
pub struct BlackVault;

#[contractimpl]
impl BlackVault {
    /// Deposit tokens into the vault
    pub fn deposit(
        env: Env, from: Address,
        token: Address, amount: i128,
    ) {
        from.require_auth();
        // Transfer token from depositor to vault
        token::Client::new(&env, &token)
            .transfer(&from, &env.current_contract_address(), &amount);
    }

    /// Propose a withdrawal (requires multi-sig)
    pub fn propose_withdrawal(
        env: Env, proposer: Address,
        recipient: Address, token: Address,
        amount: i128,
    ) -> u32 {
        proposer.require_auth();
        // Verify proposer is a signer
        // Check daily_limit not exceeded
        // Create VaultTx with Pending state
        // Auto-count proposer as first approval
        0 // returns tx_id
    }

    /// Approve a pending withdrawal (signer only)
    pub fn approve(
        env: Env, signer: Address, tx_id: u32,
    ) {
        signer.require_auth();
        // Verify signer is authorized
        // Prevent duplicate approvals
        // If threshold reached, set state = Approved
        // Set execute_after = now + timelock_ledgers
    }

    /// Execute an approved withdrawal after timelock
    pub fn execute(env: Env, tx_id: u32) {
        // Verify: Approved + timelock expired
        assert!(env.ledger().sequence() >= tx.execute_after,
            "timelock active");
        // Transfer tokens to recipient
        // Set state = Executed
    }

    /// Cancel a pending/approved withdrawal
    pub fn cancel(
        env: Env, signer: Address, tx_id: u32,
    ) {
        signer.require_auth();
    }

    /// Query vault balance for a specific token
    pub fn balance(env: Env, token: Address) -> i128 { 0 }
}

⚙️ Contract Functions

FunctionDescriptionAuthGas (XLM)
depositSend tokens to vault custodyAny~0.008
propose_withdrawalCreate multi-sig withdrawal requestSigner~0.016
approveSign/approve a pending withdrawalSigner~0.010
executeExecute after threshold + timelockAny~0.014
cancelCancel a pending withdrawalSigner~0.006
balanceQuery vault holdings for a tokenNone~0.001
get_txQuery withdrawal request detailsNone~0.001
update_signersAdd/remove vault signers (multi-sig)Threshold~0.018

✨ Black Vault Features

🔐

Multi-Sig

Configurable M-of-N threshold for all withdrawals

SECURITY

Timelock

24-hour delay after approval before execution

CRITICAL
💰

Daily Limits

Configurable daily withdrawal caps per token

LIMIT
🚫

Cancel Window

Any signer can cancel during timelock period

SAFETY
📦

Multi-Token

Hold XLM, USDC, wETH, wBTC and any SEP-41

FLEXIBLE
📋

Full Audit Log

Every deposit, approval, and execution on-chain

AUDIT

💰 Black Staking Contract

Stake $500 to activate your Black tier and earn $30 daily rewards. Choose your contract period:

Activation Stake
$500
Daily Earnings
$30 / day
Service Fee
$200
Contract Period
3 Months
90 Days
Total Payout$2,700
Stake + Fee-$700
Net Profit
$2,000
POPULAR
Contract Period
6 Months
180 Days
Total Payout$5,400
Stake + Fee-$700
Net Profit
$4,700
BEST VALUE
Contract Period
1 Year
365 Days
Total Payout$10,950
Stake + Fee-$700
Net Profit
$10,250

⚡ Activate Black Staking

Select your contract period and enter your sponsor code to activate:
Required — commissions flow through 8-generation binary tree
You Pay
$700
$500 stake + $200 fee
Period
180 days
Net Profit
$4,700
Stellar Testnet • Transaction requires wallet signature

📋 How It Works

1
Stake $500 to Activate
Deposit $500 to activate your Black tier staking contract
2
Choose Your Period
Select 3 months (90 days), 6 months (180 days), or 1 year (365 days)
3
Earn $30 Daily
Receive $30 in rewards every day for your chosen contract period
4
$200 System Service Fee
A one-time $200 service fee is deducted for platform maintenance
5
Collect Your Rewards
3mo: $2,700 ($2,000 profit) • 6mo: $5,400 ($4,700 profit) • 1yr: $10,950 ($10,250 profit)

🌳 $500 Activation Fee Distribution — 8-Generation Binary Tree

When a user activates with $500, the fee is distributed across the 8-level upline binary tree:

GenerationRoleCommissionAmount
Main Wallet (Platform)$300
Gen 1Direct Inviter10%$50
Gen 2Inviter’s Inviter6%$30
Gen 3Upline Level 34%$20
Gen 4Upline Level 44%$20
Gen 5Upline Level 54%$20
Gen 6Upline Level 64%$20
Gen 7Upline Level 74%$20
Gen 8Upline Level 84%$20
TOTAL$500
🌳
Binary Tree Structure: Each user has 2 direct slots (left & right). Commissions flow upward through 8 generations. If an upline slot is empty, that generation’s commission rolls to the main wallet.

📜 Black Staking Contract Source

Rust — black_staking.rs
#[contracttype]
pub struct BlackStake {
    pub staker: Address,
    pub stake_amount: i128,      // $500 activation
    pub daily_reward: i128,      // $30 per day
    pub duration_days: u32,     // 90 | 180 | 365 days
    pub service_fee: i128,      // $200 platform fee
    pub sponsor: Address,       // direct inviter (Gen 1)
    pub start_time: u64,
    pub claimed_days: u32,
}

// 8-generation binary tree commission rates (in $)
const GEN_COMMISSIONS: [i128; 8] = [
    50_0000000, // Gen 1: $50 (direct inviter)
    30_0000000, // Gen 2: $30
    20_0000000, // Gen 3: $20
    20_0000000, // Gen 4: $20
    20_0000000, // Gen 5: $20
    20_0000000, // Gen 6: $20
    20_0000000, // Gen 7: $20
    20_0000000, // Gen 8: $20
];  // Total referral: $200 | Main wallet: $300 | Grand total: $500

#[contractimpl]
impl BlackVault {

    /// Activate Black staking — $500 deposit + $200 service fee
    /// $500 split: $300 main wallet + $200 across 8-gen binary tree
    /// duration: 90 (3mo) | 180 (6mo) | 365 (1yr)
    pub fn activate_stake(
        env: Env, staker: Address, sponsor: Address,
        duration: u32,
    ) {
        staker.require_auth();

        // Valid periods: 90 (3mo), 180 (6mo), 365 (1yr)
        assert!(duration == 90 || duration == 180 || duration == 365);

        let token = get_payment_token(&env);
        let tok = token::Client::new(&env, &token);
        let activation = 500_0000000; // $500
        let fee = 200_0000000;        // $200 service fee

        // Transfer $500 + $200 fee from user to contract
        tok.transfer(&staker, &env.current_contract_address(),
                     &(activation + fee));

        // ── Distribute $500 activation across binary tree ──
        let main_wallet = get_main_wallet(&env);
        let mut remaining = activation; // $500
        let mut current = sponsor.clone();

        for gen in 0..8 {
            let commission = GEN_COMMISSIONS[gen];
            if let Some(upline) = get_sponsor(&env, ¤t) {
                tok.transfer(
                    &env.current_contract_address(),
                    ¤t, &commission,
                );
                remaining -= commission;
                current = upline;
            } else {
                // No upline — remaining goes to main wallet
                break;
            }
        }

        // Send remainder ($300 or more) to main wallet
        tok.transfer(
            &env.current_contract_address(),
            &main_wallet, &remaining,
        );

        let stake = BlackStake {
            staker: staker.clone(),
            stake_amount: activation,
            daily_reward: 30_0000000,  // $30/day
            duration_days: duration,
            service_fee: fee,
            sponsor: sponsor.clone(),
            start_time: env.ledger().timestamp(),
            claimed_days: 0,
        };
        env.storage().persistent().set(&staker, &stake);
    }

    /// Claim accrued daily rewards
    pub fn claim_rewards(env: Env, staker: Address) -> i128 {
        staker.require_auth();
        let mut stake: BlackStake = env.storage().persistent().get(&staker).unwrap();

        let elapsed = (env.ledger().timestamp() - stake.start_time) / 86400;
        let claimable = elapsed.min(stake.duration_days as u64) as u32
                        - stake.claimed_days;

        let payout = (claimable as i128) * stake.daily_reward;
        stake.claimed_days += claimable;
        env.storage().persistent().set(&staker, &stake);

        // Transfer rewards to staker
        token::Client::new(&env, &get_payment_token(&env))
            .transfer(&env.current_contract_address(), &staker, &payout);
        payout  // 90d→$2,700 | 180d→$5,400 | 365d→$10,950
    }
}
FunctionDescriptionAuthCost
activate_stakeDeposit $500 + $200 fee, choose period (90/180/365 days)User$700 total
claim_rewardsClaim accrued $30/day rewardsUser~0.01 XLM
get_sponsorGet upline address for a given userNone~0.001 XLM

🧪 Unit Test

Rust — test.rs
#[test]
fn test_multisig_withdrawal() {
    let env = Env::default();
    env.mock_all_auths();
    let client = BlackVaultClient::new(&env,
        &env.register_contract(None, BlackVault));

    // Deposit 50000 XLM into vault
    client.deposit(&depositor, &xlm, &50000_0000000);
    assert_eq!(client.balance(&xlm), 50000_0000000);

    // Propose withdrawal of 10000 XLM
    let tx_id = client.propose_withdrawal(
        &signer1, &recipient, &xlm, &10000_0000000);

    // Approve by signer2 and signer3 (threshold = 3)
    client.approve(&signer2, &tx_id);
    client.approve(&signer3, &tx_id);

    // Wait for timelock (17280 ledgers = ~24h)
    env.ledger().set_sequence_number(17280);
    client.execute(&tx_id);

    assert_eq!(client.balance(&xlm), 40000_0000000);
    let tx = client.get_tx(&tx_id);
    assert_eq!(tx.state, TxState::Executed);
}
🏠 Home 💳 Wallet ⚙️ Admin 🔒 Login 🏆 Gold Token 💳 Visa Payment 🔄 MC DEX 🏛️ Amex DAO ⛏️ Plat Staking 🗄️ Black Vault

OLIGHFT SMART COIN Black Vault v2.0.0 • Stellar Testnet • Rust/WASM

Built with soroban-sdk 21.0.0 • April 2026

🔒 Verify Withdrawal

Confirm your identity before withdrawing funds
🔐 Google Authenticator