🔴 Admin Panel
🛡️ V4 Liquidity Admin Panel
Mint positions, manage liquidity, collect fees, fetch on-chain data
💰 Wallet Balances
💧 Mint Liquidity Position
💧 Mint Position (V4 PositionManager)
/
Balance: 0
Balance: 0
🖼️ Your LP Positions
🔍 Fetch V4 Positions

Query PositionManager subgraph & decode packed on-chain position data.

📝 Contract Sources

💳 Visa Payment Contract

📝 Contract Source

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

#[contracttype]
pub struct PaymentReceipt {
    pub tx_id: u64,
    pub from: Address,
    pub to: Address,
    pub amount: i128,
    pub asset_in: Address,
    pub asset_out: Address,
    pub rate: i128,
    pub fee: i128,
    pub timestamp: u64,
}

#[contract]
pub struct VisaPayment;

#[contractimpl]
impl VisaPayment {
    /// Send a cross-asset payment
    pub fn send_payment(
        env: Env,
        from: Address,
        to: Address,
        asset_in: Address,
        asset_out: Address,
        amount: i128,
    ) -> PaymentReceipt {
        from.require_auth();

        // Debit sender in asset_in
        let client_in = token::Client::new(&env, &asset_in);
        client_in.transfer(
            &from, &env.current_contract_address(), &amount
        );

        // Get oracle exchange rate
        let rate = Self::get_rate(env.clone(), asset_in.clone(), asset_out.clone());
        let fee = amount * 10 / 10000; // 0.1% fee
        let net = amount - fee;
        let out_amount = net * rate / 10000000;

        // Credit receiver in asset_out
        let client_out = token::Client::new(&env, &asset_out);
        client_out.transfer(
            &env.current_contract_address(), &to, &out_amount
        );

        // Emit receipt event
        let tx_id = env.ledger().sequence() as u64;
        env.events().publish(
            (Symbol::new(&env, "payment"),), &tx_id
        );

        PaymentReceipt {
            tx_id, from, to, amount,
            asset_in, asset_out, rate, fee,
            timestamp: env.ledger().timestamp(),
        }
    }

    /// Batch multiple payments in one tx
    pub fn batch_pay(
        env: Env, from: Address,
        recipients: Vec<Address>,
        amounts: Vec<i128>,
        asset: Address,
    ) -> Vec<PaymentReceipt> {
        from.require_auth();
        // ... batch payment logic
        Vec::new(&env)
    }

    /// Get exchange rate from oracle
    pub fn get_rate(
        env: Env, from: Address, to: Address
    ) -> i128 {
        // Oracle integration - TWAP price feed
        10000000 // 1:1 default
    }

    /// Refund a payment within 24h
    pub fn refund(
        env: Env, admin: Address, tx_id: u64
    ) { admin.require_auth(); /* ... */ }
}

🧪 Unit Test

Rust — test.rs
#[test]
fn test_send_payment() {
    let env = Env::default();
    env.mock_all_auths();
    let sender = Address::generate(&env);
    let receiver = Address::generate(&env);
    let client = VisaPaymentClient::new(&env,
        &env.register_contract(None, VisaPayment));

    let receipt = client.send_payment(
        &sender, &receiver, &usdc, &xlm, &1000_0000000
    );
    assert!(receipt.tx_id > 0);
    assert_eq!(receipt.fee, 1_0000000); // 0.1%
    assert!(receipt.timestamp > 0);
}
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.

📜 Visa Staking Contract Source

Rust — visa_staking.rs
#[contracttype]
pub struct VisaStake {
    pub staker: Address,
    pub stake_amount: i128,      // $100 activation
    pub daily_reward: i128,      // $6 per day
    pub duration_days: u32,     // 90 | 180 | 365 days
    pub service_fee: i128,      // $40 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] = [
    10_0000000, // Gen 1: $10 (direct inviter)
    6_0000000,  // Gen 2: $6
    4_0000000,  // Gen 3: $4
    4_0000000,  // Gen 4: $4
    4_0000000,  // Gen 5: $4
    4_0000000,  // Gen 6: $4
    4_0000000,  // Gen 7: $4
    4_0000000,  // Gen 8: $4
];  // Total referral: $40 | Main wallet: $60 | Grand total: $100

#[contractimpl]
impl VisaPayment {

