Not logged in
SOROBAN • RUST • WASM

🏛️ Governance DAO Contract

On-Chain Voting & Treasury Governance — OLIGHFT SMART COIN Amex Tier

AMEX DAO
OLIGHFT SMART COIN Governance Protocol
🏛️
Contract ID
CAMX7DAO2QK3R5GOVNTF6EHJG9SVX8VTE
Network
Stellar Testnet
Quorum
10%
Voting
3d Period
SOROBAN RUNTIME v21
Proposals
147
Members
2,841
Treasury
$1.6M

🗳️ Proposal Lifecycle

01
📝 Draft
02
📣 Submit
03
🗳️ Vote
04
⏳ Timelock
05
✅ Execute

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

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

💰 Amex Staking Contract

Stake $200 to activate your Amex tier and earn $12 daily rewards. Choose your contract period:

Activation Stake
$200
Daily Earnings
$12 / day
Service Fee
$80
Contract Period
3 Months
90 Days
Total Payout$1,080
Stake + Fee-$280
Net Profit
$800
POPULAR
Contract Period
6 Months
180 Days
Total Payout$2,160
Stake + Fee-$280
Net Profit
$1,880
BEST VALUE
Contract Period
1 Year
365 Days
Total Payout$4,380
Stake + Fee-$280
Net Profit
$4,100

⚡ Activate Amex Staking

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

📋 How It Works

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

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

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

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

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

OLIGHFT SMART COIN Amex DAO Contract v1.3.0 • Stellar Testnet • Rust/WASM

Built with soroban-sdk 21.0.0 • April 2026

🔒 Verify Withdrawal

Confirm your identity before withdrawing funds
🔐 Google Authenticator