{"id":30827522,"url":"https://github.com/praneshasp/marble-core","last_synced_at":"2025-09-06T13:13:43.433Z","repository":{"id":256026805,"uuid":"849203014","full_name":"PraneshASP/marble-core","owner":"PraneshASP","description":"Core smart contracts for the Marble protocol. ","archived":false,"fork":false,"pushed_at":"2024-09-08T14:30:23.000Z","size":167,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"feat/lz-integration-v2","last_synced_at":"2024-12-03T16:21:17.597Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Solidity","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PraneshASP.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-29T06:57:46.000Z","updated_at":"2024-09-09T00:44:39.000Z","dependencies_parsed_at":"2024-09-08T16:34:22.254Z","dependency_job_id":"e5430f06-4bcf-40b8-b2b5-d23781abc5c9","html_url":"https://github.com/PraneshASP/marble-core","commit_stats":null,"previous_names":["praneshasp/marble-core"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/PraneshASP/marble-core","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PraneshASP%2Fmarble-core","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PraneshASP%2Fmarble-core/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PraneshASP%2Fmarble-core/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PraneshASP%2Fmarble-core/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PraneshASP","download_url":"https://codeload.github.com/PraneshASP/marble-core/tar.gz/refs/heads/feat/lz-integration-v2","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PraneshASP%2Fmarble-core/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273908782,"owners_count":25189196,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-06T02:00:13.247Z","response_time":2576,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-09-06T13:13:32.500Z","updated_at":"2025-09-06T13:13:43.424Z","avatar_url":"https://github.com/PraneshASP.png","language":"Solidity","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Marble - Omnichain Tokenbound Subscription Protocol\n\n## Introduction\n\nThis project implements an omnichain subscription system controlled by NFTs, utilizing ERC6551 tokenbound accounts and LayerZero V2 for cross-chain communication. It allows creators to manage subscriptions across multiple blockchains from a single NFT on a base chain.\n\n## Architecture Overview\n\n```mermaid\ngraph TB\n    subgraph \"Base Chain\"\n        A[CreatorNFT Contract]\n        B[Creator NFT]\n        F[LayerZero Endpoint]\n        A --\u003e|Mints| B\n        A \u003c--\u003e|Uses| F\n    end\n    \n    subgraph \"Chain A\"\n        G[CustomRegistry A]\n        C[PaymentModule A]\n        G --\u003e|Deploys| C\n    end\n    \n    subgraph \"Chain B\"\n        H[CustomRegistry B]\n        D[PaymentModule B]\n        H --\u003e|Deploys| D\n    end\n    \n    subgraph \"Chain C\"\n        I[CustomRegistry C]\n        E[PaymentModule C]\n        I --\u003e|Deploys| E\n    end\n    \n    B --\u003e|Controls| C\n    B --\u003e|Controls| D\n    B --\u003e|Controls| E\n    \n    F \u003c--\u003e|_lzSend| G\n    F \u003c--\u003e|_lzSend| H\n    F \u003c--\u003e|_lzSend| I\n    \n    J[User] --\u003e|Mints/Manages| A\n    J --\u003e|Subscribes| C\n    J --\u003e|Subscribes| D\n    J --\u003e|Subscribes| E\n   ```\n    \n## Key Components\n\n1. **CreatorNFT Contract**: \n   - Deployed on the base chain\n   - Manages NFT minting and controls cross-chain operations\n   - Initiates deployment of PaymentModules on other chains\n\n2. **PaymentModule Contract**:\n   - Implements ERC6551 Account interface\n   - Manages subscriptions on its specific chain\n   - Can be deployed on multiple chains\n\n3. **CustomRegistry Contract**:\n   - Deployed on each chain\n   - Handles PaymentModule deployment and cross-chain message processing\n   - Inherits from ERC6551Registry for tokenbound account creation\n\n4. **LayerZero Integration**:\n   - Facilitates cross-chain communication\n   - Enables omnichain subscription management\n\n\n## Key Features\n\n1. **Single Point of Control**: CreatorNFT on the base chain controls all PaymentModules across different chains.\n2. **Unified Subscription Management**: Users manage subscriptions on any chain through the CreatorNFT contract.\n3. **Cross-Chain Subscription Validation**: Services can validate subscriptions on any chain via the CreatorNFT contract.\n4. **Flexible Deployment**: Creators can deploy PaymentModules to new chains as needed.\n\n## Subscription Tier Examples\n\nUsers can subscribe to these different tiers using the `subscribe` function:\n\n- Monthly Subscription:\n\n```solidity\ncreateTier(1 ether, 30 days);\n```\n\nThis creates a tier with a price of 1 ETH and a duration of 30 days.\n\n- Quarterly Subscription:\n\n```solidity\ncreateTier(2.5 ether, 90 days);\n```\n\n\n\n- Annual Subscription:\n\n```solidity\ncreateTier(7.5 ether, 365 days);\n```\n\n\n\n- Lifetime Subscription:\n\n```solidity\ncreateTier(12.5 ether, 36500 days);\n```\n\nThis creates a tier with a price of 12.5 ETH and a duration of 100 years (effectively lifetime).\n\n## Future Improvement Ideas\n\n1. **Multi-Token Support**: Enable subscriptions to be purchased with various ERC20 tokens across different chains with price oracle integration.\n\n2. **Subscription Streaming**: Integrate with protocols like Sablier to enable real-time streaming of subscription payments.\n\n3. **Automated Subscription Management**: Integrate Chainlink Keepers or Gelato for automated subscription renewals and cancellations.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpraneshasp%2Fmarble-core","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpraneshasp%2Fmarble-core","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpraneshasp%2Fmarble-core/lists"}