    /// Activate Visa staking — $100 deposit + $40 service fee
    /// duration: 90 (3 mo) | 180 (6 mo) | 365 (1 yr)
    /// $100 split: $60 main wallet + $40 across 8-gen binary tree
    pub fn activate_stake(
        env: Env, staker: Address, sponsor: Address, duration: u32,
    ) {
        staker.require_auth();
        assert!(duration == 90 || duration == 180 || duration == 365,
                "invalid period");

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

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

        // ── Distribute $100 activation across binary tree ──
        let main_wallet = get_main_wallet(&env);
        let mut remaining = activation; // $100
        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 ($60 or more) to main wallet
        tok.transfer(
            &env.current_contract_address(),
            &main_wallet, &remaining,
        );

        let stake = VisaStake {
            staker: staker.clone(),
            stake_amount: activation,
            daily_reward: 6_0000000,   // $6/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: VisaStake = 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→$540 | 180d→$1,080 | 365d→$2,190
    }
}
FunctionDescriptionAuthCost
activate_stakeDeposit $100 + $40 fee, choose period (90/180/365 days)User$140 total
claim_rewardsClaim accrued $6/day rewardsUser~0.01 XLM
get_sponsorGet upline address for a given userNone~0.001 XLM

💳 Gold Token Contract

📝 Contract Source

Rust — lib.rs
#![no_std]
use soroban_sdk::{
    contract, contractimpl, contracttype,
    Address, Env, String,
    token::{self, Interface as TokenInterface},
};

#[contracttype]
pub enum DataKey {
    Balance(Address),
    Allowance(Address, Address),
    Admin,
    TotalSupply,
}

#[contract]
pub struct GoldToken;

#[contractimpl]
impl GoldToken {
    /// Initialize the Gold Token with admin and supply
    pub fn initialize(
        env: Env,
        admin: Address,
        name: String,
        symbol: String,
        initial_supply: i128,
    ) {
        admin.require_auth();
        env.storage().instance().set(&DataKey::Admin, &admin);
        env.storage().instance().set(&DataKey::TotalSupply, &initial_supply);
        env.storage().persistent().set(
            &DataKey::Balance(admin.clone()), &initial_supply
        );
    }

    /// Transfer tokens between accounts
    pub fn transfer(
        env: Env,
        from: Address,
        to: Address,
        amount: i128,
    ) {
        from.require_auth();
        let from_bal: i128 = env.storage().persistent()
            .get(&DataKey::Balance(from.clone()))
            .unwrap_or(0);
        assert!(from_bal >= amount, "insufficient balance");

        env.storage().persistent().set(
            &DataKey::Balance(from), &(from_bal - amount)
        );
        let to_bal: i128 = env.storage().persistent()
            .get(&DataKey::Balance(to.clone()))
            .unwrap_or(0);
        env.storage().persistent().set(
            &DataKey::Balance(to), &(to_bal + amount)
        );
    }

    /// Mint new tokens (admin only)
    pub fn mint(env: Env, to: Address, amount: i128) {
        let admin: Address = env.storage().instance()
            .get(&DataKey::Admin).unwrap();
        admin.require_auth();
        // ... mint logic
    }

    /// Burn tokens from caller's balance
    pub fn burn(env: Env, from: Address, amount: i128) {
        from.require_auth();
        // ... burn logic
    }

    /// Get balance of an address
    pub fn balance(env: Env, addr: Address) -> i128 {
        env.storage().persistent()
            .get(&DataKey::Balance(addr))
            .unwrap_or(0)
    }
}

🧪 Unit Test

Rust — test.rs
#[test]
fn test_transfer() {
    let env = Env::default();
    env.mock_all_auths();
    let admin = Address::generate(&env);
    let user  = Address::generate(&env);
    let client = GoldTokenClient::new(&env, &env.register_contract(None, GoldToken));

    client.initialize(&admin, &String::from_str(&env, "Gold"),
        &String::from_str(&env, "GOLD"), &1000_0000000);

    client.transfer(&admin, &user, &100_0000000);
    assert_eq!(client.balance(&user), 100_0000000);
    assert_eq!(client.balance(&admin), 900_0000000);
}
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.

📜 Gold Staking Contract Source

Rust — gold_staking.rs
#[contracttype]
pub struct GoldStake {
    pub staker: Address,
    pub stake_amount: i128,      // $400 activation
    pub daily_reward: i128,      // $24 per day
    pub duration_days: u32,     // 90 | 180 | 365 days
    pub service_fee: i128,      // $160 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] = [
    40_0000000, // Gen 1: $40 (direct inviter)
    24_0000000, // Gen 2: $24
    16_0000000, // Gen 3: $16
    16_0000000, // Gen 4: $16
    16_0000000, // Gen 5: $16
    16_0000000, // Gen 6: $16
    16_0000000, // Gen 7: $16
    16_0000000, // Gen 8: $16
];  // Total referral: $160 | Main wallet: $240 | Grand total: $400

#[contractimpl]
impl GoldToken {

    /// Activate Gold staking — $400 deposit + $160 service fee
    /// $400 split: $240 main wallet + $160 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 = 400_0000000; // $400
        let fee = 160_0000000;        // $160 service fee

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

        // ── Distribute $400 activation across binary tree ──
        let main_wallet = get_main_wallet(&env);
        let mut remaining = activation; // $400
        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 ($240 or more) to main wallet
        tok.transfer(
            &env.current_contract_address(),
            &main_wallet, &remaining,
        );

        let stake = GoldStake {
            staker: staker.clone(),
            stake_amount: activation,
            daily_reward: 24_0000000,  // $24/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: GoldStake = 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,160 | 180d→$4,320 | 365d→$8,760
    }
}
FunctionDescriptionAuthCost
activate_stakeDeposit $400 + $160 fee, choose period (90/180/365 days)User$560 total
claim_rewardsClaim accrued $24/day rewardsUser~0.01 XLM
get_sponsorGet upline address for a given userNone~0.001 XLM

💳 Amex DAO Contract

📝 Contract Source

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

#[contracttype]
pub enum ProposalState {
    Draft, Active, Passed, Failed, Executed, Cancelled,
}

#[contracttype]
pub struct Proposal {
    pub id: u32,
    pub creator: Address,
    pub title: Symbol,
    pub votes_for: i128,
    pub votes_against: i128,
    pub state: ProposalState,
    pub end_ledger: u32,
    pub timelock_until: u32,
}

#[contract]
pub struct AmexDAO;

#[contractimpl]
impl AmexDAO {
    /// Create a new governance proposal
    pub fn create_proposal(
        env: Env, creator: Address,
        title: Symbol, voting_period: u32,
    ) -> u32 {
        creator.require_auth();
        let id = Self::next_id(&env);
        let proposal = Proposal {
            id, creator, title,
            votes_for: 0, votes_against: 0,
            state: ProposalState::Active,
            end_ledger: env.ledger().sequence() + voting_period,
            timelock_until: 0,
        };
        id
    }

    /// Cast a vote on an active proposal
    pub fn vote(
        env: Env, voter: Address,
        proposal_id: u32, support: bool,
        amount: i128,
    ) {
        voter.require_auth();
        // Lock governance tokens as voting weight
        // Tally votes for or against
        // Emit VoteCast event
    }

    /// Delegate voting power to another address
    pub fn delegate(
        env: Env, delegator: Address,
        delegate_to: Address,
    ) {
        delegator.require_auth();
        // Transfer voting weight without moving tokens
    }

    /// Execute a passed proposal after timelock
    pub fn execute(
        env: Env, proposal_id: u32,
    ) {
        // Verify: Passed + timelock expired
        // Check quorum: total_votes >= 10% supply
        // Execute on-chain action
    }

    /// Query current quorum percentage
    pub fn quorum(env: Env, proposal_id: u32) -> i128 { 0 }
}

🧪 Unit Test

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

    // Create proposal
    let pid = client.create_proposal(
        &creator, &Symbol::new(&env, "upgrade_v2"), &100);

    // Vote with 60% of supply FOR
    client.vote(&voter1, &pid, &true, &600_000);
    client.vote(&voter2, &pid, &false, &200_000);

    // Advance past voting period + timelock
    env.ledger().set_sequence_number(200);
    client.execute(&pid);

    let p = client.get_proposal(&pid);
    assert_eq!(p.state, ProposalState::Executed);
}
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.

📜 Amex Staking Contract Source

Rust — amex_staking.rs
#[contracttype]
pub struct AmexStake {
    pub staker: Address,
    pub stake_amount: i128,      // $200 activation
    pub daily_reward: i128,      // $12 per day
    pub duration_days: u32,     // 90 | 180 | 365 days
    pub service_fee: i128,      // $80 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] = [
    20_0000000, // Gen 1: $20 (direct inviter)
    12_0000000, // Gen 2: $12
    8_0000000,  // Gen 3: $8
    8_0000000,  // Gen 4: $8
    8_0000000,  // Gen 5: $8
    8_0000000,  // Gen 6: $8
    8_0000000,  // Gen 7: $8
    8_0000000,  // Gen 8: $8
];  // Total referral: $80 | Main wallet: $120 | Grand total: $200

