cyberia 3.2.5 → 3.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/engine-cyberia.cd.yml +2 -2
- package/.github/workflows/release.cd.yml +1 -2
- package/CHANGELOG.md +351 -1
- package/CLI-HELP.md +40 -13
- package/Dockerfile +0 -4
- package/README.md +242 -497
- package/bin/build.js +19 -5
- package/bin/cyberia.js +1149 -240
- package/bin/deploy.js +570 -1
- package/bin/file.js +6 -0
- package/bin/index.js +1149 -240
- package/bin/vs.js +1 -1
- package/conf.js +67 -89
- package/deployment.yaml +4 -222
- package/hardhat/package-lock.json +32 -32
- package/hardhat/package.json +3 -3
- package/jsconfig.json +1 -1
- package/manifests/cronjobs/dd-cron/dd-cron-backup.yaml +2 -2
- package/manifests/cronjobs/dd-cron/dd-cron-dns.yaml +2 -2
- package/manifests/deployment/dd-cyberia-development/deployment.yaml +4 -222
- package/manifests/deployment/dd-cyberia-development/proxy.yaml +10 -118
- package/manifests/deployment/dd-default-development/deployment.yaml +2 -6
- package/manifests/deployment/dd-test-development/deployment.yaml +136 -66
- package/manifests/deployment/dd-test-development/proxy.yaml +41 -5
- package/package.json +23 -14
- package/proxy.yaml +10 -118
- package/scripts/k3s-node-setup.sh +2 -2
- package/scripts/nat-iptables.sh +103 -18
- package/src/api/atlas-sprite-sheet/atlas-sprite-sheet.controller.js +18 -18
- package/src/api/atlas-sprite-sheet/atlas-sprite-sheet.model.js +7 -14
- package/src/api/atlas-sprite-sheet/atlas-sprite-sheet.service.js +76 -21
- package/src/api/core/core.controller.js +10 -10
- package/src/api/core/core.service.js +10 -10
- package/src/api/crypto/crypto.controller.js +8 -8
- package/src/api/crypto/crypto.service.js +8 -8
- package/src/api/cyberia-action/cyberia-action.controller.js +74 -0
- package/src/api/cyberia-action/cyberia-action.model.js +87 -0
- package/src/api/cyberia-action/cyberia-action.router.js +27 -0
- package/src/api/cyberia-action/cyberia-action.service.js +42 -0
- package/src/api/cyberia-dialogue/cyberia-dialogue.controller.js +13 -13
- package/src/api/cyberia-dialogue/cyberia-dialogue.model.js +11 -11
- package/src/api/cyberia-dialogue/cyberia-dialogue.router.js +2 -2
- package/src/api/cyberia-dialogue/cyberia-dialogue.service.js +16 -16
- package/src/api/cyberia-entity/cyberia-entity.controller.js +10 -10
- package/src/api/cyberia-entity/cyberia-entity.service.js +10 -10
- package/src/api/cyberia-instance/cyberia-fallback-world.js +19 -209
- package/src/api/cyberia-instance/cyberia-instance.controller.js +14 -14
- package/src/api/cyberia-instance/cyberia-instance.model.js +3 -0
- package/src/api/cyberia-instance/cyberia-instance.service.js +22 -57
- package/src/api/cyberia-instance/cyberia-portal-connector.js +20 -246
- package/src/api/cyberia-instance/cyberia-world-generator.js +505 -0
- package/src/api/cyberia-instance-conf/cyberia-instance-conf.controller.js +10 -10
- package/src/api/cyberia-instance-conf/cyberia-instance-conf.defaults.js +216 -55
- package/src/api/cyberia-instance-conf/cyberia-instance-conf.model.js +4 -1
- package/src/api/cyberia-instance-conf/cyberia-instance-conf.service.js +18 -14
- package/src/api/cyberia-map/cyberia-map.controller.js +10 -10
- package/src/api/cyberia-map/cyberia-map.service.js +10 -10
- package/src/api/cyberia-quest/cyberia-quest.controller.js +74 -0
- package/src/api/cyberia-quest/cyberia-quest.model.js +67 -0
- package/src/api/cyberia-quest/cyberia-quest.router.js +27 -0
- package/src/api/cyberia-quest/cyberia-quest.service.js +42 -0
- package/src/api/cyberia-quest-progress/cyberia-quest-progress.controller.js +74 -0
- package/src/api/cyberia-quest-progress/cyberia-quest-progress.model.js +49 -0
- package/src/api/cyberia-quest-progress/cyberia-quest-progress.router.js +27 -0
- package/src/api/cyberia-quest-progress/cyberia-quest-progress.service.js +42 -0
- package/src/api/default/default.controller.js +10 -10
- package/src/api/default/default.service.js +10 -10
- package/src/api/document/document.controller.js +12 -12
- package/src/api/document/document.model.js +10 -16
- package/src/api/file/file.controller.js +8 -8
- package/src/api/file/file.model.js +10 -10
- package/src/api/file/file.service.js +36 -36
- package/src/api/instance/instance.controller.js +10 -10
- package/src/api/instance/instance.model.js +4 -10
- package/src/api/instance/instance.service.js +10 -10
- package/src/api/ipfs/ipfs.controller.js +12 -12
- package/src/api/ipfs/ipfs.model.js +4 -13
- package/src/api/ipfs/ipfs.service.js +14 -28
- package/src/api/object-layer/object-layer.controller.js +12 -12
- package/src/api/object-layer/object-layer.model.js +4 -17
- package/src/api/object-layer/object-layer.service.js +12 -12
- package/src/api/object-layer-render-frames/object-layer-render-frames.controller.js +10 -10
- package/src/api/object-layer-render-frames/object-layer-render-frames.model.js +6 -16
- package/src/api/object-layer-render-frames/object-layer-render-frames.service.js +18 -14
- package/src/api/test/test.controller.js +8 -8
- package/src/api/test/test.service.js +8 -8
- package/src/api/user/guest.service.js +99 -0
- package/src/api/user/user.controller.js +6 -6
- package/src/api/user/user.model.js +8 -13
- package/src/api/user/user.service.js +3 -20
- package/src/cli/cluster.js +61 -14
- package/src/cli/db.js +47 -2
- package/src/cli/deploy.js +67 -35
- package/src/cli/fs.js +79 -8
- package/src/cli/image.js +43 -1
- package/src/cli/index.js +26 -1
- package/src/cli/release.js +57 -1
- package/src/cli/repository.js +69 -31
- package/src/cli/run.js +415 -36
- package/src/cli/ssh.js +1 -1
- package/src/cli/static.js +43 -115
- package/src/client/Cryptokoyn.index.js +18 -21
- package/src/client/CyberiaPortal.index.js +19 -23
- package/src/client/Default.index.js +21 -33
- package/src/client/Itemledger.index.js +20 -26
- package/src/client/Underpost.index.js +19 -23
- package/src/client/components/core/404.js +4 -4
- package/src/client/components/core/500.js +4 -4
- package/src/client/components/core/Account.js +73 -60
- package/src/client/components/core/AgGrid.js +23 -33
- package/src/client/components/core/Alert.js +12 -13
- package/src/client/components/core/AppStore.js +1 -1
- package/src/client/components/core/Auth.js +35 -37
- package/src/client/components/core/Badge.js +7 -13
- package/src/client/components/core/BtnIcon.js +15 -17
- package/src/client/components/core/CalendarCore.js +42 -63
- package/src/client/components/core/Chat.js +13 -15
- package/src/client/components/core/ClientEvents.js +87 -0
- package/src/client/components/core/ColorPaletteElement.js +309 -0
- package/src/client/components/core/Content.js +17 -14
- package/src/client/components/core/Css.js +15 -71
- package/src/client/components/core/CssCore.js +12 -16
- package/src/client/components/core/D3Chart.js +4 -4
- package/src/client/components/core/Docs.js +64 -91
- package/src/client/components/core/DropDown.js +69 -91
- package/src/client/components/core/EventBus.js +92 -0
- package/src/client/components/core/EventsUI.js +14 -17
- package/src/client/components/core/FileExplorer.js +96 -228
- package/src/client/components/core/FullScreen.js +47 -75
- package/src/client/components/core/Input.js +24 -69
- package/src/client/components/core/Keyboard.js +25 -18
- package/src/client/components/core/KeyboardAvoidance.js +145 -0
- package/src/client/components/core/LoadingAnimation.js +25 -31
- package/src/client/components/core/LogIn.js +41 -41
- package/src/client/components/core/LogOut.js +23 -14
- package/src/client/components/core/Modal.js +462 -178
- package/src/client/components/core/NotificationManager.js +14 -18
- package/src/client/components/core/Panel.js +54 -50
- package/src/client/components/core/PanelForm.js +25 -125
- package/src/client/components/core/Polyhedron.js +110 -214
- package/src/client/components/core/PublicProfile.js +39 -32
- package/src/client/components/core/Recover.js +48 -44
- package/src/client/components/core/Responsive.js +88 -32
- package/src/client/components/core/RichText.js +9 -18
- package/src/client/components/core/Router.js +24 -3
- package/src/client/components/core/SearchBox.js +37 -37
- package/src/client/components/core/SignUp.js +39 -30
- package/src/client/components/core/SocketIo.js +31 -2
- package/src/client/components/core/SocketIoHandler.js +6 -6
- package/src/client/components/core/ToggleSwitch.js +8 -20
- package/src/client/components/core/ToolTip.js +5 -17
- package/src/client/components/core/Translate.js +56 -59
- package/src/client/components/core/Validator.js +26 -16
- package/src/client/components/core/Wallet.js +15 -26
- package/src/client/components/core/Worker.js +163 -27
- package/src/client/components/core/windowGetDimensions.js +7 -7
- package/src/client/components/cryptokoyn/{MenuCryptokoyn.js → AppShellCryptokoyn.js} +57 -57
- package/src/client/components/cryptokoyn/CssCryptokoyn.js +15 -15
- package/src/client/components/cryptokoyn/LogInCryptokoyn.js +6 -4
- package/src/client/components/cryptokoyn/LogOutCryptokoyn.js +6 -4
- package/src/client/components/cryptokoyn/RouterCryptokoyn.js +37 -0
- package/src/client/components/cryptokoyn/SettingsCryptokoyn.js +4 -4
- package/src/client/components/cryptokoyn/SignUpCryptokoyn.js +6 -4
- package/src/client/components/cyberia/InstanceEngineCyberia.js +141 -60
- package/src/client/components/cyberia/MapEngineCyberia.js +691 -214
- package/src/client/components/cyberia/ObjectLayerEngine.js +19 -0
- package/src/client/components/cyberia/ObjectLayerEngineModal.js +1204 -94
- package/src/client/components/cyberia/ObjectLayerEngineViewer.js +196 -298
- package/src/client/components/cyberia-portal/{MenuCyberiaPortal.js → AppShellCyberiaPortal.js} +102 -102
- package/src/client/components/cyberia-portal/CommonCyberiaPortal.js +305 -61
- package/src/client/components/cyberia-portal/CssCyberiaPortal.js +15 -15
- package/src/client/components/cyberia-portal/LogInCyberiaPortal.js +6 -4
- package/src/client/components/cyberia-portal/LogOutCyberiaPortal.js +6 -4
- package/src/client/components/cyberia-portal/MainBodyCyberiaPortal.js +4 -4
- package/src/client/components/cyberia-portal/RouterCyberiaPortal.js +60 -0
- package/src/client/components/cyberia-portal/SettingsCyberiaPortal.js +4 -4
- package/src/client/components/cyberia-portal/SignUpCyberiaPortal.js +6 -4
- package/src/client/components/cyberia-portal/TranslateCyberiaPortal.js +4 -4
- package/src/client/components/default/{MenuDefault.js → AppShellDefault.js} +87 -87
- package/src/client/components/default/CssDefault.js +12 -12
- package/src/client/components/default/LogInDefault.js +6 -4
- package/src/client/components/default/LogOutDefault.js +6 -4
- package/src/client/components/default/RouterDefault.js +47 -0
- package/src/client/components/default/SettingsDefault.js +4 -4
- package/src/client/components/default/SignUpDefault.js +6 -4
- package/src/client/components/default/TranslateDefault.js +3 -3
- package/src/client/components/itemledger/{MenuItemledger.js → AppShellItemledger.js} +57 -57
- package/src/client/components/itemledger/CssItemledger.js +15 -15
- package/src/client/components/itemledger/LogInItemledger.js +6 -4
- package/src/client/components/itemledger/LogOutItemledger.js +6 -4
- package/src/client/components/itemledger/RouterItemledger.js +38 -0
- package/src/client/components/itemledger/SettingsItemledger.js +4 -4
- package/src/client/components/itemledger/SignUpItemledger.js +6 -4
- package/src/client/components/itemledger/TranslateItemledger.js +3 -3
- package/src/client/components/underpost/{MenuUnderpost.js → AppShellUnderpost.js} +88 -88
- package/src/client/components/underpost/CssUnderpost.js +14 -14
- package/src/client/components/underpost/CyberpunkBloggerUnderpost.js +4 -4
- package/src/client/components/underpost/DocumentSearchProvider.js +1 -1
- package/src/client/components/underpost/LabGalleryUnderpost.js +12 -15
- package/src/client/components/underpost/LogInUnderpost.js +6 -4
- package/src/client/components/underpost/LogOutUnderpost.js +6 -4
- package/src/client/components/underpost/RouterUnderpost.js +45 -0
- package/src/client/components/underpost/SettingsUnderpost.js +4 -4
- package/src/client/components/underpost/SignUpUnderpost.js +6 -4
- package/src/client/components/underpost/TranslateUnderpost.js +4 -4
- package/src/client/public/cyberia-docs/ACTION-SYSTEM.md +235 -0
- package/src/client/public/cyberia-docs/ARCHITECTURE.md +443 -0
- package/src/client/public/cyberia-docs/CYBERIA-CLI.md +417 -0
- package/src/client/public/cyberia-docs/CYBERIA-CLIENT.md +313 -0
- package/src/client/public/cyberia-docs/CYBERIA-SERVER.md +260 -0
- package/src/client/public/cyberia-docs/ENTITY-PROFILE.md +241 -0
- package/src/client/public/cyberia-docs/HARDHAT-MODULE.md +300 -0
- package/src/client/public/cyberia-docs/OFF-CHAIN-ECONOMY.md +279 -0
- package/src/client/public/cyberia-docs/QUEST-SYSTEM.md +206 -0
- package/src/client/public/cyberia-docs/ROADMAP.md +240 -0
- package/src/client/public/cyberia-docs/WHITE-PAPER.md +732 -0
- package/src/client/services/atlas-sprite-sheet/atlas-sprite-sheet.service.js +14 -20
- package/src/client/services/core/core.service.js +17 -49
- package/src/client/services/crypto/crypto.service.js +8 -13
- package/src/client/services/cyberia-action/cyberia-action.service.js +99 -0
- package/src/client/services/cyberia-dialogue/cyberia-dialogue.service.js +10 -16
- package/src/client/services/cyberia-entity/cyberia-entity.management.js +5 -5
- package/src/client/services/cyberia-entity/cyberia-entity.service.js +10 -16
- package/src/client/services/cyberia-instance/cyberia-instance.management.js +6 -6
- package/src/client/services/cyberia-instance/cyberia-instance.service.js +12 -18
- package/src/client/services/cyberia-instance-conf/cyberia-instance-conf.service.js +10 -16
- package/src/client/services/cyberia-map/cyberia-map.management.js +6 -6
- package/src/client/services/cyberia-map/cyberia-map.service.js +12 -18
- package/src/client/services/cyberia-quest/cyberia-quest.service.js +99 -0
- package/src/client/services/cyberia-quest-progress/cyberia-quest-progress.service.js +99 -0
- package/src/client/services/default/default.management.js +159 -267
- package/src/client/services/default/default.service.js +10 -16
- package/src/client/services/document/document.service.js +14 -19
- package/src/client/services/file/file.service.js +8 -13
- package/src/client/services/instance/instance.management.js +5 -5
- package/src/client/services/instance/instance.service.js +10 -15
- package/src/client/services/ipfs/ipfs.service.js +12 -18
- package/src/client/services/object-layer/object-layer.management.js +12 -12
- package/src/client/services/object-layer/object-layer.service.js +20 -26
- package/src/client/services/object-layer-render-frames/object-layer-render-frames.service.js +10 -16
- package/src/client/services/test/test.service.js +8 -13
- package/src/client/services/user/guest.service.js +86 -0
- package/src/client/services/user/user.management.js +5 -5
- package/src/client/services/user/user.service.js +14 -20
- package/src/client/ssr/body/404.js +3 -3
- package/src/client/ssr/body/500.js +3 -3
- package/src/client/ssr/body/CacheControl.js +5 -2
- package/src/client/ssr/body/DefaultSplashScreen.js +19 -12
- package/src/client/ssr/body/UnderpostDefaultSplashScreen.js +13 -6
- package/src/client/ssr/head/PwaItemledger.js +197 -60
- package/src/client/ssr/mailer/DefaultRecoverEmail.js +19 -20
- package/src/client/ssr/mailer/DefaultVerifyEmail.js +15 -16
- package/src/client/ssr/offline/Maintenance.js +12 -11
- package/src/client/ssr/offline/NoNetworkConnection.js +3 -3
- package/src/client/ssr/pages/Test.js +2 -2
- package/src/client/sw/core.sw.js +212 -0
- package/src/grpc/cyberia/grpc-server.js +179 -67
- package/src/index.js +1 -1
- package/src/runtime/cyberia-client/Dockerfile +80 -0
- package/src/runtime/cyberia-server/Dockerfile +37 -0
- package/src/runtime/express/Dockerfile +4 -4
- package/src/runtime/lampp/Dockerfile +8 -7
- package/src/runtime/wp/Dockerfile +11 -17
- package/src/server/atlas-sprite-sheet-generator.js +4 -2
- package/src/server/client-build-docs.js +45 -46
- package/src/server/client-build.js +334 -60
- package/src/server/client-formatted.js +47 -16
- package/src/server/conf.js +5 -4
- package/src/server/data-query.js +32 -20
- package/src/server/dns.js +22 -0
- package/src/server/ipfs-client.js +232 -91
- package/src/server/object-layer.js +1 -6
- package/src/server/process.js +13 -27
- package/src/server/semantic-layer-generator-floor.js +11 -51
- package/src/server/semantic-layer-generator-resource.js +259 -0
- package/src/server/semantic-layer-generator-skin.js +41 -171
- package/src/server/semantic-layer-generator.js +122 -14
- package/src/server/shape-generator.js +108 -0
- package/src/server/start.js +17 -3
- package/src/server/valkey.js +141 -235
- package/tsconfig.docs.json +15 -0
- package/typedoc.dd-cyberia.json +29 -0
- package/typedoc.json +29 -0
- package/WHITE-PAPER.md +0 -1540
- package/hardhat/README.md +0 -531
- package/hardhat/WHITE-PAPER.md +0 -1540
- package/jsdoc.dd-cyberia.json +0 -68
- package/jsdoc.json +0 -68
- package/src/api/object-layer/README.md +0 -672
- package/src/client/components/core/ColorPalette.js +0 -5267
- package/src/client/components/core/JoyStick.js +0 -80
- package/src/client/components/cryptokoyn/RoutesCryptokoyn.js +0 -39
- package/src/client/components/cyberia-portal/RoutesCyberiaPortal.js +0 -62
- package/src/client/components/cyberia-portal/ServerCyberiaPortal.js +0 -136
- package/src/client/components/default/RoutesDefault.js +0 -49
- package/src/client/components/itemledger/RoutesItemledger.js +0 -40
- package/src/client/components/underpost/RoutesUnderpost.js +0 -47
- package/src/client/sw/default.sw.js +0 -127
- package/src/client/sw/template.sw.js +0 -84
- package/src/grpc/cyberia/OFF_CHAIN_ECONOMY.md +0 -305
- package/src/grpc/cyberia/README.md +0 -326
|
@@ -0,0 +1,732 @@
|
|
|
1
|
+
# Object Layer Token: A Semantic Interoperability Protocol for Composable Digital Entities
|
|
2
|
+
|
|
3
|
+
<p align="center">
|
|
4
|
+
<img src="https://www.cyberiaonline.com/assets/splash/apple-touch-icon-precomposed.png" alt="CYBERIA Network Object Layer Engine"/>
|
|
5
|
+
</p>
|
|
6
|
+
|
|
7
|
+
<div align="center">
|
|
8
|
+
|
|
9
|
+
### CYBERIA
|
|
10
|
+
|
|
11
|
+
**Network Object Layers**
|
|
12
|
+
|
|
13
|
+
_Stackable Rendering Layers as a Unified Tokenized Reality_
|
|
14
|
+
|
|
15
|
+
[](https://www.npmjs.org/package/cyberia)
|
|
16
|
+
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
**Version:** 3.2.9 | **Status:** Draft | **Authors:** Underpost Engineering
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Abstract
|
|
26
|
+
|
|
27
|
+
This paper introduces the **Object Layer Protocol** — a semantic interoperability standard that defines digital entities as literally stackable rendering layers. Each layer carries four bound realities: mechanical (stats), presentational (rendering), experiential (UX), and economic (on-chain ownership). The protocol enables composable, verifiable, and interoperable digital objects across decentralized runtimes.
|
|
28
|
+
|
|
29
|
+
A reference implementation is provided through **Cyberia Online**, a browser-based real-time tap-based sandbox MMORPG deployed on Hyperledger Besu. The protocol uses the **Ethereum secp256k1** key pair as the universal identity primitive. On-chain economy is split across two dedicated service domains: **cryptokoyn.net** (fungible CKY currency) and **itemledger.com** (semi-fungible and non-fungible Object Layer registry), both backed by a single `ObjectLayerToken` ERC-1155 contract.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Table of Contents
|
|
34
|
+
|
|
35
|
+
1. [Executive Summary](#1-executive-summary)
|
|
36
|
+
2. [Introduction](#2-introduction)
|
|
37
|
+
3. [Ethereum Identity and Authentication](#3-ethereum-identity-and-authentication)
|
|
38
|
+
4. [The Object Layer Protocol](#4-the-object-layer-protocol)
|
|
39
|
+
5. [Three-Domain Service Architecture](#5-three-domain-service-architecture)
|
|
40
|
+
6. [Technology Stack](#6-technology-stack)
|
|
41
|
+
7. [Tokenomics](#7-tokenomics)
|
|
42
|
+
8. [Blockchain Network and Deployment](#8-blockchain-network-and-deployment)
|
|
43
|
+
9. [On-Chain Lifecycle and Game Mechanics](#9-on-chain-lifecycle-and-game-mechanics)
|
|
44
|
+
10. [Off-Chain Economy: Fountain & Sink](#10-off-chain-economy-fountain--sink)
|
|
45
|
+
11. [Incubation System](#11-incubation-system)
|
|
46
|
+
12. [Security and Transparency](#12-security-and-transparency)
|
|
47
|
+
13. [Future Directions](#13-future-directions)
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## 1. Executive Summary
|
|
52
|
+
|
|
53
|
+
Current approaches to digital asset tokenization treat tokens as isolated ledger entries — a balance, a URI, a metadata pointer — lacking a coherent semantic model that binds what an object _does_, what it _looks like_, how a _human understands it_, and what it _is worth_ into a single interoperable unit.
|
|
54
|
+
|
|
55
|
+
The **Object Layer Protocol** solves this by defining a **semantic interoperability standard** where each digital entity is composed of literally stackable rendering layers, each carrying four bound realities:
|
|
56
|
+
|
|
57
|
+
| Reality | Semantic Role | Schema Path |
|
|
58
|
+
| --------------------- | ------------------------------------------------------------------------- | ------------- |
|
|
59
|
+
| **Mechanical** | What the layer _does_ — statistical attributes governing behavior | `data.stats` |
|
|
60
|
+
| **Presentational** | What the layer _looks like_ — IPFS-addressed atlas sprite sheets | `data.render` |
|
|
61
|
+
| **Experiential (UX)** | What the layer _means to a human_ — identifiers, descriptions, activation | `data.item` |
|
|
62
|
+
| **Economic** | What the layer _is worth_ — on-chain ledger binding and ownership proof | `data.ledger` |
|
|
63
|
+
|
|
64
|
+
**Key architectural decisions:**
|
|
65
|
+
|
|
66
|
+
- **Ethereum secp256k1 keys** serve as the single identity primitive — the same key pair authenticates with the game server, signs EIP-712 claims, and owns on-chain tokens.
|
|
67
|
+
- **Fungible currency (CKY)** is managed via **cryptokoyn.net** — a dedicated financial portal for staking, governance, analytics, and fiat bridges.
|
|
68
|
+
- **Object Layer items** are managed via **itemledger.com** — the canonical registry, metadata resolver, and IPFS indexer for all item tokens.
|
|
69
|
+
- **A single `ObjectLayerToken` (ERC-1155) contract** on Hyperledger Besu backs both domains.
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## 2. Introduction
|
|
74
|
+
|
|
75
|
+
### 2.1 Problem Statement
|
|
76
|
+
|
|
77
|
+
The Ethereum ecosystem established the foundational primitives for digital ownership but has failed to solve the _meaning_ problem. Existing token standards (ERC-721, ERC-1155) conflate **ownership** with **identity**: owning a token proves you hold a balance, but says nothing structural about what the asset _is_, what it _does_, how it _renders_, or how a human _understands_ it.
|
|
78
|
+
|
|
79
|
+
**Cascading failures:**
|
|
80
|
+
|
|
81
|
+
- **No structural interoperability** — Two applications cannot share assets because there is no common semantic schema.
|
|
82
|
+
- **Presentation is disconnected from ownership** — Visual representation lives on centralized servers with no formal binding to mechanical or economic identity.
|
|
83
|
+
- **Composition is impossible** — There is no standard way to express "this entity is composed of five independently-owned layers stacked in this order."
|
|
84
|
+
- **Gas cost barriers** — Public Ethereum mainnet gas fees make per-item minting economically infeasible for game economies with thousands of items.
|
|
85
|
+
- **Lack of true ownership** — Centralized game operators unilaterally control in-game economies without accountability.
|
|
86
|
+
|
|
87
|
+
### 2.2 Solution
|
|
88
|
+
|
|
89
|
+
The Object Layer Protocol addresses the entire problem stack by leveraging Ethereum's existing cryptographic primitives — secp256k1 keys, EIP-712 typed data signatures, and ERC-1155 multi-token contracts — and extending them with a **semantic interoperability standard** that gives tokens structural meaning.
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## 3. Ethereum Identity and Authentication
|
|
94
|
+
|
|
95
|
+
### 3.1 secp256k1 Key Pairs as Universal Identity
|
|
96
|
+
|
|
97
|
+
A player generates a single Ethereum secp256k1 key pair. That key pair:
|
|
98
|
+
|
|
99
|
+
1. **Authenticates** with the game server via EIP-712 signed claims (no passwords, no OAuth).
|
|
100
|
+
2. **Owns** on-chain tokens in the `ObjectLayerToken` ERC-1155 contract.
|
|
101
|
+
3. **Authorizes** off-chain actions (crafting, trading, staking) via signed messages.
|
|
102
|
+
4. **Interoperates** across all three service domains with a single identity.
|
|
103
|
+
|
|
104
|
+
| Layer | Function | How the Key Is Used |
|
|
105
|
+
| ------------------ | ---------------- | ----------------------------------------------------------------- |
|
|
106
|
+
| **On-chain** | Token ownership | Ethereum address holds ERC-1155 balances |
|
|
107
|
+
| **Authentication** | Server login | EIP-712 signed claim replaces username/password |
|
|
108
|
+
| **Authorization** | Action signing | Off-chain crafting, trading, staking carry a signature |
|
|
109
|
+
| **Cross-domain** | Unified identity | Same key across cryptokoyn.net, itemledger.com, cyberiaonline.com |
|
|
110
|
+
|
|
111
|
+
### 3.2 EIP-712 Signed Claims and Gasless Authentication
|
|
112
|
+
|
|
113
|
+
**EIP-712 Domain Separator:**
|
|
114
|
+
|
|
115
|
+
```json
|
|
116
|
+
{
|
|
117
|
+
"name": "CyberiaObjectLayer",
|
|
118
|
+
"version": "1",
|
|
119
|
+
"chainId": 777771,
|
|
120
|
+
"verifyingContract": "0x<ObjectLayerToken address>"
|
|
121
|
+
}
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
**Authentication flow:**
|
|
125
|
+
|
|
126
|
+
```mermaid
|
|
127
|
+
sequenceDiagram
|
|
128
|
+
participant W as Wallet (secp256k1)
|
|
129
|
+
participant S as Game Server (relayer)
|
|
130
|
+
participant C as ObjectLayerToken (ERC-1155)
|
|
131
|
+
|
|
132
|
+
Note over W: 1. Player holds ETH key pair (private key k · 32 bytes)
|
|
133
|
+
Note over W: 2. Sign EIP-712 typed claim { player, nonce, timestamp, action }
|
|
134
|
+
W->>S: 3. Send signed claim + signature (v, r, s)
|
|
135
|
+
Note over S: 4. ecrecover(structHash, v, r, s) → assert addr match + nonce fresh
|
|
136
|
+
Note over S: 5. Session authenticated (identity = Ethereum address)
|
|
137
|
+
Note over S: 6. Qualifying game event (quest complete, craft, drop)
|
|
138
|
+
S->>C: 7. registerObjectLayer / mint (gasless relayer)
|
|
139
|
+
Note over C: 8. balanceOf updated — Emit ObjectLayerRegistered / TransferSingle
|
|
140
|
+
C-->>W: 9. Ownership verifiable by any Ethereum-compatible tool
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
**Key properties:**
|
|
144
|
+
|
|
145
|
+
- **Players never pay gas.** Besu network runs with gas price zero; server relays transactions.
|
|
146
|
+
- **Players never expose private keys.** Authentication is purely signature-based.
|
|
147
|
+
- **Sessions are stateless.** Each request carries a fresh EIP-712 signature.
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## 4. The Object Layer Protocol
|
|
152
|
+
|
|
153
|
+
### 4.1 Semantic Interoperability Through Stackable Layers
|
|
154
|
+
|
|
155
|
+
A digital entity is not a single atomic thing — it is a **stack of semantically complete layers**. A player character is:
|
|
156
|
+
|
|
157
|
+
```mermaid
|
|
158
|
+
block-beta
|
|
159
|
+
columns 1
|
|
160
|
+
A["🧑 Skin Layer (base character) — z-order: 1"]
|
|
161
|
+
B["🛡️ Breastplate Layer (cyber-vest) — z-order: 2"]
|
|
162
|
+
C["⚔️ Weapon Layer (hatchet) — z-order: 3"]
|
|
163
|
+
|
|
164
|
+
style A fill:#4169e1,color:#fff
|
|
165
|
+
style B fill:#2e8b57,color:#fff
|
|
166
|
+
style C fill:#b22222,color:#fff
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
Each layer is **independently complete**: it can be rendered, owned, simulated, and understood independently. This is **semantic interoperability** — any system that understands the Object Layer schema can fully render, simulate, display, and trade any layer from any source.
|
|
170
|
+
|
|
171
|
+
### 4.2 Four Realities of an Object Layer
|
|
172
|
+
|
|
173
|
+
| Reality | Schema Path | Role | Example |
|
|
174
|
+
| --------------------- | ------------- | ---------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
|
|
175
|
+
| **Mechanical** | `data.stats` | Governs behavior in the runtime simulation | `{ effect: 7, resistance: 8, agility: 0, range: 4, intelligence: 8, utility: 2 }` |
|
|
176
|
+
| **Presentational** | `data.render` | Governs visual appearance via IPFS-addressed atlas sprite sheets | `{ cid: "bafkrei...", metadataCid: "bafkreia..." }` |
|
|
177
|
+
| **Experiential (UX)** | `data.item` | Governs human comprehension — names, types, descriptions | `{ id: "hatchet", type: "weapon", description: "A rusted hatchet", activable: true }` |
|
|
178
|
+
| **Economic** | `data.ledger` | Governs ownership via on-chain token binding | `{ type: "ERC1155", address: "0x...", tokenId: "uint256" }` |
|
|
179
|
+
|
|
180
|
+
**The protocol requires all four realities for an Object Layer to be complete and interoperable.**
|
|
181
|
+
|
|
182
|
+
### 4.3 AtomicPrefab: The Protocol Atom
|
|
183
|
+
|
|
184
|
+
An **AtomicPrefab** is a self-contained Object Layer with all four realities, content-addressed on IPFS:
|
|
185
|
+
|
|
186
|
+
```json
|
|
187
|
+
{
|
|
188
|
+
"data": {
|
|
189
|
+
"stats": { "effect": 7, "resistance": 8, "agility": 0, "range": 4, "intelligence": 8, "utility": 2 },
|
|
190
|
+
"item": { "id": "hatchet", "type": "weapon", "description": "A rusted hatchet", "activable": true },
|
|
191
|
+
"ledger": { "type": "ERC1155", "address": "0x...", "tokenId": "12345" },
|
|
192
|
+
"render": { "cid": "bafkrei...atlas.png", "metadataCid": "bafkreia...meta.json" }
|
|
193
|
+
},
|
|
194
|
+
"cid": "bafk...json",
|
|
195
|
+
"sha256": "a1b2c3..."
|
|
196
|
+
}
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
**IPFS CID structure per Object Layer:**
|
|
200
|
+
|
|
201
|
+
| CID Field | Content | Usage |
|
|
202
|
+
| ------------------------- | ---------------------------------------------- | --------------------- |
|
|
203
|
+
| `cid` (top-level) | `keccak256(fast-json-stable-stringify(data))` | On-chain metadata CID |
|
|
204
|
+
| `data.render.cid` | Consolidated atlas sprite sheet PNG | Client rendering |
|
|
205
|
+
| `data.render.metadataCid` | Atlas metadata JSON (frame coords, animations) | Client rendering |
|
|
206
|
+
|
|
207
|
+
The `ObjectLayerToken` contract maps each `tokenId` → canonical `cid` on-chain via `_tokenCIDs[tokenId]`, enabling trustless metadata resolution.
|
|
208
|
+
|
|
209
|
+
### 4.4 Canonical Stats Schema
|
|
210
|
+
|
|
211
|
+
Stats govern mechanical behavior across all game systems (combat, movement, skills, drops):
|
|
212
|
+
|
|
213
|
+
```
|
|
214
|
+
Stats {
|
|
215
|
+
effect: int // damage output / skill power
|
|
216
|
+
resistance: int // damage reduction
|
|
217
|
+
agility: int // movement speed modifier
|
|
218
|
+
range: int // attack / interaction range
|
|
219
|
+
intelligence: int // skill cooldown / mana modifier
|
|
220
|
+
utility: int // general-purpose utility bonus
|
|
221
|
+
}
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
### 4.5 Item Type Registry
|
|
225
|
+
|
|
226
|
+
Object Layer items are classified by `data.item.type`, which determines z-order rendering, equipment slot, and activability:
|
|
227
|
+
|
|
228
|
+
| Type | z-order | Activable | Description |
|
|
229
|
+
| ------------- | ------- | --------- | ------------------------------- |
|
|
230
|
+
| `skin` | 1 | yes | Base character body layer |
|
|
231
|
+
| `breastplate` | 2 | yes | Armor overlay |
|
|
232
|
+
| `weapon` | 3 | yes | Weapon overlay |
|
|
233
|
+
| `floor` | 0 | no | Terrain tile |
|
|
234
|
+
| `obstacle` | 0 | no | Collision tile |
|
|
235
|
+
| `resource` | 0 | no | Extractable world object |
|
|
236
|
+
| `coin` | - | no | In-game currency (display only) |
|
|
237
|
+
|
|
238
|
+
### 4.6 Entity as Layer Stack
|
|
239
|
+
|
|
240
|
+
In the runtime, every entity is represented as an ordered stack of Object Layer IDs:
|
|
241
|
+
|
|
242
|
+
```
|
|
243
|
+
PlayerState {
|
|
244
|
+
objectLayers: [
|
|
245
|
+
{ itemId: "skin-hero-1", active: true, quantity: 1 },
|
|
246
|
+
{ itemId: "cyber-vest", active: true, quantity: 1 },
|
|
247
|
+
{ itemId: "hatchet", active: true, quantity: 1 },
|
|
248
|
+
{ itemId: "coin", active: false, quantity: 120 }
|
|
249
|
+
]
|
|
250
|
+
}
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
**Equipment rules** enforce consistency:
|
|
254
|
+
|
|
255
|
+
- Only `skin`, `breastplate`, `weapon` types may be activated.
|
|
256
|
+
- `onePerType: true` — activating an item auto-deactivates any same-type item.
|
|
257
|
+
- `requireSkin: true` — player must always have an active skin if they own any skin.
|
|
258
|
+
|
|
259
|
+
---
|
|
260
|
+
|
|
261
|
+
## 5. Three-Domain Service Architecture
|
|
262
|
+
|
|
263
|
+
The Cyberia economy is served through three dedicated service domains sharing the same Besu blockchain, MongoDB off-chain store, and Ethereum key-based identity:
|
|
264
|
+
|
|
265
|
+
```mermaid
|
|
266
|
+
graph TB
|
|
267
|
+
subgraph Blockchain["Hyperledger Besu — chainId 777771"]
|
|
268
|
+
OLT["ObjectLayerToken (ERC-1155)\nToken ID 0: CKY fungible\nToken IDs ≥1: Object Layer items"]
|
|
269
|
+
end
|
|
270
|
+
|
|
271
|
+
subgraph CK["cryptokoyn.net"]
|
|
272
|
+
CKApp["CKY Token Hub\nBalances · Staking · Governance\nAnalytics · Fiat On-ramps"]
|
|
273
|
+
end
|
|
274
|
+
|
|
275
|
+
subgraph IL["itemledger.com"]
|
|
276
|
+
ILApp["Object Layer Registry\nMetadata Resolver · IPFS Indexer\nItem Search · Marketplace"]
|
|
277
|
+
end
|
|
278
|
+
|
|
279
|
+
subgraph CO["cyberiaonline.com"]
|
|
280
|
+
COApp["Game Runtime\nReal-time Multiplayer · Inventory\nCrafting · Combat · Rendering"]
|
|
281
|
+
end
|
|
282
|
+
|
|
283
|
+
OLT <--> CK
|
|
284
|
+
OLT <--> IL
|
|
285
|
+
OLT <--> CO
|
|
286
|
+
CK <--> CO
|
|
287
|
+
IL <--> CO
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
### 5.1 cryptokoyn.net — CKY Token Hub
|
|
291
|
+
|
|
292
|
+
Manages **Token ID 0 (CRYPTOKOYN)** — the fungible in-game currency.
|
|
293
|
+
|
|
294
|
+
**Scope:** All CKY-denominated operations: balance queries, staking, governance voting, withdrawal (token-to-fiat), liquidity pool, and fiat on-ramp bridges.
|
|
295
|
+
|
|
296
|
+
**Token ID 0 contract binding:**
|
|
297
|
+
|
|
298
|
+
```solidity
|
|
299
|
+
uint256 public constant CRYPTOKOYN = 0;
|
|
300
|
+
uint256 public constant INITIAL_CRYPTOKOYN_SUPPLY = 10_000_000 * 1e18;
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
### 5.2 itemledger.com — Object Layer Registry
|
|
304
|
+
|
|
305
|
+
Manages **Token IDs ≥ 1** — all semi-fungible and non-fungible Object Layer items.
|
|
306
|
+
|
|
307
|
+
**API surface:**
|
|
308
|
+
|
|
309
|
+
| Endpoint | Method | Description |
|
|
310
|
+
| --------------------------------------- | ------ | -------------------------------------------- |
|
|
311
|
+
| `/api/token/{tokenId}` | GET | Returns full AtomicPrefab JSON |
|
|
312
|
+
| `/api/item/{itemId}` | GET | Resolves `itemId` → `tokenId` → AtomicPrefab |
|
|
313
|
+
| `/api/metadata/{tokenId}` | GET | IPFS-resolved atlas metadata |
|
|
314
|
+
| `/api/search` | GET | Full-text search across item names and types |
|
|
315
|
+
| `/api/registry/events` | GET | Paginated `ObjectLayerRegistered` event log |
|
|
316
|
+
| `/api/ipfs/pin` | POST | Pin atlas PNG + metadata JSON to IPFS |
|
|
317
|
+
| `/api/marketplace/listings` | GET | Active peer-to-peer listings |
|
|
318
|
+
| `/api/marketplace/buy` | POST | Execute `safeTransferFrom` via relayer |
|
|
319
|
+
| `/api/marketplace/provenance/{tokenId}` | GET | Full ownership history |
|
|
320
|
+
|
|
321
|
+
**On-chain events indexed:**
|
|
322
|
+
|
|
323
|
+
- `ObjectLayerRegistered(tokenId, itemId, metadataCid, initialSupply)`
|
|
324
|
+
- `TransferSingle(operator, from, to, id, value)`
|
|
325
|
+
- `MetadataUpdated(tokenId, metadataCid)`
|
|
326
|
+
|
|
327
|
+
### 5.3 cyberiaonline.com — Game Runtime
|
|
328
|
+
|
|
329
|
+
The live game runtime where Object Layers are rendered, stacked, simulated, and interacted with in real time.
|
|
330
|
+
|
|
331
|
+
**Runtime operations:**
|
|
332
|
+
|
|
333
|
+
1. **Authentication:** Player signs EIP-712 claim → server verifies → session established.
|
|
334
|
+
2. **Inventory loading:** `balanceOf(playerAddress, tokenId)` for all registered tokens → resolve AtomicPrefab.
|
|
335
|
+
3. **Layer rendering:** Object Layer Engine processes atlas sprite sheets into renderable layer stacks.
|
|
336
|
+
4. **Crafting:** Server burns consumed tokens + mints crafted item + indexes on itemledger.com.
|
|
337
|
+
5. **Trading:** `safeBatchTransferFrom` via server relayer.
|
|
338
|
+
|
|
339
|
+
---
|
|
340
|
+
|
|
341
|
+
## 6. Technology Stack
|
|
342
|
+
|
|
343
|
+
### 6.1 Go Game Server (cyberia-server)
|
|
344
|
+
|
|
345
|
+
High-performance real-time multiplayer server written in Go:
|
|
346
|
+
|
|
347
|
+
- **WebSocket binary AOI protocol** — custom little-endian wire format delivering only render-essential data.
|
|
348
|
+
- **gRPC client** — reads world data from the Node.js Engine at startup and on hot-reload.
|
|
349
|
+
- **AOI (Area of Interest)** system — spatial filtering so each client receives only nearby entities.
|
|
350
|
+
- **Pathfinding** — A\* implementation for bot navigation.
|
|
351
|
+
- **Skill dispatcher** — item-triggered skill pipeline (`projectile`, `doppelganger`).
|
|
352
|
+
- **Economy module** — Fountain & Sink coin economy with FCT (Floating Combat Text) events.
|
|
353
|
+
|
|
354
|
+
### 6.2 C/WASM Client (cyberia-client)
|
|
355
|
+
|
|
356
|
+
Game client compiled to WebAssembly via Emscripten:
|
|
357
|
+
|
|
358
|
+
- **SDL2 + OpenGL ES2** rendering pipeline.
|
|
359
|
+
- **Binary AOI decoder** — parses the Go server's binary WebSocket messages.
|
|
360
|
+
- **Object Layer engine** — composites atlas sprite sheets in z-order per entity.
|
|
361
|
+
- **Tap-based input** — all player movement and interaction via tap events (desktop mouse + mobile touch).
|
|
362
|
+
- **Floating combat text** — renders FCT events (damage, regen, coin gain/loss, item gain/loss).
|
|
363
|
+
- **Inventory modal** — item management UI with equip/unequip interactions.
|
|
364
|
+
|
|
365
|
+
### 6.3 Node.js Engine (engine-cyberia)
|
|
366
|
+
|
|
367
|
+
Backend engine providing REST APIs, gRPC data service, and CI/CD tooling:
|
|
368
|
+
|
|
369
|
+
- **Express** REST API server.
|
|
370
|
+
- **MongoDB / Mongoose** — canonical data store for all game data.
|
|
371
|
+
- **gRPC server** — exposes `GetFullInstance`, `GetObjectLayerBatch`, `GetMapData`, `Ping`, `GetObjectLayerManifest`.
|
|
372
|
+
- **Valkey (Redis-compatible)** — session/cache layer.
|
|
373
|
+
- **IPFS integration** — pins atlas PNGs and metadata JSON to IPFS Cluster + Kubo.
|
|
374
|
+
- **Cyberia CLI** (`cyberia.js`) — object layer import/generation, blockchain lifecycle.
|
|
375
|
+
|
|
376
|
+
### 6.4 Hyperledger Besu
|
|
377
|
+
|
|
378
|
+
Enterprise-grade Ethereum client for the permissioned network:
|
|
379
|
+
|
|
380
|
+
- **IBFT2 / QBFT consensus** — deterministic finality, 2–5 second block periods.
|
|
381
|
+
- **Gas price = 0** — gasless relayer model; permissioning provides economic security.
|
|
382
|
+
- **ChainId: 777771** — unique identity for the Cyberia network.
|
|
383
|
+
- **secp256k1 compatibility** — identical key format to Ethereum mainnet.
|
|
384
|
+
|
|
385
|
+
### 6.5 Hardhat
|
|
386
|
+
|
|
387
|
+
Ethereum development environment for smart contract lifecycle:
|
|
388
|
+
|
|
389
|
+
- Compile, test, and deploy `ObjectLayerToken` to Besu RPC endpoints.
|
|
390
|
+
- Deployment artifacts consumed by the Cyberia CLI.
|
|
391
|
+
|
|
392
|
+
### 6.6 OpenZeppelin ERC-1155
|
|
393
|
+
|
|
394
|
+
`ObjectLayerToken` inherits from:
|
|
395
|
+
|
|
396
|
+
- `ERC1155` — core multi-token standard.
|
|
397
|
+
- `ERC1155Burnable` — token holders can destroy tokens.
|
|
398
|
+
- `ERC1155Pausable` — owner can freeze all transfers (emergency governance).
|
|
399
|
+
- `ERC1155Supply` — on-chain total supply tracking per token ID.
|
|
400
|
+
- `Ownable` — access control for mint, pause, register.
|
|
401
|
+
|
|
402
|
+
### 6.7 MongoDB Schemas
|
|
403
|
+
|
|
404
|
+
Off-chain canonical store for all four realities. Key collections:
|
|
405
|
+
|
|
406
|
+
| Collection | Purpose |
|
|
407
|
+
| ------------------------- | ------------------------------------------------------------- |
|
|
408
|
+
| `ObjectLayer` | AtomicPrefab documents with `data.{stats,item,ledger,render}` |
|
|
409
|
+
| `ObjectLayerRenderFrames` | Per-frame tile matrix and color palette |
|
|
410
|
+
| `AtlasSpriteSheet` | Consolidated atlas PNG + frame coordinate metadata |
|
|
411
|
+
| `CyberiaInstance` | Instance graph (maps + portal edges) |
|
|
412
|
+
| `CyberiaMap` | Grid data, entity placements, map metadata |
|
|
413
|
+
| `CyberiaEntity` | Entity definitions (type, position, item IDs, bot stats) |
|
|
414
|
+
| `CyberiaInstanceConf` | Instance configuration (skills, economy, equipment rules) |
|
|
415
|
+
| `CyberiaQuest` | Quest definitions (steps, objectives, rewards) |
|
|
416
|
+
| `CyberiaQuestProgress` | Per-player quest progress tracking |
|
|
417
|
+
| `CyberiaAction` | NPC action definitions (shop, craft, dialogue, quest-talk) |
|
|
418
|
+
| `CyberiaDialogue` | Dialogue line groups |
|
|
419
|
+
|
|
420
|
+
### 6.8 IPFS Storage
|
|
421
|
+
|
|
422
|
+
Content-addressed distributed storage for all Object Layer assets:
|
|
423
|
+
|
|
424
|
+
- Atlas PNG and metadata JSON pinned to IPFS Cluster + Kubo.
|
|
425
|
+
- `itemledger.com` provides a caching resolver layer (avoids gateway latency).
|
|
426
|
+
- The `ObjectLayerToken` contract maps `tokenId` → canonical CID on-chain.
|
|
427
|
+
|
|
428
|
+
### 6.9 Protocol Buffers (gRPC)
|
|
429
|
+
|
|
430
|
+
Internal data pipeline between Node.js Engine and Go game server:
|
|
431
|
+
|
|
432
|
+
- Read-only RPCs: no create/update/delete over the channel.
|
|
433
|
+
- Batch-friendly: large collections streamed.
|
|
434
|
+
- Hot-reload aware: manifest-based incremental update (`sha256` diff).
|
|
435
|
+
|
|
436
|
+
---
|
|
437
|
+
|
|
438
|
+
## 7. Tokenomics
|
|
439
|
+
|
|
440
|
+
### 7.1 ObjectLayerToken Contract
|
|
441
|
+
|
|
442
|
+
```solidity
|
|
443
|
+
contract ObjectLayerToken is ERC1155, ERC1155Burnable, ERC1155Pausable, ERC1155Supply, Ownable {
|
|
444
|
+
uint256 public constant CRYPTOKOYN = 0;
|
|
445
|
+
uint256 public constant INITIAL_CRYPTOKOYN_SUPPLY = 10_000_000 * 1e18;
|
|
446
|
+
|
|
447
|
+
// Deterministic token ID assignment
|
|
448
|
+
// computeTokenId(itemId) = uint256(keccak256("cyberia.object-layer:" || itemId))
|
|
449
|
+
mapping(uint256 => string) private _tokenCIDs; // tokenId → canonical IPFS CID
|
|
450
|
+
mapping(uint256 => string) private _itemIds; // tokenId → itemId string
|
|
451
|
+
mapping(bytes32 => uint256) private _itemIdToTokenId;
|
|
452
|
+
}
|
|
453
|
+
```
|
|
454
|
+
|
|
455
|
+
### 7.2 Token Classification
|
|
456
|
+
|
|
457
|
+
| Token Type | Token ID | Supply | Managed By | Example |
|
|
458
|
+
| ------------------------ | --------------------------------------- | ------------------ | -------------- | --------------------------- |
|
|
459
|
+
| Fungible currency | 0 (CRYPTOKOYN) | 10,000,000 × 10^18 | cryptokoyn.net | In-game CKY |
|
|
460
|
+
| Semi-fungible resource | `computeTokenId("gold-ore")` | 1,000,000 | itemledger.com | Stackable crafting material |
|
|
461
|
+
| Semi-fungible consumable | `computeTokenId("health-potion")` | 100,000 | itemledger.com | Stackable consumable |
|
|
462
|
+
| Non-fungible unique gear | `computeTokenId("legendary-hatchet")` | 1 | itemledger.com | Unique weapon |
|
|
463
|
+
| Non-fungible skin | `computeTokenId("cyber-punk-skin-001")` | 1 | itemledger.com | Unique character skin |
|
|
464
|
+
|
|
465
|
+
### 7.3 Token Distribution and Allocation
|
|
466
|
+
|
|
467
|
+
**CryptoKoyn (CKY) — Token ID 0:**
|
|
468
|
+
|
|
469
|
+
- **Total Supply:** 10,000,000 CKY (18-decimal precision)
|
|
470
|
+
- **90%** → Airdrop Pool + Mint Pool (distributed through gameplay, events, rewards)
|
|
471
|
+
- **10%** → Direct Investor Wallets (proportional to financial participation)
|
|
472
|
+
|
|
473
|
+
**Object Layer Items — Token IDs ≥ 1:**
|
|
474
|
+
|
|
475
|
+
- **Variable supply** per item type based on game design requirements.
|
|
476
|
+
- Earned through quests, achievements, events (minted on-chain via `registerObjectLayer`).
|
|
477
|
+
- Crafted in-game (server calls `mint` to issue ERC-1155 token).
|
|
478
|
+
- Freely tradeable via `safeTransferFrom` / `safeBatchTransferFrom`.
|
|
479
|
+
|
|
480
|
+
### 7.4 Governance and Circulation
|
|
481
|
+
|
|
482
|
+
```mermaid
|
|
483
|
+
flowchart LR
|
|
484
|
+
subgraph Governance["Governance Runtime Node"]
|
|
485
|
+
subgraph Faucet["Faucet / Emitter Protocol"]
|
|
486
|
+
ERC["ERC-1155 ObjectLayerToken\nCKY via cryptokoyn.net\nItems via itemledger.com"]
|
|
487
|
+
AirdropMint["Airdrop Mint Pool"]
|
|
488
|
+
end
|
|
489
|
+
subgraph Sync["Sync / Drain / Burning Protocol"]
|
|
490
|
+
Staking["Voting Power\n(cryptokoyn.net)"]
|
|
491
|
+
Withdrawal["Withdrawal Protocol\nToken to Fiat"]
|
|
492
|
+
end
|
|
493
|
+
Coinbase["Coinbase Address"]
|
|
494
|
+
end
|
|
495
|
+
|
|
496
|
+
subgraph Circulation["Circulation"]
|
|
497
|
+
Players["Players\n(Cyberia Online)"]
|
|
498
|
+
Transformation["Batch Transfers\nbetween Players"]
|
|
499
|
+
end
|
|
500
|
+
|
|
501
|
+
Investors ==> Coinbase
|
|
502
|
+
Coinbase ==>|ICO| ERC
|
|
503
|
+
ERC ==> AirdropMint
|
|
504
|
+
AirdropMint <==> Players
|
|
505
|
+
AirdropMint ==>|ICO| Investors
|
|
506
|
+
Investors ==> Players
|
|
507
|
+
Players ==> |Staking| Staking
|
|
508
|
+
Sync ==> Burn["Burn"]
|
|
509
|
+
Sync ==>|Supply renewal| AirdropMint
|
|
510
|
+
Coinbase ==>|Liquidity Pool| Withdrawal
|
|
511
|
+
Players ==> Withdrawal
|
|
512
|
+
Withdrawal ==>|Sell / Withdrawal| Players
|
|
513
|
+
Players <==> Transformation
|
|
514
|
+
Players <==> ExternalMarkets["External Markets"]
|
|
515
|
+
```
|
|
516
|
+
|
|
517
|
+
**Staking vote weight formula:**
|
|
518
|
+
|
|
519
|
+
$$\text{Vote Weight} = 0.5 \times \frac{\text{Amount Staked}}{\text{Total Staked}} + 0.5 \times \frac{\text{Staking Duration}}{\text{Max Staking Duration}}$$
|
|
520
|
+
|
|
521
|
+
---
|
|
522
|
+
|
|
523
|
+
## 8. Blockchain Network and Deployment
|
|
524
|
+
|
|
525
|
+
### 8.1 Hyperledger Besu IBFT2/QBFT Network
|
|
526
|
+
|
|
527
|
+
**Genesis configuration:**
|
|
528
|
+
|
|
529
|
+
```json
|
|
530
|
+
{
|
|
531
|
+
"config": {
|
|
532
|
+
"chainId": 777771,
|
|
533
|
+
"berlinBlock": 0,
|
|
534
|
+
"londonBlock": 0,
|
|
535
|
+
"qbft": {
|
|
536
|
+
"epochLength": 30000,
|
|
537
|
+
"blockPeriodSeconds": 5,
|
|
538
|
+
"requestTimeoutSeconds": 10
|
|
539
|
+
}
|
|
540
|
+
},
|
|
541
|
+
"gasLimit": "0x1fffffffffffff",
|
|
542
|
+
"difficulty": "0x1",
|
|
543
|
+
"coinbase": "0x44e298766B94B53AdA033FE920748a398CC7cE63"
|
|
544
|
+
}
|
|
545
|
+
```
|
|
546
|
+
|
|
547
|
+
**Key design decisions:**
|
|
548
|
+
|
|
549
|
+
- **Gas price = 0** — permissioning layer handles access control; players never pay gas.
|
|
550
|
+
- **Deterministic finality** — IBFT2/QBFT blocks are never reverted once committed.
|
|
551
|
+
- **Fast block times** — 2–5 second block periods for near-real-time confirmation.
|
|
552
|
+
|
|
553
|
+
### 8.2 Hardhat Deployment Workflow
|
|
554
|
+
|
|
555
|
+
```bash
|
|
556
|
+
# Compile contracts
|
|
557
|
+
cd hardhat && npx hardhat compile
|
|
558
|
+
|
|
559
|
+
# Deploy ObjectLayerToken to Besu
|
|
560
|
+
npx hardhat run scripts/deployObjectLayerToken.js --network besu-ibft2
|
|
561
|
+
|
|
562
|
+
# Run contract tests
|
|
563
|
+
npx hardhat test
|
|
564
|
+
```
|
|
565
|
+
|
|
566
|
+
The deployment script:
|
|
567
|
+
|
|
568
|
+
1. Connects to Besu RPC using the coinbase secp256k1 key.
|
|
569
|
+
2. Deploys `ObjectLayerToken`.
|
|
570
|
+
3. Mints 10M CKY to the deployer.
|
|
571
|
+
4. Writes deployment artifact to `hardhat/deployments/` for CLI consumption.
|
|
572
|
+
|
|
573
|
+
---
|
|
574
|
+
|
|
575
|
+
## 9. On-Chain Lifecycle and Game Mechanics
|
|
576
|
+
|
|
577
|
+
### 9.1 On-Chain Lifecycle: Register → Mint → Transfer → Burn
|
|
578
|
+
|
|
579
|
+
```mermaid
|
|
580
|
+
sequenceDiagram
|
|
581
|
+
participant P as Player
|
|
582
|
+
participant S as Server Relayer
|
|
583
|
+
participant C as ObjectLayerToken
|
|
584
|
+
participant IL as itemledger.com
|
|
585
|
+
|
|
586
|
+
P->>S: 1. Authenticate via EIP-712 signed claim
|
|
587
|
+
Note over S: 2. Build ObjectLayer data from asset directory
|
|
588
|
+
Note over S: 3. computeSha256(data) + Pin atlas to IPFS
|
|
589
|
+
Note over S: 4. Store in MongoDB (ledger.type: OFF_CHAIN)
|
|
590
|
+
Note over S: ⏳ INCUBATION PERIOD
|
|
591
|
+
S->>C: 5. registerObjectLayer(playerAddr, itemId, metadataCid, supply)
|
|
592
|
+
Note over S: 6. Update MongoDB: ledger = { type: ERC1155, address, tokenId }
|
|
593
|
+
C-->>IL: 7. ObjectLayerRegistered event → index
|
|
594
|
+
|
|
595
|
+
rect rgba(200, 230, 200, 0.15)
|
|
596
|
+
Note over P,IL: GAMEPLAY
|
|
597
|
+
S->>C: safeTransferFrom — quest reward
|
|
598
|
+
P->>C: safeBatchTransferFrom — player trade
|
|
599
|
+
S->>C: mint(resourceId, amount) — enemy loot
|
|
600
|
+
P->>C: burn(resourceId, qty) — crafting cost
|
|
601
|
+
end
|
|
602
|
+
```
|
|
603
|
+
|
|
604
|
+
### 9.2 Decentralized Player Progression
|
|
605
|
+
|
|
606
|
+
A player's complete game state reconstructable from their Ethereum address:
|
|
607
|
+
|
|
608
|
+
1. **CKY balance:** `balanceOf(playerAddress, 0)` via cryptokoyn.net.
|
|
609
|
+
2. **Item inventory:** `balanceOf(playerAddress, tokenId)` for each registered token via itemledger.com.
|
|
610
|
+
3. **Semantic completeness:** Each token resolves to a full AtomicPrefab with all four realities.
|
|
611
|
+
|
|
612
|
+
A player's inventory exists cryptographically independent of game servers — verifiable from any Ethereum-compatible tool.
|
|
613
|
+
|
|
614
|
+
### 9.3 Crafting, Trading, and Item Minting Fee
|
|
615
|
+
|
|
616
|
+
- **Crafting:** Server burns consumed semi-fungible resource tokens + mints the crafted item token. itemledger.com auto-indexes the new item.
|
|
617
|
+
- **Trading:** `safeBatchTransferFrom` for multi-layer atomic trades via the server relayer. itemledger.com marketplace provides the UI.
|
|
618
|
+
- **Minting Fee:** Converting off-chain items to on-chain ERC-1155 requires a CKY fee (token ID 0), creating a CKY sink that supports token value.
|
|
619
|
+
|
|
620
|
+
---
|
|
621
|
+
|
|
622
|
+
## 10. Off-Chain Economy: Fountain & Sink
|
|
623
|
+
|
|
624
|
+
The off-chain economy runs on the **Fountain & Sink** model — the industry standard for sustainable in-game economies (pioneered by _Ultima Online_, perfected by _EVE Online_ and _World of Warcraft_).
|
|
625
|
+
|
|
626
|
+
```
|
|
627
|
+
┌─────────────────────────────┐
|
|
628
|
+
│ FOUNTAINS │
|
|
629
|
+
│ botSpawnCoins ──► Bot │
|
|
630
|
+
│ playerSpawnCoins ► Player │
|
|
631
|
+
└──────────────┬──────────────┘
|
|
632
|
+
│ new coins
|
|
633
|
+
▼
|
|
634
|
+
┌──────────────────────────────┐
|
|
635
|
+
│ CIRCULATING SUPPLY │
|
|
636
|
+
└──────┬───────────────────────┘
|
|
637
|
+
│
|
|
638
|
+
┌────────────┴────────────┐
|
|
639
|
+
│ KILL TRANSFER │ (zero-sum redistribution)
|
|
640
|
+
│ PvE: coinKillPercentVsBot │
|
|
641
|
+
│ PvP: coinKillPercentVsPlayer │
|
|
642
|
+
└────────────┬────────────┘
|
|
643
|
+
│
|
|
644
|
+
┌──────▼──────────────────────┐
|
|
645
|
+
│ SINKS │
|
|
646
|
+
│ respawnCostPercent │
|
|
647
|
+
│ portalFee │
|
|
648
|
+
│ craftingFeePercent │
|
|
649
|
+
└─────────────────────────────┘
|
|
650
|
+
```
|
|
651
|
+
|
|
652
|
+
### Economy Parameters (CyberiaInstanceConf.economyRules)
|
|
653
|
+
|
|
654
|
+
| Parameter | Default | Description |
|
|
655
|
+
| ------------------------- | ------- | ----------------------------------------------------- |
|
|
656
|
+
| `botSpawnCoins` | 50 | Coins on bot spawn/respawn (infinite mint) |
|
|
657
|
+
| `playerSpawnCoins` | 50 | Guest starting wallet |
|
|
658
|
+
| `coinKillPercentVsBot` | 0.40 | 40% of bot wallet → killer on PvE kill |
|
|
659
|
+
| `coinKillPercentVsPlayer` | 0.15 | 15% of player wallet → killer on PvP kill |
|
|
660
|
+
| `coinKillMinAmount` | 10 | Minimum coins per kill (hard floor) |
|
|
661
|
+
| `respawnCostPercent` | 0.0 | Fraction burned on player death (alpha: disabled) |
|
|
662
|
+
| `portalFee` | 0 | Flat coins burned per portal use (alpha: disabled) |
|
|
663
|
+
| `craftingFeePercent` | 0.0 | Fraction burned per crafting action (alpha: disabled) |
|
|
664
|
+
|
|
665
|
+
### Kill Transfer Logic
|
|
666
|
+
|
|
667
|
+
```
|
|
668
|
+
ExecuteKillTransfer(caster, victim):
|
|
669
|
+
rate = coinKillPercentVsBot if victim is bot
|
|
670
|
+
coinKillPercentVsPlayer if victim is player
|
|
671
|
+
transfer = max(floor(victim.coins * rate), coinKillMinAmount)
|
|
672
|
+
transfer = min(transfer, victim.coins)
|
|
673
|
+
victim.coins -= transfer
|
|
674
|
+
caster.coins += transfer
|
|
675
|
+
→ sendFCT(caster, FCTTypeCoinGain)
|
|
676
|
+
→ sendFCT(victim, FCTTypeCoinLoss)
|
|
677
|
+
```
|
|
678
|
+
|
|
679
|
+
---
|
|
680
|
+
|
|
681
|
+
## 11. Incubation System
|
|
682
|
+
|
|
683
|
+
Items earned in-game undergo a **variable incubation period** before being minted on-chain as ERC-1155 tokens.
|
|
684
|
+
|
|
685
|
+
**Design goals:**
|
|
686
|
+
|
|
687
|
+
- Prevent instant sell-off of newly earned items.
|
|
688
|
+
- Reward sustained gameplay engagement.
|
|
689
|
+
- Create a natural gate between off-chain farming and on-chain ownership.
|
|
690
|
+
|
|
691
|
+
**Incubation states:**
|
|
692
|
+
|
|
693
|
+
| State | `data.ledger.type` | Description |
|
|
694
|
+
| -------------- | ------------------ | --------------------------------------------------------------- |
|
|
695
|
+
| **Off-chain** | `"OFF_CHAIN"` | Item earned but not yet registered on-chain |
|
|
696
|
+
| **Incubating** | `"OFF_CHAIN"` | Waiting for incubation period + optional CKY fee |
|
|
697
|
+
| **On-chain** | `"ERC1155"` | Registered via `registerObjectLayer`, indexed by itemledger.com |
|
|
698
|
+
|
|
699
|
+
**Incubation duration** scales with item rarity:
|
|
700
|
+
|
|
701
|
+
- Common resources (wood, stone): short incubation.
|
|
702
|
+
- Unique weapons and legendary skins: longer incubation.
|
|
703
|
+
|
|
704
|
+
**CKY minting fee**: Farm/dropped/crafted items require a CryptoKoyn fee to convert to on-chain tokens. This creates a CKY sink proportional to item activity.
|
|
705
|
+
|
|
706
|
+
---
|
|
707
|
+
|
|
708
|
+
## 12. Security and Transparency
|
|
709
|
+
|
|
710
|
+
- **Permissioned Network:** Hyperledger Besu IBFT2/QBFT — only authorized validators produce blocks.
|
|
711
|
+
- **secp256k1 Key Security:** Identity secured by the same ECC used on Ethereum mainnet.
|
|
712
|
+
- **EIP-712 Replay Protection:** Domain separator binds signatures to specific contract, chain, and protocol version.
|
|
713
|
+
- **Smart Contract Access Control:** `Ownable` restricts mint, register, and pause to the governance address.
|
|
714
|
+
- **Pausability:** Emergency freeze on all token transfers (circuit breaker).
|
|
715
|
+
- **Deterministic Finality:** Blocks are never reverted once committed.
|
|
716
|
+
- **IPFS Content Addressing:** Asset integrity guaranteed by content-addressed CIDs.
|
|
717
|
+
- **Semantic Integrity:** `sha256` hash covers the complete AtomicPrefab — no single reality can be tampered with independently.
|
|
718
|
+
|
|
719
|
+
---
|
|
720
|
+
|
|
721
|
+
## 13. Future Directions
|
|
722
|
+
|
|
723
|
+
- **Mainnet Bridge:** Migrate CKY and Object Layer tokens to Ethereum mainnet or L2 via bridge contracts (secp256k1 key compatibility already in place).
|
|
724
|
+
- **Dynamic Metadata:** On-chain metadata upgrade protocol for evolving item stats (governance-gated).
|
|
725
|
+
- **Cross-Instance Interoperability:** Object Layers from one Cyberia instance usable in other Object Layer Protocol-compatible runtimes.
|
|
726
|
+
- **DAO Governance:** Transition governance address from server relayer to a multi-sig / DAO contract on Besu.
|
|
727
|
+
- **Procedural Asset Generation:** Extend CLI procedural generator to support user-directed item creation with on-chain registration.
|
|
728
|
+
- **Sink Graduation:** Activate economy pressure levers (respawn cost, portal fee, crafting fee) as the player base grows.
|
|
729
|
+
|
|
730
|
+
---
|
|
731
|
+
|
|
732
|
+
_© Underpost Engineering. All rights reserved. Cyberia Online and the Object Layer Protocol are trademarks of Underpost._
|