Smart contracts powering the Vertix decentralized marketplace for digital assets.
Vertix is a decentralized marketplace where people can buy and sell digital assets securely. Unlike traditional online marketplaces, Vertix uses blockchain technology to ensure transparent, trustless transactions without relying on a central authority.
- NFTs (Digital Collectibles): Unique digital items like art, music, or collectibles
- Social Media Accounts: Verified social media profiles with established followers
- Gaming Accounts: Accounts from popular games with progress, items, or achievements
- Websites and Domains: Digital properties with existing traffic or value
- Etc
Think of Vertix as an online marketplace with built-in security features:
-
Escrow Protection: When you buy something, your payment is held safely in escrow (like a digital safe) until you receive what you purchased. This protects both buyers and sellers.
-
Verification System: Digital assets are verified before sale to ensure authenticity. For example, social media accounts are checked to confirm ownership.
-
Smart Contracts: These are like automated agreements that execute themselves when conditions are met. No middleman needed - the code handles everything fairly and transparently.
-
Transparent Fees: A small 2.5% platform fee is charged on sales. Creators can also earn royalties on resales of their items.
-
Blockchain Security: All transactions are recorded on the blockchain (a permanent, transparent ledger), making them secure and tamper-proof.
- Trustless: You don't need to trust the other person or a company - the smart contract ensures fair execution
- Transparent: All transactions are publicly visible on the blockchain
- Permanent: Once recorded, transaction history cannot be altered or deleted
- Decentralized: No single company controls the marketplace
- Lower Fees: By removing intermediaries, costs are reduced
Vertix is built on Ethereum-compatible blockchains (Base and Polygon*) using Solidity smart contracts. The system is designed with security, gas efficiency, and modularity as top priorities.
Clone the repository and install dependencies:
git clone https://github.com/Vertix-platform/vertix-contract-v2
cd vertix-contract-v2
forge installCompile all smart contracts:
forge buildRun the complete test suite:
forge testRun tests with detailed output:
forge test -vvvRun tests with gas reporting:
forge test --gas-reportRun specific test file:
forge test --match-path test/unit/MarketplaceCore.t.solFormat all Solidity files:
forge fmtCheck formatting without changes:
forge fmt --checksrc/
├── access/ # Access control and role management
├── core/ # Core marketplace functionality
├── escrow/ # Escrow contracts
├── interfaces/ # Contract interfaces
├── libraries/ # Shared libraries
├── nft/ # NFT implementations (ERC-721, ERC-1155)
└── verification/ # Verification logic
Every contract follows security best practices:
- OpenZeppelin's battle-tested libraries
- Reentrancy guards on all fund transfers
- Comprehensive input validation
- Emergency pause functionality
- Extensive test coverage
Designed for cost-efficient transactions:
- Optimized storage layout
- Batch operations support
- Efficient data structures
- Minimal on-chain storage
Clean separation of concerns:
- Interface-driven design
- Loosely coupled components
- Reusable libraries
- Easy to test and maintain
- Platform Fee: 2.5% (250 basis points) on all sales
- Creator Royalties: Configurable per NFT collection (standard is 5-10%)
- Gas Fees: Paid by transaction initiator (standard blockchain cost)
Fees are automatically calculated and distributed by the FeeDistributor contract.
- NFTs: Full ERC-721 and ERC-1155 support with royalties
- Social Media Accounts: Hash-based verification with transfer locks
- Gaming Accounts: Verified through platform-specific proofs
- Websites: Domain ownership verification
We maintain high test coverage (90%+) with:
- Unit Tests: Test individual functions in isolation
- Integration Tests: Test complete user workflows
- Fuzz Tests: Test with random inputs to find edge cases
- Invariant Tests: Verify system properties always hold true
Example test naming convention:
test_createListing_Success()- Happy pathtest_createListing_RevertIf_UnauthorizedSeller()- Error case
When contributing to this project:
- Follow the existing code style and structure
- Write comprehensive tests for new features
- Add NatSpec documentation to all public functions
- Ensure all tests pass before submitting
- Run gas optimization checks
- Update this README if adding major features
MIT License
RoleManager: 0xB30aE8fC2d03c0CC1668a33f7043e782C6335DF2 FeeDistributor: 0xa4A507773c5C3fAABA00D2D6b10e13629C8CDb5A VerificationRegistry: 0x851f1045Db2e5bAB654b261042F9c0cf58f679d3 ReputationManager: 0xC2aD9767ce87d3Fe355E64e57Ca02740E79F5476 EscrowManager: 0xbB71Cf484B68BC6C76C98337cc3630b44d7d61de NFTFactory: 0xAC15e9FdD7FF06dA3Ac4A5d1B40Ee18CC990AE9d NFT721 Implementation: 0x1e3549B54CAA15286075DE77D236224A703d0d7E NFT1155 Implementation: 0x27cD961783589481C230B949afDfE6cFDb74B2f8 VertixSinglesNFT721 (Shared Collection): 0x95a961239BaFF966C87C454e2c3c3be618DEa760 VertixSinglesNFT1155 (Shared Editions): 0x7b303BB4542eBe35A8276A60f0d4A7C36b654b30 SinglesNFTHelper (Mint & List Helper): 0xd97e2A3C83fa92BF48DcF54617d01af9146897c8 NFTMarketplace: 0xd5836EA3908fAAE86Ae4cBB1b1f1e81Fd3d7c506 MarketplaceCore: 0xeAA57c46cE1D692De22d122b4f94c9676A3a7Ac8 OfferManager: 0x769Af84Ce8023911b77bbD8e1cd15AD57c1B8FdF AuctionManager: 0xf01d765a6cb96C767A67541884531B02A4ADCF7B
cast send <ROLEMANAGER_ADDRESS> "executeRoleGrant(bytes32,address)" <ARBITRATOR_ROLE_HASH> <ADMIN_ADDRESS> --rpc-url <RPC_URL> --private-key <PRIVATE_KEY>
cast keccak "ARBITRATOR_ROLE" cast keccak "VERIFIER_ROLE"