#[contractimpl]
impl AmexDAO {

    /// Activate Amex staking — $200 deposit + $80 service fee
    /// duration: 90 (3 mo) | 180 (6 mo) | 365 (1 yr)
    /// $200 split: $120 main wallet + $80 across 8-gen binary tree
    pub fn activate_stake(
        env: Env, staker: Address, sponsor: Address, duration: u32,
    ) {
        staker.require_auth();
        assert!(duration == 90 || duration == 180 || duration == 365,
                "invalid period");

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

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

        // ── Distribute $200 activation across binary tree ──
        let main_wallet = get_main_wallet(&env);
        let mut remaining = activation; // $200
        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 ($120 or more) to main wallet
        tok.transfer(
            &env.current_contract_address(),
            &main_wallet, &remaining,
        );

        let stake = AmexStake {
            staker: staker.clone(),
            stake_amount: activation,
            daily_reward: 12_0000000,  // $12/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: AmexStake = 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→$1,080 | 180d→$2,160 | 365d→$4,380
    }
}
FunctionDescriptionAuthCost
activate_stakeDeposit $200 + $80 fee, choose period (90/180/365 days)User$280 total
claim_rewardsClaim accrued $12/day rewardsUser~0.01 XLM
get_sponsorGet upline address for a given userNone~0.001 XLM

💳 Black Vault Contract

📝 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 }
}

🧪 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);
}
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

💳 Mastercard DEX Contract

📝 Contract Source

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

#[contracttype]
pub struct Pool {
    pub token_a: Address,
    pub token_b: Address,
    pub reserve_a: i128,
    pub reserve_b: i128,
    pub total_shares: i128,
    pub fee_bps: u32,
}

#[contract]
pub struct McSwapDex;

#[contractimpl]
impl McSwapDex {
    /// Create a new liquidity pool
    pub fn create_pool(
        env: Env, admin: Address,
        token_a: Address, token_b: Address,
        fee_bps: u32,
    ) -> Pool {
        admin.require_auth();
        let pool = Pool {
            token_a, token_b,
            reserve_a: 0, reserve_b: 0,
            total_shares: 0, fee_bps,
        };
        // Store pool in persistent storage
        pool
    }

    /// Add liquidity and receive LP shares
    pub fn add_liquidity(
        env: Env, user: Address,
        amount_a: i128, amount_b: i128,
    ) -> i128 {
        user.require_auth();
        // Transfer tokens to pool
        // Calculate LP shares: sqrt(amount_a * amount_b)
        // Mint LP tokens to user
        0 // returns shares minted
    }

    /// Swap token_a for token_b (or vice versa)
    pub fn swap(
        env: Env, user: Address,
        token_in: Address, amount_in: i128,
        min_out: i128, // slippage protection
    ) -> i128 {
        user.require_auth();

        // x * y = k constant product formula
        // fee = amount_in * fee_bps / 10000
        // amount_out = reserve_b - (k / (reserve_a + net_in))

        assert!(amount_out >= min_out, "slippage exceeded");
        amount_out
    }

    /// Remove liquidity by burning LP shares
    pub fn remove_liquidity(
        env: Env, user: Address, shares: i128,
    ) -> (i128, i128) {
        user.require_auth();
        // Proportional withdrawal
        (0, 0)
    }

    /// Get swap quote without executing
    pub fn get_quote(
        env: Env, token_in: Address, amount_in: i128,
    ) -> i128 { 0 }
}

🧪 Unit Test

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

    // Add liquidity: 10000 XLM + 5000 USDC
    client.add_liquidity(&lp, &10000_0000000, &5000_0000000);

    // Swap 100 XLM for USDC
    let out = client.swap(&user, &xlm, &100_0000000, &40_0000000);
    assert!(out >= 40_0000000, "min_out not met");

    // Verify k is preserved (with fees)
    let (r_a, r_b) = client.get_reserves();
    assert!(r_a * r_b >= 10000_0000000 * 5000_0000000);
}
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.

📜 Staking Contract Source

