Transform your crypto into real gold-backed tokens and bridge them across chains with cutting-edge DeFi technology ⚡
- 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
- 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
- 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
| 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 |
- Foundry installed
- Node.js and npm/yarn
- Ethereum wallet with testnet ETH
# 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# Run comprehensive tests
forge test -vv
# Generate coverage report
forge coverage --ir-minimum
# Detailed coverage analysis
forge coverage --report debug > report.log --ir-minimum# 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- 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
- Bridge Function: Transfer tokens to BNB Chain
- Gas Efficiency: Optimized for minimal transaction costs
- Security: Built-in balance and address validation
- Entry System: Pay entry fee to participate
- Random Selection: Chainlink VRF ensures fairness
- Prize Distribution: Automated winner selection and payout
# 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- 💰 Hedge Against Inflation: Digital gold exposure
- 🌍 Global Access: Trade gold 24/7 from anywhere
- 🔄 Liquidity: Easy conversion between ETH and gold
- 🤝 Integration: Add gold-backed assets to your protocol
- 📊 Stability: Non-correlated asset for portfolio diversification
- 🌉 Multi-Chain: Expand across different blockchains
- 🎰 Entertainment: Participate in fair lottery games
- 💎 Rewards: Earn from ecosystem fees
- 🚀 Innovation: Experience cutting-edge DeFi technology
- ✅ Reentrancy Protection: ReentrancyGuard implementation
- ✅ Oracle Security: Chainlink price feed validation
- ✅ Access Control: ConfirmedOwner pattern
- ✅ Input Validation: Comprehensive parameter checking
- ✅ Test Coverage: Extensive testing suite
// Send ETH, get gold-backed tokens
goldToken.mint{value: 1 ether}();// Bridge tokens across chains
goldTokenCCIP.bridgeToBNBChain(recipient, amount);// Enter lottery with collected fees
goldTokenLottery.enterLottery{value: entryFee}();- 🏆 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
We welcome contributions! Please see our contributing guidelines:
- 🍴 Fork the repository
- 🌿 Create a feature branch
- 💻 Write tests for new functionality
- 📝 Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
Built with ❤️ using Chainlink, OpenZeppelin, and Foundry
