Selene Chain
Selene Chain is a live demo of Syndicate's programmable, onchain sequencer.
Selene Chain is a live demonstration of a programmable, onchain sequencer governed by natural cycles–in this case, the phases of the moon. By anchoring transaction sequencing to lunar cycles, Selene eliminates manual intervention and enables a system that is both autonomous and intentionally opinionated.
Built on Syndicate's infrastructure, Selene showcases how sequencing logic can be made expressive, time-based, and fully onchain—unlocking new possibilities for permissioning, ordering, and custom transaction rules.
Screenshot: Selene Chain demo interface, showing lunar phase–based transaction prompts.
How It Works: Transaction Lifecycle
- Submission: A user submits a transaction via the Selene demo interface.
- Sequencing: The onchain sequencer module determines the current lunar phase and applies the corresponding rule to the transaction.
- Validation: If the transaction matches the active phase's criteria, it is sequenced and included onchain. If not, it is rejected and logged.
- Feedback: Users see immediate feedback—either a transaction hash for success or a rejection message. All rejected attempts are stored in a PostgreSQL database for transparency and analysis.
Sequencing Module: Lunar Phase Permissions
In Syndicate's programmable sequencer, modules are pluggable components that define how transactions are selected, ordered, and included onchain. The Selene demo implements a custom permission-focused sequencing module. All transaction inclusion rules are defined and enforced onchain by the sequencer. Each lunar phase activates a distinct set of permissioning rules. E.g. only low-value transactions are allowed during Waning Crescent.
This demonstrates how developers can use Syndicate to build expressive, autonomous infrastructure with dynamic, phase-based transaction policies enforced directly at the protocol layer.
Lunar Phase Calculation & Rules
The module computes the current moon phase from a timestamp, mapping it to one of 8 rule sets.
Formula:
Then we pass the phaseIndex
into the getPhaseName
function to return the name of the
moon phase:
Rules Table:
Moon Phase | Rule Description |
---|---|
New Moon | Prefers low calldata size |
Waxing Crescent | Only broadcasts to an allowed contract |
First Quarter | Requires angel number donation (e.g., 111, 333, etc.) |
Waxing Gibbous | Only allows function calls to waxingGibbous() |
Full Moon | Only allows token interactions (ERC20, ERC721, ERC1155) |
Waning Gibbous | Requires high gas limit (≥ 21k) |
Last Quarter | Enforces a calldata/gas limit ratio ≥ 16 |
Waning Crescent | Only allows low-value transactions (≤ 0.01 ETH) |
Each of these rules is implemented in MoonphasePermissionModule.sol
and enforced at the sequencing layer.
Demo Architecture & Tech Stack
Selene Chain is built with a modular, extensible architecture that demonstrates how lunar phase logic can be enforced onchain and surfaced in a modern web application. Here's how the pieces fit together:
-
Sequencer: decentralized onchain sequencing
-
Sequencing module: all lunar phase logic is enforced onchain via Solidity modules (
MoonphasePermissionModule.sol
), which determine transaction validity based on the current phase. -
Frontend: Built with Next.js, TypeScript, and Tailwind CSS, the UI provides interactive prompts and real-time feedback to users.
-
Backend: Uses PostgreSQL for transaction logging and Drizzle ORM for database access.
-
Development & Testing: Foundry is used for contract development and testing.
Get Started
Ready to build your appchain with Syndicate?
- Try the Live Demo
- Explore the Codebase to understand the architecture and extend the module
- View Onchain Sequencing Modules to start customizing ordering, permissions, and economic mechanisms for your own appchain
- Reach out to the Syndicate team for support or to share your experiments!