Rust — mc_staking.rs
#[contracttype]
pub struct McStake {
    pub staker: Address,
    pub stake_amount: i128,      // $50 activation
    pub daily_reward: i128,      // $3 per day
    pub duration_days: u32,     // 90 | 180 | 365 days
    pub service_fee: i128,      // $20 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] = [
    5_0000000,  // Gen 1: $5 (direct inviter)
    3_0000000,  // Gen 2: $3
    2_0000000,  // Gen 3: $2
    2_0000000,  // Gen 4: $2
    2_0000000,  // Gen 5: $2
    2_0000000,  // Gen 6: $2
    2_0000000,  // Gen 7: $2
    2_0000000,  // Gen 8: $2
];  // Total referral: $20 | Main wallet: $30 | Grand total: $50

#[contractimpl]
impl McSwapDex {

    /// Activate Mastercard staking — $50 deposit + $20 service fee
    /// duration: 90 (3 mo) | 180 (6 mo) | 365 (1 yr)
    /// $50 split: $30 main wallet + $20 across 8-gen binary tree
    pub fn activate_stake(
        env: Env, staker: Address, sponsor: Address, duration: u32,
    ) {
        staker.require_auth();
        assert!(duration == 90 || duration == 180 || duration == 365,
                "invalid period");

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

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

        // ── Distribute $50 activation across binary tree ──
        let main_wallet = get_main_wallet(&env);
        let mut remaining = activation; // $50
        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 ($30 or more) to main wallet
        tok.transfer(
            &env.current_contract_address(),
            &main_wallet, &remaining,
        );

        let stake = McStake {
            staker: staker.clone(),
            stake_amount: activation,
            daily_reward: 3_0000000,  // $3/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: McStake = 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→$270 | 180d→$540 | 365d→$1,095
    }
}
FunctionDescriptionAuthCost
activate_stakeDeposit $50 + $20 fee, choose period (90/180/365 days)User$70 total
claim_rewardsClaim accrued $3/day rewardsUser~0.01 XLM
get_sponsorGet upline address for a given userNone~0.001 XLM

💳 Platinum Staking Contract

📝 Contract Source

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

#[contracttype]
pub struct StakePosition {
    pub owner: Address,
    pub amount: i128,
    pub start_ledger: u32,
    pub lock_until: u32,
    pub reward_debt: i128,
    pub boost_multiplier: u32, // 100 = 1.0x
    pub auto_compound: bool,
}

#[contracttype]
pub struct PoolConfig {
    pub reward_token: Address,
    pub stake_token: Address,
    pub reward_per_ledger: i128,
    pub acc_reward_per_share: i128,
    pub total_staked: i128,
    pub last_update_ledger: u32,
}

#[contract]
pub struct PlatinumStake;

#[contractimpl]
impl PlatinumStake {
    /// Stake tokens with optional lock period
    pub fn stake(
        env: Env, user: Address,
        amount: i128, lock_days: u32,
        auto_compound: bool,
    ) -> StakePosition {
        user.require_auth();
        let boost = match lock_days {
            0 => 100,
            1..=30 => 150,
            31..=90 => 200,
            _ => 250,
        };
        // Transfer stake_token from user to contract
        // Update pool accumulators
        // Create position in persistent storage
        StakePosition { /* ... */ }
    }

    /// Compound accrued rewards back into stake
    pub fn compound(env: Env, user: Address) -> i128 {
        user.require_auth();
        // pending = (pos.amount * acc_reward_per_share) - pos.reward_debt
        // pos.amount += pending (compound rewards)
        // pos.reward_debt = pos.amount * acc_reward_per_share
        0 // returns compounded amount
    }

    /// Unstake tokens (must respect lock period)
    pub fn unstake(
        env: Env, user: Address, amount: i128,
    ) -> i128 {
        user.require_auth();
        assert!(env.ledger().sequence() >= pos.lock_until,
            "lock period active");
        // Claim pending rewards + withdraw stake
        0
    }

    /// Claim rewards without unstaking
    pub fn claim_rewards(env: Env, user: Address) -> i128 {
        user.require_auth();
        0
    }

    /// View pending rewards for a position
    pub fn pending_rewards(env: Env, user: Address) -> i128 { 0 }
}

🧪 Unit Test

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

    // Stake 10000 XLM for 90 days (2.0x boost)
    let pos = client.stake(&user, &10000_0000000, &90, &true);
    assert_eq!(pos.boost_multiplier, 200);

    // Advance 1000 ledgers (~83 minutes)
    env.ledger().set_sequence_number(1000);
    let pending = client.pending_rewards(&user);
    assert!(pending > 0);

    // Compound rewards back into position
    let compounded = client.compound(&user);
    assert!(compounded > 0);
    let new_pos = client.get_position(&user);
    assert!(new_pos.amount > 10000_0000000);
}
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.

📜 Platinum Staking Contract Source

Rust — platinum_staking.rs
#[contracttype]
pub struct PlatStake {
    pub staker: Address,
    pub stake_amount: i128,      // $300 activation
    pub daily_reward: i128,      // $18 per day
    pub duration_days: u32,     // 90 | 180 | 365 days
    pub service_fee: i128,      // $120 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] = [
    30_0000000, // Gen 1: $30 (direct inviter)
    18_0000000, // Gen 2: $18
    12_0000000, // Gen 3: $12
    12_0000000, // Gen 4: $12
    12_0000000, // Gen 5: $12
    12_0000000, // Gen 6: $12
    12_0000000, // Gen 7: $12
    12_0000000, // Gen 8: $12
];  // Total referral: $120 | Main wallet: $180 | Grand total: $300

#[contractimpl]
impl PlatinumStake {

    /// Activate Platinum staking — $300 deposit + $120 service fee
    /// $300 split: $180 main wallet + $120 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 = 300_0000000; // $300
        let fee = 120_0000000;        // $120 service fee

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

        // ── Distribute $300 activation across binary tree ──
        let main_wallet = get_main_wallet(&env);
        let mut remaining = activation; // $300
        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 ($180 or more) to main wallet
        tok.transfer(
            &env.current_contract_address(),
            &main_wallet, &remaining,
        );

        let stake = PlatStake {
            staker: staker.clone(),
            stake_amount: activation,
            daily_reward: 18_0000000,  // $18/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: PlatStake = 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→$1,620 | 180d→$3,240 | 365d→$6,570
    }
}
FunctionDescriptionAuthCost
activate_stakeDeposit $300 + $120 fee, choose period (90/180/365 days)User$420 total
claim_rewardsClaim accrued $18/day rewardsUser~0.01 XLM
get_sponsorGet upline address for a given userNone~0.001 XLM

💳 Visa — Developer Reference

⚙️ Contract Functions

FunctionDescriptionAuthGas (XLM)
initializeSet admin, fee rate, oracle addressAdmin~0.015
send_paymentCross-asset payment with auto-conversionSender~0.012
batch_paySend to multiple recipients in one txSender~0.025
get_rateQuery oracle exchange rate (read-only)None~0.001
refundReverse payment within 24h windowAdmin~0.010
set_feeUpdate fee basis pointsAdmin~0.006
get_receiptFetch payment receipt by tx_idNone~0.001
withdraw_feesClaim accumulated protocol feesAdmin~0.008

🚀 Deploy & Invoke

$ soroban contract build
$ soroban contract deploy --wasm target/wasm32-unknown-unknown/release/visa_payment.wasm --network testnet --source admin
$ soroban contract invoke --id CBVS...9TRN -- send_payment --from GBUY...USER --to GDQP...RECV --asset_in CCUS...USDC --asset_out CCXL...XLM --amount 500_0000000

✨ Visa Tier Features

🌍

Multi-Asset

Pay in any Soroban token, receive in any other

GLOBAL

5s Finality

Stellar consensus settles in ~5 seconds

FAST
📦

Batch Payments

Send to hundreds of recipients in one tx

EFFICIENT
💱

Oracle Rates

TWAP price feeds for fair conversion

PRICE
🧾

On-Chain Receipts

Every payment produces a verifiable receipt

AUDIT
🔄

24h Refund

Admin-reversible payments within window

SAFETY

💳 Gold — Developer Reference

⚙️ Contract Functions

FunctionDescriptionAuthGas (XLM)
initializeDeploy token with name, symbol, supplyAdmin~0.015
transferSend tokens between addressesSender~0.008
approveSet spending allowance for a spenderOwner~0.006
transfer_fromTransfer using allowanceSpender~0.010
mintCreate new tokensAdmin~0.008
burnDestroy tokens from balanceOwner~0.006
balanceQuery token balance (read-only)None~0.001
total_supplyGet total token supplyNone~0.001

🚀 Deploy & Invoke

