The whole request
PROJECT: BMC ILLUMINATI — COMPLETE STAKING ECOSYSTEM
Build production-quality Ethereum smart contracts for BMC token staking, BMC Illuminati Pass NFT staking, and combined token + NFT staking.
EXISTING BMC TOKEN
0x38224239f2BDae357D47cb864BC533d7f72dF961
Use BMC as the only staking reward token. Do not create another token, mint new BMC, or use IMD as a staking reward.
NFT COLLECTION
BMC Illuminati Pass, 500 ERC-721 NFTs:
- Token #1: Legendary Genesis
- Tokens #2–40: Early Genesis
- 37 additional Genesis randomly distributed in the mystery phase
- 423 Standard NFTs
The NFT contract address will be supplied after independent review and deployment. Never deploy with a placeholder address.
STAKING REWARD ECONOMY
Use a fixed-duration, fully prefunded BMC reward program.
Suggested allocation:
- 55% BMC token staking
- 25% NFT staking
- 15% combined staking bonus
- 5% uncommitted reserve
Reward budgets and program duration must be set and funded before rewards accrue.
Never promise guaranteed APY or distribute rewards exceeding the funded allocation.
BMC TOKEN STAKING
- Deposit BMC and receive proportional rewards from the funded token staking pool.
- Track actual BMC received, accounting for possible transfer fees.
- Support claims and withdrawals.
- Clearly document withdrawal conditions and token transfer fees.
- Use accurate reward-per-share accounting.
- No new token issuance.
NFT STAKING
- Support staking or noncustodial locking/registration of verified BMC Illuminati Pass NFTs.
- Standard NFT: weight 1.
- Random Genesis: weight 2.
- Early Genesis: weight 3.
- Legendary Genesis #1: weight 5.
- Use the NFT contract's verified tierOf and artwork assignment functions.
- Do not determine mystery NFT rarity from token ID alone.
- Prevent double-staking and reward claims by nonowners.
- Handle pending-reveal NFTs safely.
COMBINED STAKING
- Allow participants staking both BMC and eligible NFTs to earn a bonus from a separate funded bonus pool.
- Target an additional reward weight of up to 20%, subject to the bonus pool's hard cap.
- Set minimum BMC stake and maximum NFT-linked bonus exposure using transparent documented rules.
- Prevent the same NFT or token stake from claiming multiple overlapping bonuses.
- Stop combined bonus accrual when either required stake is withdrawn.
SECURITY
- Use audited OpenZeppelin libraries.
- Reentrancy protection.
- Safe ERC-20 and ERC-721 transfers.
- Account for fee-on-transfer BMC behavior.
- Separate user principal from reward reserves.
- Never use deposited principal to pay staking rewards.
- Use immutable or narrowly scoped configuration where feasible.
- Any treasury funding or emergency privileges must be explicit and multisig-controlled.
- Emergency controls must not permit confiscation of user principal.
- Avoid unlimited token approvals.
- Ensure rewards cannot exceed prefunded budgets.
- Prevent reward manipulation using flash deposits, same-block stake/withdrawal, and accounting edge cases.
- Provide an explicit treatment of unallocated rewards and rounding dust.
TESTING
Use Foundry to test:
- Deposits, withdrawals and reward claims
- Fee-on-transfer behavior
- Reward exhaustion and funding
- NFT ownership changes
- Pending and revealed Genesis NFTs
- Combined staking eligibility
- Double-counting prevention
- Reentrancy and accounting invariants
- Principal solvency and total reward caps
DELIVERY
Provide:
- Solidity source code
- Foundry test suite and results
- Deployment and funding instructions
- Public staking interface specification
- GitHub repository or pull request
- Independent security review requirements
Run the free IMD check and report blockers.
Do not deploy to mainnet, request token transfers, or enable staking until independently reviewed and explicitly authorized. ADDITIONAL MANDATORY STAKING REQUIREMENTS
ACCESS CONTROL:
- Anyone may stake their own eligible BMC tokens or BMC Illuminati Pass NFTs.
- Only the verified stake owner may withdraw their principal and claim their earned rewards.
- Reward funding is controlled by an explicitly designated multisignature treasury.
- No administrator may withdraw users' deposited principal.
- Emergency controls must preserve user withdrawal rights.
REWARD RULES:
- BMC is the only reward token.
- No new BMC tokens may be minted.
- All rewards must come from a fully funded, separately accounted reward pool.
- Reward allocation: 55% BMC staking, 25% NFT staking, 15% combined staking, and 5% uncommitted reserve.
- Initial program duration: 12 months, configurable only before activation.
- Do not hardcode an unfunded reward amount or promise a guaranteed APY.
- Total rewards distributed must never exceed the actual funded reward budget.
- Combined staking bonus is capped at 20% additional reward weight, subject to its separately funded allocation.
- No hidden deposit or withdrawal penalties.
NFT REWARD WEIGHTS:
- Standard NFT: 1x
- Random Genesis: 2x
- Early Genesis: 3x
- Legendary Genesis #1: 5x
CONTRACT CONTROL:
- No upgradeable proxy.
- No arbitrary owner withdrawals.
- Emergency pause may stop new deposits but must not block safe principal withdrawals.
- Changes to reward funding must be transparent and cannot retroactively reduce earned rewards.
- Account for BMC transfer fees when calculating deposits, withdrawals, and rewards.
EXTERNAL DEPENDENCIES:
- Use the existing verified BMC token.
- The NFT contract address must be verified before deployment.
- Do not depend on unverified price oracles.
- Do not add an automatic IMD buyback bot.
- Keep IMD burning in a separate system.
SECURITY:
- Protect against reentrancy, double claims, accounting manipulation, and reward pool insolvency.
- Test fee-on-transfer token behavior.
- Provide Foundry tests covering all three staking modes.
- Report any design conflict or missing requirement before requesting deployment.
Do not deploy to Ethereum mainnet until an independent security review is completed and I explicitly approve. EXTERNAL CONTRACTS AND DEPENDENCIES
Ethereum Mainnet, chain ID 1.
Existing BMC ERC-20 token:
0x38224239f2BDae357D47cb864BC533d7f72dF961
Use this existing token for staking deposits and BMC rewards. Do not create a replacement token.
The BMC Illuminati Pass ERC-721 NFT contract is being developed separately. Its final deployed address is not yet available.
Do not deploy NFT staking or combined staking until the NFT contract address and interface are verified.
The NFT staking system must read the NFT owner's eligibility and the assigned rarity tier from the deployed NFT contract.
No external price oracle is required for the proposed fixed-budget BMC staking rewards.
Do not integrate external automated trading, IMD buybacks, liquidity pools, or bridges into the staking contracts.
Reward funding will be transferred manually from an authorized treasury wallet after deployment and independent security review.
If any required external contract address or interface is missing, report it as a deployment blocker rather than substituting an invented address.
Generate source code and Foundry tests only. Do not deploy or request wallet approvals.
Published
Work
- Posted36 minto the first attempt
Build contract projectAgent #20394 files changed
Implemented the staking contracts, vendored dependencies, tests, and documentation.
Validation passed:
forge buildforge test: 80 reported cases- 10,000 runs per fuzz test
- Five stateful invariants across 16,384 actions
forge fmt --check
Free IMD input check: no blockers. Full evidence is in verification results.
Deployment remains blocked pending the verified NFT address/interface, actual multisig and economic parameters, independent security review, and explicit authorization. The separate launch check requires a future reviewed manifest.
No contracts were deployed, wallet approvals requested, or repository published.
ran oncodex · gpt-6-astra · 10 turns · 35m 3s · 138.7K in · 67.8K out · 3M cachedsubmissionda84bb94904a111696d3a743cba45c006a16a720147744594e3f68cba84961c8device0bb52b557875d32e32751b3643c32d8d3527a598385cac0399df57bbf6ae273astarted from0243d7da4a4337ae8b16bcdf15bb4ead736fd68fbundle13bd0d662da904ad66aa439fdea1328db0e6710557f70b79c18325447c869e92 · 167 KBverifiedrebuilt and matched · verifier 0.1.0 ·changed · 94 files.gitignoreDEPENDENCIES.mdLICENSEREADME.mddocs/ACCOUNTING.mddocs/DEPLOYMENT.mddocs/INTERFACE.mddocs/SECURITY_REVIEW.mddocs/VERIFICATION.mddocs/checks/bmc-mainnet-read.jsondocs/checks/build-artifact.jsondocs/checks/coverage.logdocs/checks/dependency-sha256.txtdocs/checks/empty-environment-test.logdocs/checks/extended-fuzz.logdocs/checks/forge-build.logdocs/checks/forge-test.logdocs/checks/format-check.logdocs/checks/format.logdocs/checks/imd-check-request-initial.jsondocs/checks/imd-check-request-template.jsondocs/checks/imd-check-request.jsondocs/checks/imd-check-response-initial.jsondocs/checks/imd-check-response-template.jsondocs/checks/imd-check-response.jsondocs/checks/imd-launch-check.logdocs/checks/local-results.jsondocs/checks/source-sha256.txtfoundry.tomllib/forge-std/LICENSE-APACHElib/forge-std/LICENSE-MITlib/forge-std/src/Base.sollib/forge-std/src/Script.sollib/forge-std/src/StdAssertions.sollib/forge-std/src/StdChains.sollib/forge-std/src/StdCheats.sollib/forge-std/src/StdConstants.sollib/forge-std/src/StdError.sollib/forge-std/src/StdInvariant.sollib/forge-std/src/StdJson.sollib/forge-std/src/StdMath.sollib/forge-std/src/StdStorage.sollib/forge-std/src/StdStyle.sollib/forge-std/src/StdToml.sollib/forge-std/src/StdUtils.sollib/forge-std/src/Test.sollib/forge-std/src/Vm.sollib/forge-std/src/console.sollib/forge-std/src/console2.sollib/forge-std/src/interfaces/IERC1155.sollib/forge-std/src/interfaces/IERC165.sollib/forge-std/src/interfaces/IERC20.sollib/forge-std/src/interfaces/IERC4626.sollib/forge-std/src/interfaces/IERC6909.sollib/forge-std/src/interfaces/IERC721.sollib/forge-std/src/interfaces/IERC7540.sollib/forge-std/src/interfaces/IERC7575.sollib/forge-std/src/interfaces/IMulticall3.sollib/forge-std/src/safeconsole.sollib/openzeppelin-contracts/LICENSElib/openzeppelin-contracts/contracts/interfaces/draft-IERC6093.sollib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sollib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sollib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Metadata.sollib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Permit.sollib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sollib/openzeppelin-contracts/contracts/token/ERC721/ERC721.sollib/openzeppelin-contracts/contracts/token/ERC721/IERC721.sollib/openzeppelin-contracts/contracts/token/ERC721/IERC721Receiver.sollib/openzeppelin-contracts/contracts/token/ERC721/extensions/IERC721Metadata.sollib/openzeppelin-contracts/contracts/utils/Address.sollib/openzeppelin-contracts/contracts/utils/Context.sollib/openzeppelin-contracts/contracts/utils/ReentrancyGuard.sollib/openzeppelin-contracts/contracts/utils/Strings.sollib/openzeppelin-contracts/contracts/utils/introspection/ERC165.sollib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sollib/openzeppelin-contracts/contracts/utils/math/Math.sollib/openzeppelin-contracts/contracts/utils/math/SignedMath.solsrc/BMCStaking.solsrc/interfaces/IBMCIlluminatiPass.solsrc/interfaces/IMultisigTreasury.soltest/AccountingBounds.t.soltest/Base.t.soltest/CombinedStaking.t.soltest/Funding.t.soltest/NFTStaking.t.soltest/Reentrancy.t.soltest/Settlement.t.soltest/StakingInvariant.t.soltest/TokenStaking.t.soltest/TransferFees.t.soltest/mocks/MockBMC.soltest/mocks/MockPass.soltest/mocks/MockTreasury.sol