Official Smart Contract Source Code for Doomsday Ark - deployed and verified on BNB Smart Chain
A DeFi game built on BNB Smart Chain (BSC) using the EIP-2535 Diamond Standard for upgradeable smart contracts. This is the primary production deployment targeting BSC Mainnet (Chain ID: 56).
- Blockchain: BNB Smart Chain (primary) + EVM-compatible chains
- Smart Contracts: Solidity ^0.8.27
- Architecture: EIP-2535 Diamond Standard (modular upgradeable proxy)
- Development: Hardhat, OpenZeppelin libraries
- Security: UUPS upgradeable vaults, role-based access control, reentrancy protection
| Network | Chain ID | Description |
|---|---|---|
| BNB Smart Chain Mainnet | 56 | Production deployment |
| BNB Smart Chain Testnet | 97 | Test deployment |
| Sepolia | 11155111 | Testnet deployment |
| Localhost | 31337 | Local development |
Core Contracts
| Contract | Address | Verified |
|---|---|---|
| Diamond (Main Proxy) | 0x10aa928b98E92D88723c31f6B387cFAa14D1EcD8 |
✅ |
| DiamondCutFacet | 0xf65a05546904F70E3AD4fB29417a13fC62a245B2 |
✅ |
| DiamondInit | 0x5d464Ad79c77D07f3Ef38E47c9C5F04Ffb7aA73f |
✅ |
Vault Contracts (UUPS Proxy)
| Contract | Proxy Address | Implementation |
|---|---|---|
| GameVault | 0xC7bd47F269B1522950a222847185465286DecECe |
0xc501afc84bb94bb7e1c468ffe011f9d27f6bc7dc ✅ |
| OperationsVault | 0x87e939585F99f83D2953b42EF4b7d76E1646B5D9 |
0xc501afc84bb94bb7e1c468ffe011f9d27f6bc7dc ✅ |
Diamond Facets
| Facet | Address | Verified |
|---|---|---|
| DiamondLoupeFacet | 0x7aC23d16c84e67278834A91e5C15C10A435427dd |
✅ |
| OwnershipFacet | 0xd5E86cFa0F2bd5FA69D4681EfB84Ab08F84203c6 |
✅ |
| AdminFacet | 0xA064C585C5189E98DE4e60f9487b80CaB5a90819 |
✅ |
| LifecycleFacet | 0x156F07b9f4E3cfb27F40b826F5fEdFED7904B867 |
✅ |
| PurchaseFacet | 0x3529e8DC2D229217387259c32DfF96C4acC5AD8A |
✅ |
| RewardFacet | 0x19F250ee9eEd2d1FBac7Ba056F63824e5bAf787D |
✅ |
| ReinvestFacet | 0x4cAB68276E9e53747fac422D3e318727508D0B60 |
✅ |
| ExitFacet | 0xB11abb8B794626A9bF5E25BB67Bf29DEc902E494 |
✅ |
| ViewFacet | 0x31b63447902C50788D7c5c2492e408FB5D2193f9 |
✅ |
| FundraisingFacet | 0x86b6069634A8D01823a970E8B6a618cA4a9828e8 |
✅ |
| CandyTapFacet | 0xb1f0D291059C8113594a828E1EB8Db117608693c |
✅ |
| OperationsFacet | 0x701c8Db5dfa030b64e2f62c4Fc9d1F27B7D5c918 |
✅ |
All contracts verified on Sourcify | View on BscScan
Core Contracts
| Contract | Address | Verified |
|---|---|---|
| United Stables (U) | 0x2Ae938053c112Bd81042043945d142e208b50a66 |
✅ |
| Diamond (Main Proxy) | 0x6FbdDAC50F7C34A877Fc175637552069D6370B3d |
✅ |
| DiamondCutFacet | 0xc0279563b9e4B619b399dD9f640b844811cfD089 |
✅ |
| DiamondInit | 0xFafD76960C0da95c85437C055Be5567F12EFEfB7 |
✅ |
Vault Contracts (UUPS Proxy)
| Contract | Proxy Address | Implementation |
|---|---|---|
| GameVault | 0x611A2dbAB17ebdbDDBB65C6f1B4688C0d570bD7c |
0xc501afc84bb94bb7e1c468ffe011f9d27f6bc7dc ✅ |
| OperationsVault | 0x1B88133761fF268b5D0B0e368209De0E47F680D8 |
0xc501afc84bb94bb7e1c468ffe011f9d27f6bc7dc ✅ |
Diamond Facets
| Facet | Address | Verified |
|---|---|---|
| DiamondLoupeFacet | 0x7ed17e54e6d1988749cB6114C29DD3B2A0BD5dd4 |
✅ |
| OwnershipFacet | 0x16bc427DDcee1b6C1dCDF38b86fe5f0cEe378b06 |
✅ |
| PurchaseFacet | 0x411C3B756dCC753aD850A0415c087D4674F0d557 |
✅ |
| RewardFacet | 0xbFB48BbA2fe4881187364dd7Cf6855c11C307d8A |
✅ |
| AdminFacet | 0x82c1b700782dee8f4cf18699918a2C14B89bF3CA |
✅ |
| LifecycleFacet | 0x554Aa1E6c9732CcbAC8F027243e33cEC27137De1 |
✅ |
| ViewFacet | 0x122F463B24ef054990bb6713Bd4807A26C217187 |
✅ |
| ReinvestFacet | 0x356966538B2D76A799AD6F22C2a88Ae4b6524D8C |
✅ |
| ExitFacet | 0x59cEDa9C20DBECAe24F9B7ecab96Ea41c786b242 |
✅ |
| CandyTapFacet | 0x3b05461b27D34cA0EA146C824FE89A1fADfd57F7 |
✅ |
| FundraisingFacet | 0xc45044bE3283ac303f10C25c204d03616C96C8C7 |
✅ |
| OperationsFacet | 0x7560A35E0c0C17040Ffd337677598A1e881D8060 |
✅ |
Core Contracts
| Contract | Address |
|---|---|
| Diamond (Main Proxy) | 0xaC116826947a95e24B16Dd069675E6CD07504a03 |
| DiamondCutFacet | 0xFbF7e3b274Ca703868e8C83f7d8C96BC36c508B3 |
| DiamondInit | 0x97beFcE98Eb289ad07B83c6B958b37A2A04c787a |
Vault Contracts (UUPS Proxy)
| Contract | Address |
|---|---|
| GameVault | 0x3e5F1b8f92BF70b9e70be97459c66E05bC2fe112 |
| OperationsVault | 0xaBe06099026FbA7923283Fc8FFaeE916F9289e7F |
Diamond Facets
| Facet | Address |
|---|---|
| DiamondLoupeFacet | 0x4CB1Ab611EfDBe5F6EaDE29759841Fbc4a21769e |
| OwnershipFacet | 0x510ea43d54d50f902B74569cdf86A7BfEB91e9aD |
| AdminFacet | 0x29bCCc91b664AaC7CC5937090415D06A934A3B6B |
| LifecycleFacet | 0xA7c5F8777D00C94848d3290be7B586fF555b0460 |
| PurchaseFacet | 0x09F7fd26970A557594ee5B3D409a7A259De0B2f3 |
| RewardFacet | 0xd3C40b2d2e82758997786D94EAb6AA73f4815dFD |
| ReinvestFacet | 0x15D1a9A01b7Ba6afb188E045c6e16A4A4Bef4068 |
| ExitFacet | 0xec891e12F621E4361311Aea2Cb7948A9711D382A |
| ViewFacet | 0xb0Eb6a81dFa4828b00E34a2F99f51Ab7cE138c6D |
| FundraisingFacet | 0x5F3eBA25f03cd06FA15F69ceb4c1FcA106CB223B |
| CandyTapFacet | 0xbC4c12834A86Afdd196f46cae031F636Ee8052E8 |
| OperationsFacet | 0x13fCdf2d42E440646C473194aF7eAB37F967f2B2 |
- Gas-efficient Diamond Architecture: Modular facet system optimized for BNB Smart Chain's low-cost transactions
- Upgradeable Design: EIP-2535 Diamond Standard allows seamless contract upgrades without migration
- Secure Vault System: UUPS proxy vaults with role-based access control (Admin, Pauser, Controller)
- DeFi Game Mechanics: Share-based rewards, multi-pool distribution, and automated lifecycle management
- Multi-tier Reward System: Construction pool, grand prize pool, period rewards, and operations allocation
src/
├── Diamond.sol # Main proxy contract (EIP-2535)
├── facets/ # Business logic modules
│ ├── PurchaseFacet.sol # Share purchase logic
│ ├── RewardFacet.sol # Reward claiming
│ ├── LifecycleFacet.sol # Round/period management
│ ├── AdminFacet.sol # Admin operations
│ └── ... # Other facets
├── libraries/ # Shared logic libraries
├── storage/ # Diamond storage structures
├── vaults/ # GameVault & OperationsVault (UUPS)
└── interfaces/ # Contract interfaces
# Install dependencies
pnpm install
# Compile contracts
pnpm compile
# Run tests
pnpm test
# Deploy to BSC Mainnet
pnpm deploy:mainnetSee scripts/README.md for detailed deployment and upgrade instructions.
- Reentrancy protection on all external calls
- Role-based access control for admin functions
- Timelock for sensitive operations
- Pausable functionality for emergency response
MIT