Skip to content

0xBased-lang/kektech2.0

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

2 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

KEKTECH 2.0 - Next Generation NFT-Enhanced Prediction Markets

๐Ÿš€ Overview

KEKTECH 2.0 revolutionizes prediction markets by integrating NFT staking, social engagement, and flexible governance into a unified ecosystem. Built on Based Network, the platform rewards active participation through a sophisticated off-chain Oracle system while maintaining on-chain security and transparency.

๐Ÿ—๏ธ Architecture

The system consists of three interconnected layers:

  1. Smart Contract Layer - Handles value transfer, ownership, and core logic
  2. Oracle Service - Performs complex calculations and reward distribution
  3. Frontend Interface - Provides user interaction and data visualization

Key Innovations

  • Dual Market Creation: Choose between refundable bonds or permanent fees
  • NFT-Weighted Rewards: Rarity multipliers amplify staking rewards
  • Flexible Parameters: All system values adjustable without redeployment
  • Activity-Based Distribution: Oracle calculates rewards across multiple dimensions
  • Proposal Governance: Community votes on new markets with weighted influence

๐Ÿ“ฆ Installation

Prerequisites

  • Node.js 18+
  • PostgreSQL 14+
  • Git
  • Hardhat
  • Based Network RPC access

Setup

# Clone the repository
git clone https://github.com/your-org/kektech2.0.git
cd kektech2.0

# Install dependencies
npm install

# Configure environment
cp .env.example .env
# Edit .env with your values

# Compile contracts
npx hardhat compile

# Run tests
npx hardhat test

๐Ÿ”ง Configuration

Environment Variables

Create a .env file with the following:

# Network Configuration
RPC_URL=https://mainnet.base.org
PRIVATE_KEY=your-deployment-private-key
ETHERSCAN_API_KEY=your-api-key

# Token Addresses
TECH_TOKEN_ADDRESS=0x...
KEKTECH_NFT_ADDRESS=0x...

# Team Configuration
TEAM_WALLET=0x...
ORACLE_ADDRESS=0x...
ORACLE_PRIVATE_KEY=oracle-private-key

# Database
DATABASE_URL=postgresql://user:password@localhost:5432/kektech

# Oracle Settings
UPDATE_INTERVAL=21600  # 6 hours
BATCH_SIZE=100
MIN_REWARD_THRESHOLD=1000000000000000

๐Ÿšข Deployment

Complete Deployment

# Deploy all contracts
npx hardhat run scripts/deploy-main.js --network based

# Load NFT rarity data
npx hardhat run scripts/load-rarity-data.js --network based

# Start Oracle service
cd oracle
npm start

Phased Deployment

For production, deploy in phases:

# Phase 1: Core infrastructure
npx hardhat run scripts/deploy/01-deploy-core.js --network based

# Phase 2: NFT system
npx hardhat run scripts/deploy/02-deploy-nft.js --network based

# Phase 3: Markets
npx hardhat run scripts/deploy/03-deploy-markets.js --network based

# Phase 4: Governance
npx hardhat run scripts/deploy/04-deploy-governance.js --network based

# Phase 5: Initialize connections
npx hardhat run scripts/deploy/05-initialize.js --network based

๐ŸŽฎ Usage

For Users

  1. Stake NFTs: Lock your KEKTECH NFTs to earn base rewards
  2. Create Markets: Propose prediction markets through the proposal system
  3. Place Bets: Participate in markets to earn activity rewards
  4. Engage Socially: Comment and vote to build reputation
  5. Claim Rewards: Collect accumulated TECH and BASED tokens

For Developers

// Interact with contracts
const registry = await ethers.getContractAt("Registry", REGISTRY_ADDRESS);
const marketFactory = await registry.getContract(
    ethers.utils.keccak256(ethers.utils.toUtf8Bytes("MARKET_FACTORY"))
);

// Create a market proposal
await marketFactory.proposeMarket({
    creator: userAddress,
    question: "Will ETH reach $10k by 2025?",
    endTime: Math.floor(Date.now() / 1000) + 30 * 24 * 3600,
    token: ethers.constants.AddressZero, // Native token
    creationType: 0, // BOND
    marketType: 0, // STANDARD
    tierIndex: 1,
    additionalData: "0x"
}, {
    value: ethers.utils.parseEther("42000") // Tier 1 bond
});

๐Ÿ” Security

Audit Status

  • Internal audit complete
  • External audit scheduled
  • Bug bounty program active

Security Features

  • Reentrancy protection on all value transfers
  • Emergency pause mechanisms
  • Time-locked parameter changes
  • Multi-signature admin controls
  • Slashing for malicious markets

๐Ÿ“Š Oracle Service

The Oracle monitors blockchain events and calculates rewards based on:

  • NFT staking duration and rarity
  • Prediction market accuracy
  • Social engagement quality
  • Market creation success

Starting the Oracle

cd oracle
npm install
npm start

Monitoring

# View logs
tail -f oracle/oracle-combined.log

# Check health
curl http://localhost:3000/health

# Manual reward calculation
npm run calculate-rewards

๐Ÿงช Testing

Unit Tests

npx hardhat test

Integration Tests

npx hardhat test test/integration/*.test.js

Coverage

npx hardhat coverage

๐Ÿ“ˆ Parameter Management

All system parameters can be adjusted without redeployment:

// Update a parameter
const paramStorage = await ethers.getContractAt(
    "ParameterStorage", 
    PARAM_STORAGE_ADDRESS
);

await paramStorage.updateParameter(
    ethers.utils.keccak256(ethers.utils.toUtf8Bytes("STAKING")),
    ethers.utils.keccak256(ethers.utils.toUtf8Bytes("BASE_REWARD_PER_DAY")),
    ethers.utils.parseEther("150") // Increase from 100 to 150 TECH
);

๐Ÿค Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines.

Development Workflow

  1. Fork the repository
  2. Create a feature branch
  3. Write tests for new functionality
  4. Implement the feature
  5. Run tests and linting
  6. Submit a pull request

๐Ÿ“œ License

MIT License - see LICENSE file for details

๐Ÿ”— Resources

๐Ÿšจ Emergency Contacts

๐ŸŽฏ Roadmap

Phase 1 (Current)

  • โœ… Core infrastructure deployment
  • โœ… NFT staking system
  • โœ… Basic prediction markets
  • โœ… Proposal governance

Phase 2 (Q1 2025)

  • ๐Ÿ”„ Multi-outcome markets
  • ๐Ÿ”„ Duel marketplace
  • ๐Ÿ”„ Creator reputation system
  • ๐Ÿ”„ Advanced Oracle features

Phase 3 (Q2 2025)

  • โณ Cross-chain NFT battles
  • โณ Layer 2 integration
  • โณ Mobile app launch
  • โณ DAO governance transition

Phase 4 (Q3 2025)

  • โณ Institutional markets
  • โณ AI-powered market creation
  • โณ Global expansion
  • โณ Full decentralization

โšก Quick Commands

# Check system health
npm run health-check

# Update parameters
npm run update-params

# Emergency pause
npm run emergency-pause

# Generate reports
npm run generate-reports

# Backup Oracle database
npm run backup-db

๐Ÿ† Acknowledgments

Built with love by the KEKTECH team for the Based and Pepe communities. Special thanks to all contributors, testers, and believers in the vision of decentralized prediction markets enhanced by NFT culture.


KEKTECH 2.0 - Where NFTs Meet Prediction Markets ๐Ÿš€๐Ÿธ

About

KEKTECH 2.0 - Enhanced Platform

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •