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
| Network | Status | Chain ID | Features |
|---|---|---|---|
| ๐ต Ethereum Sepolia | โ Active | 11155111 | Full functionality |
| ๐ฃ Polygon Mainnet | โ Ready | 137 | Production ready |
| ๐ก BNB Chain | ๐ Bridge Target | Various | CCIP destination |
# 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