Skip to content

Transform your crypto into real gold-backed tokens and bridge them across chains with cutting-edge DeFi technology

Notifications You must be signed in to change notification settings

Teyik0/bridgeable-gold-token-vault

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

17 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ† GoldBridge Vault - Digital Gold Revolution

Transform your crypto into real gold-backed tokens and bridge them across chains with cutting-edge DeFi technology โšก

๐ŸŒŸ What Makes GoldBridge Special?

๐Ÿ’Ž Real Gold, Digital Power

  • Gold-Backed ERC20 Tokens: Every token represents actual physical gold stored securely
  • Live Price Feeds: Real-time gold (XAU/USD) and ETH prices via Chainlink oracles
  • Instant Conversion: Mint tokens with ETH, burn tokens for ETH refunds

๐ŸŒ‰ Cross-Chain Bridge Magic

  • Seamless CCIP Integration: Bridge your gold tokens to Binance Smart Chain effortlessly
  • Multi-Chain Liquidity: Access DeFi opportunities across different blockchains
  • Secure Transfers: Powered by Chainlink's battle-tested CCIP technology

๐ŸŽฐ Community Lottery System

  • Fee-Powered Rewards: Collected fees fuel exciting lottery rounds
  • Provably Fair: Chainlink VRF ensures cryptographically secure randomness
  • Community Benefits: Win big while supporting the ecosystem

๐Ÿš€ Key Features

Feature Technology Benefit
๐Ÿ… Gold Tokenization Chainlink Price Feeds Real-time, accurate pricing
๐ŸŒ Cross-Chain Bridge Chainlink CCIP Seamless multi-chain access
๐ŸŽฒ Fair Lottery Chainlink VRF Transparent, verifiable randomness
๐Ÿ” Security First OpenZeppelin Standards Battle-tested smart contracts
โšก Gas Efficient Optimized Solidity Lower transaction costs

๐Ÿ›  Quick Start

Prerequisites

  • Foundry installed
  • Node.js and npm/yarn
  • Ethereum wallet with testnet ETH

๐Ÿš€ Installation & Setup

# Clone the golden repository
git clone https://github.com/Teyik0/gold-bridge-vault.git
cd gold-bridge-vault

# Install dependencies
forge install

# Set up environment variables
cp .env.template .env
# Edit .env with your configuration

๐Ÿงช Testing Suite

# Run comprehensive tests
forge test -vv

# Generate coverage report
forge coverage --ir-minimum

# Detailed coverage analysis
forge coverage --report debug > report.log --ir-minimum

๐Ÿš€ Deployment

# Load environment variables
source .env

# Deploy to testnet (remove --broadcast for dry run)
forge script script/GoldTokenCCIP.s.sol:GoldTokenCCIPScript \
  --rpc-url $RPC_URL \
  --sender $PUBLIC_WALLET_ADDRESS \
  --private-key $PRIVATE_KEY \
  -vvvv --broadcast

๐Ÿ— Smart Contract Architecture

๐Ÿ“Š GoldToken.sol

  • Minting: Convert ETH to gold-backed tokens using live prices
  • Burning: Redeem tokens for ETH (minus fees)
  • Fee Collection: 5% fee on all transactions powers the ecosystem

๐ŸŒ‰ GoldTokenCCIP.sol

  • Bridge Function: Transfer tokens to BNB Chain
  • Gas Efficiency: Optimized for minimal transaction costs
  • Security: Built-in balance and address validation

๐ŸŽฐ GoldTokenLottery.sol

  • Entry System: Pay entry fee to participate
  • Random Selection: Chainlink VRF ensures fairness
  • Prize Distribution: Automated winner selection and payout

๐Ÿ“ˆ Supported Networks

Network Status Chain ID Features
๐Ÿ”ต Ethereum Sepolia โœ… Active 11155111 Full functionality
๐ŸŸฃ Polygon Mainnet โœ… Ready 137 Production ready
๐ŸŸก BNB Chain ๐Ÿ”„ Bridge Target Various CCIP destination

๐Ÿ”ง Environment Configuration

# Required environment variables
FCT_PLUGIN_PATH=         # Foundry plugin path
ETH_URL=                 # Ethereum RPC URL
RPC_URL=                 # Primary RPC endpoint
PRIVATE_KEY=             # Deployment private key
PUBLIC_WALLET_ADDRESS=   # Deployer address
ROOT=                    # Project root directory
CHAINLINK_CONTAINER_NAME= # Docker container name
COMPOSE_PROJECT_NAME=    # Docker compose project

๐ŸŽฏ Use Cases

๐Ÿ‘จโ€๐Ÿ’ผ For Investors

  • ๐Ÿ’ฐ Hedge Against Inflation: Digital gold exposure
  • ๐ŸŒ Global Access: Trade gold 24/7 from anywhere
  • ๐Ÿ”„ Liquidity: Easy conversion between ETH and gold

๐Ÿข For DeFi Protocols

  • ๐Ÿค Integration: Add gold-backed assets to your protocol
  • ๐Ÿ“Š Stability: Non-correlated asset for portfolio diversification
  • ๐ŸŒ‰ Multi-Chain: Expand across different blockchains

๐ŸŽฎ For Users

  • ๐ŸŽฐ Entertainment: Participate in fair lottery games
  • ๐Ÿ’Ž Rewards: Earn from ecosystem fees
  • ๐Ÿš€ Innovation: Experience cutting-edge DeFi technology

๐Ÿ›ก Security Features

  • โœ… Reentrancy Protection: ReentrancyGuard implementation
  • โœ… Oracle Security: Chainlink price feed validation
  • โœ… Access Control: ConfirmedOwner pattern
  • โœ… Input Validation: Comprehensive parameter checking
  • โœ… Test Coverage: Extensive testing suite

๐Ÿ“Š How It Works

1. ๐Ÿ… Mint Gold Tokens

// Send ETH, get gold-backed tokens
goldToken.mint{value: 1 ether}();

2. ๐ŸŒ‰ Bridge to BNB Chain

// Bridge tokens across chains
goldTokenCCIP.bridgeToBNBChain(recipient, amount);

3. ๐ŸŽฒ Join the Lottery

// Enter lottery with collected fees
goldTokenLottery.enterLottery{value: entryFee}();

๐Ÿ’ก Why Choose GoldBridge?

  • ๐Ÿ† First-of-its-kind: Revolutionary gold-backed DeFi protocol
  • ๐Ÿ”ฎ Future-Proof: Built for multi-chain ecosystem
  • ๐Ÿ’ช Community-Driven: Rewards shared with participants
  • ๐Ÿš€ Innovation Leader: Cutting-edge Chainlink integrations
  • ๐Ÿ›ก๏ธ Security Focused: Audited and battle-tested code

๐Ÿค Contributing

We welcome contributions! Please see our contributing guidelines:

  1. ๐Ÿด Fork the repository
  2. ๐ŸŒฟ Create a feature branch
  3. ๐Ÿ’ป Write tests for new functionality
  4. ๐Ÿ“ Submit a pull request

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿšจ Disclaimer

โš ๏ธ Important: This is experimental DeFi technology. Please understand the risks before using. Always do your own research and never invest more than you can afford to lose.


โšก Ready to revolutionize digital gold? Start building with GoldBridge Vault today! ๐Ÿš€

Built with โค๏ธ using Chainlink, OpenZeppelin, and Foundry

About

Transform your crypto into real gold-backed tokens and bridge them across chains with cutting-edge DeFi technology

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published