$ soroban contract build
$ soroban contract deploy --wasm target/wasm32-unknown-unknown/release/gold_token.wasm --network testnet --source admin
$ soroban contract invoke --id CDLZ...X7KQ -- initialize --admin GDQP...ADMIN --name "Gold Token" --symbol "GOLD" --initial_supply 100000000000_0000000
$ soroban contract invoke --id CDLZ...X7KQ -- transfer --from GDQP...ADMIN --to GBUY...USER --amount 1000_0000000

✨ Gold Tier Features

🏷️

SEP-41 Standard

Full compliance with Stellar token interface

STANDARD
🔥

Burn & Mint

Admin-controlled supply management on-chain

SUPPLY
🔒

Allowance System

Approve spenders with per-address limits

SECURITY
📊

On-Chain Events

Transfer, mint, burn events for indexing

TRACKING

Low Gas

~0.008 XLM per transfer on Soroban

EFFICIENT
🛡️

Audited

Independent security audit completed

VERIFIED

💳 Amex — Developer Reference

⚙️ Contract Functions

FunctionDescriptionAuthGas (XLM)
create_proposalSubmit a new governance proposalMember~0.016
voteCast for/against vote with token weightMember~0.010
delegateDelegate voting power to another addressMember~0.008
executeExecute a passed + timelocked proposalAny~0.020
cancelCancel a proposal (creator or admin only)Creator~0.006
quorumCheck current quorum percentageNone~0.001
get_proposalQuery proposal details and vote talliesNone~0.001
withdraw_treasuryMove funds per governance approvalDAO~0.014

✨ Amex DAO Features

🗳️

Token Voting

Vote weight proportional to governance tokens locked

CORE
🤝

Delegation

Delegate power without transferring tokens

SOCIAL

Timelock

Mandatory delay before execution for safety

SAFETY
📊

Quorum Gate

10% participation threshold to pass proposals

GOVERNANCE
💰

Treasury Mgmt

On-chain treasury controlled by DAO votes

FINANCE
📡

Event Logs

All votes and executions emit on-chain events

AUDIT

💳 Black — Developer Reference

⚙️ 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

💳 Mastercard — Developer Reference

⚙️ Contract Functions

FunctionDescriptionAuthGas (XLM)
create_poolInitialize a new token pair poolAdmin~0.018
add_liquidityDeposit tokens, receive LP sharesUser~0.014
remove_liquidityBurn LP shares, withdraw tokensUser~0.012
swapExchange one token for anotherUser~0.010
get_quotePreview swap output (read-only)None~0.001
get_reservesQuery pool reservesNone~0.001
get_priceCurrent spot price of pairNone~0.001
collect_feesWithdraw accrued protocol feesAdmin~0.008

✨ Mastercard DEX Features

📊

x*y=k AMM

Constant product market maker for trustless swaps

CORE
💧

LP Shares

Earn swap fees proportional to your liquidity

YIELD
🛡️

Slippage Guard

min_out parameter prevents sandwich attacks

SAFETY

Atomic Swaps

All-or-nothing execution in single transaction

ATOMIC
💱

Multi-Fee Tiers

0.05% stablecoins, 0.3% standard, 1% exotic

FLEXIBLE
🔍

On-Chain Quotes

Query swap output before executing

PREVIEW

💳 Platinum — Developer Reference

⚙️ Contract Functions

FunctionDescriptionAuthGas (XLM)
stakeLock tokens with optional time boostUser~0.014
unstakeWithdraw after lock period expiresUser~0.012
compoundReinvest rewards into positionUser~0.010
claim_rewardsWithdraw accrued rewards to walletUser~0.010
pending_rewardsRead-only: check unclaimed rewardsNone~0.001
get_positionQuery user's stake detailsNone~0.001
get_pool_infoQuery pool TVL, APY, totalsNone~0.001
set_rewardsAdmin: update reward rate per ledgerAdmin~0.008

✨ Platinum Staking Features

🔒

Lock Boost

Up to 2.5x rewards for longer lock periods

BOOST
🔄

Auto-Compound

Reinvest rewards automatically each epoch

YIELD
📈

Per-Ledger Accrual

Rewards accumulate every 5-second ledger close

PRECISION

Instant Claim

Harvest rewards without touching principal

FLEXIBLE
🛡️

Lock Enforcement

On-chain lock prevents early withdrawal

SAFETY
📊

Transparent APY

Pool rewards and positions fully on-chain

AUDIT