Not logged in
SOROBAN • RUST • WASM

💳 Payment Contract

Cross-Border Payment Protocol — OLIGHFT SMART COIN Visa Tier Smart Contract

VISA PAYMENT
OLIGHFT SMART COIN Payment Protocol
🌍
Contract ID
CBVS4PAY2QK8R5WMNTF6EHJG9SVX9TRN
Network
Stellar Testnet
Protocol
Multi-Asset
Fee
0.1%
SOROBAN RUNTIME v21
Payments
124,847
Volume (XLM)
8.4M
Currencies
15

🔀 Payment Flow

👤
Sender
require_auth()
📝
Validate
check balance
💱
Convert
oracle rate
📨
Settle
atomic swap
Receipt
emit event

📝 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(); /* ... */ }
}

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

💰 Visa Staking Contract

Stake $100 to activate your Visa tier and earn $6 daily rewards. Choose your contract period:

Activation Stake
$100
Daily Earnings
$6 / day
Service Fee
$40
Contract Period
3 Months
90 Days
Total Payout$540
Stake + Fee-$140
Net Profit
$400
POPULAR
Contract Period
6 Months
180 Days
Total Payout$1,080
Stake + Fee-$140
Net Profit
$940
BEST VALUE
Contract Period
1 Year
365 Days
Total Payout$2,190
Stake + Fee-$140
Net Profit
$2,050

⚡ Activate Visa Staking

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

📋 How It Works

1
Stake $100 to Activate
Deposit $100 to activate your Visa tier staking contract
2
Choose Your Period
Select 3 months (90 days), 6 months (180 days), or 1 year (365 days)
3
Earn $6 Daily
Receive $6 in rewards every day for your chosen contract period
4
$40 System Service Fee
A one-time $40 service fee is deducted for platform maintenance
5
Collect Your Rewards
3mo: $540 ($400 profit) • 6mo: $1,080 ($940 profit) • 1yr: $2,190 ($2,050 profit)

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

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

GenerationRoleCommissionAmount
Main Wallet (Platform)$60
Gen 1Direct Inviter10%$10
Gen 2Inviter’s Inviter6%$6
Gen 3Upline Level 34%$4
Gen 4Upline Level 44%$4
Gen 5Upline Level 54%$4
Gen 6Upline Level 64%$4
Gen 7Upline Level 74%$4
Gen 8Upline Level 84%$4
TOTAL$100
🌳
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

🧪 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);
}
🏠 Home 💳 Wallet ⚙️ Admin 🔒 Login 🏆 Gold Token 💳 Visa Payment 🔄 MC DEX 🏛️ Amex DAO ⛏️ Plat Staking 🗄️ Black Vault

OLIGHFT SMART COIN Visa Payment Contract v2.1.0 • Stellar Testnet • Rust/WASM

Built with soroban-sdk 21.0.0 • April 2026

🔒 Verify Withdrawal

Confirm your identity before withdrawing funds
🔐 Google Authenticator