Oracle3
Oracle3: 예측시장 거래 엔진·MCP 서버
아직 감지된 업데이트가 없습니다. GitHub 릴리스가 나오면 여기에 보입니다.
개인 계정의 공개 저장소 소유자는 GitHub로 로그인해 운영자를 확인하고 소개를 직접 관리할 수 있습니다. 관리자 승인은 필요하지 않습니다.
로그인한 뒤 확인 파일을 만들어 이 저장소의 기본 브랜치에 30분 안에 커밋해 주세요. 다른 브랜치나 포크의 파일은 인정하지 않습니다. 파일을 올린 뒤 아래에서 확인하면 관리자 승인 없이 관리할 수 있습니다. 자격을 유지하려면 파일을 남겨 두세요.
로그인이 필요하면 로그인 화면으로 이동합니다. 로그인 후 이곳으로 돌아와 원하는 확인 버튼을 다시 눌러 주세요.
프로젝트 폴더에서 /nomorevibe verify를 실행하면 소유권을 확인하고 소개를 직접 관리할 수 있습니다.
1분 만에 확인하기메이커가 쓴 소개는 위의 한 줄이 전부입니다. 더 자세한 내용은 저장소 README에서 읽을 수 있습니다. 저장소 README ↗
README 전체를 불러오는 중입니다.
README 전문 보기 ↗A full-stack protocol for staking runes on Bitcoin, developed by Rather Labs and for the Liquidium Foundation.
Liquidium Staking is a protocol that enables users to stake runes on Bitcoin, earning yield and participating in a decentralized staking pool. The project leverages Next.js (App Router), React, React Query, Drizzle ORM, PostgreSQL, and Redis (for distributed UTXO locks, not cache). It integrates with Internet Computer canisters for exchange rate data, mempool.space for Bitcoin blockchain data, Ordiscan and Best In Slot for rune market information, and the Liquidium internal API for rune-aware UTXO data. Transactional and digest email delivery is handled via Mailjet.
The core staking logic runs in the canister smart contract maintained at https://github.com/Liquidium-Inc/staking-canister/.
src/app/ — Main Next.js app, including API routes and UI.src/app/api/ — Serverless API endpoints (see below for details).src/app/debug/ — Debugging and development tools (see below).src/config/ — Runtime configuration derived from environment variables.src/providers/ — Integrations with external APIs (Liquidium API, Ordiscan, Best In Slot, mempool, email, etc).src/db/ — Database schema and Drizzle ORM setup.public/ — Static assets and branding.src/scripts/ — Utility scripts for PSBT decoding, rune helpers, and local integration testing. Use node src/scripts/create_principal.js --reveal-secret (or set PRINT_SECRET=true) if you need the generated ORACLE_PRIVATE_KEY; the default run only prints the principal for safety.Copy .env.example to .env and fill in the required values:
NEXT_PUBLIC_NETWORK — Network to use (mainnet or testnet4).DUST_AMOUNT — Minimum output value in sats. Recommended to be 546.DESIRED_UTXOS — Limit for the protocol to bisect UTXOs when stakes or unstakes take place.MEMPOOL_BALANCE — Use mempool for balance calculations instead of relying on the Best In Slot balance endpoint (boolean).MEMPOOL_HOST — Mempool API host used for the backend.NEXT_PUBLIC_MEMPOOL_URL — Public mempool explorer URL. Used solely for the front-end.DATABASE_URL — PostgreSQL connection string.REDIS_URL — Redis connection string. Used for the assignation of the UTXOs.CRON_SECRET — Secret for securing cron endpoints.ORACLE_PRIVATE_KEY — Private key used to authorize canister exchange rate operations.CANISTER_* — Canister configuration (CANISTER_ID, CANISTER_ADDRESS, CANISTER_PUBLIC_KEY, CANISTER_SECRET, RETENTION_ADDRESS, RETENTION_SECRET, CANISTER_MOCK, etc).BEST_IN_SLOT_URL / BEST_IN_SLOT_TOKEN — Best In Slot API base URL and token for rune data.ORDISCAN_API_URL / ORDISCAN_API_TOKEN — Ordiscan API base URL and token for rune market data.LIQUIDIUM_API_URL / LIQUIDIUM_API_TOKEN — Liquidium internal API base URL and token for rune-aware UTXO data.NEXT_PUBLIC_STAKED_* — Metadata for the staked rune (ID, NAME, SYMBOL, DECIMALS, etc).NEXT_PUBLIC_STAKED_SUPPLY — Total supply of the staked rune. Used for computing the exchange rate.NEXT_PUBLIC_TOKEN_* — Metadata for the underlying rune (ID, NAME, SYMBOL, DECIMALS, etc).NEXT_PUBLIC_EXPECTED_CONFIRMATIONS — Number of confirmations required to consider a transaction completed.NEXT_PUBLIC_WITHDRAW_TIME — Withdrawal lock time when the user unstake (in seconds).NEXT_PUBLIC_OVERWRITE_TOKEN_CONFIG — Toggle for overriding on-chain token metadata with environment configuration.| Endpoint | Method | Description |
|---|---|---|
/api/stake | POST | Create a PSBT for staking runes (user must sign with their wallet) |
/api/unstake | POST | Create a PSBT for unstaking and redeeming sLIQUIDIUM (user must sign with their wallet) |
/api/withdraw | POST | Create a PSBT for withdrawing tokens after unstaking (user must sign with their wallet) |
/api/stake/confirm | POST | Validate, send to canister, and broadcast the signed stake transaction |
/api/unstake/confirm | POST | Validate, send to canister, and broadcast the signed unstake transaction |
/api/withdraw/confirm | POST | Validate, send to canister, and broadcast the signed withdrawal transaction |
/api/protocol | GET | Get protocol stats and configuration |
/api/account/balance | GET | Get wallet balances for runes |
/api/account/txs | GET | Get wallet transaction history |
/api/fee-rates | GET | Get recommended fee rates from mempool.space with graceful fallbacks |
/api/stake/pending | GET | List pending stake transactions |
/api/unstake/pending | GET | List pending unstake transactions |
/api/email/subscribe | POST | Subscribe a wallet address to staking digest emails |
/api/email/status | GET | Check the subscription status for an address |
/api/email/unsubscribe | GET/POST | Remove an address from staking digest emails |
/api/email/verify | GET | Verify an email subscription token (redirects with status) |
/api/cron/* | GET | Internal cron endpoints (require secret) |
Endpoints
/stake,/unstake, and/withdrawonly create the PSBT that the user must sign with their wallet. The corresponding/confirmendpoints validate the signed transaction, interact with the canister, and broadcast it to the Bitcoin network.
This is the most critical cron job in the system because it maintains the exchange rate between the staked tokens and the underlying tokens based on the pool balances.
It retrieves the current exchange rate by calling canister.getExchangeRate() which provides:
The job calculates the staked balance (total supply - circulating) and stores the pool balances in the database for historical tracking and yield calculations.
This job is crucial because it:
This cron job is responsible for monitoring the status of stake, unstake, and withdraw transactions. It checks the status of the transactions in the blockchain and updates the status in the database.
It also checks if the transactions are confirmed and if they are, it updates the status in the database.
This cron job is responsible for fetching the token holders of the staked rune and storing them in the database. This is only used for analytics and preserving the data for future reference.
Generates and sends a weekly staking digest email to subscribed addresses. It aggregates balances, recent activity, APY snapshots, and rune market data (via Ordiscan with Best In Slot fallback) before delivering through the Mailjet provider.
src/app/debug/)This folder contains several pages and utilities for development and protocol debugging:
portfolio/ — Simulate and visualize staking portfolio and yield scenarios.utxos/ — Visualize and debug UTXO distribution and assignment.etcher/ — Test rune etching (minting) flows.minter/ — Test rune minting flows.signer/ — Test wallet signing flows.These tools are not intended for production use, but are for protocol development and testing.
Prerequisites:
pnpm install
.env.example to .env and configure your environment variables.pnpm dev
The project is configured for deployment on Vercel. Push to the main branch and Vercel will auto-deploy.
We welcome community contributions! Please read CONTRIBUTING.md for details on development workflows, coding standards, and how to propose changes. All participants are expected to follow our Code of Conduct.
If you discover a vulnerability, please follow the guidelines in SECURITY.md to report it responsibly. Do not open public issues for security-sensitive reports.
Distributed under the GNU GPL v3.0.
Developed by Liquidium Foundation in collaboration with Rather Labs.
NEXT_PUBLIC_DEBUG_TOKEN_PRICE / NEXT_PUBLIC_DEBUG_BTC_PRICE — Optional debug overrides for UI previews.MAILJET_API_KEY / MAILJET_API_SECRET / FROM_EMAIL / BASE_URL — Mailjet credentials and default site URL for transactional and digest emails.NEXT_PUBLIC_SITE_URL — Public-facing site URL for canonical links and redirects.NEXT_PUBLIC_POSTHOG_KEY / POSTHOG_API_KEY / POSTHOG_HOST / POSTHOG_SERVER_HOST — PostHog analytics configuration.GENERATE_SOURCEMAPS — Enables source map generation and PostHog uploads during builds.SUPPORT_API_KEY — Optional. Bearer key for the read-only /api/support/* routes used by the Liquidium Support Worker; when unset those routes return 404.SUPPORT_TOKEN_SECRET — Optional. HS256 secret (32+ bytes, unique to this app) for the 15-minute support tokens minted by POST /api/support/token.NEXT_PUBLIC_SUPPORT_WIDGET — Optional. true loads the Liquidium Support chat widget (https://support.liquidium.org/widget.js) and shows "Support" buttons in the header and footer; unset keeps the app as is.