mirror of
https://github.com/luxfi/maker.git
synced 2026-10-30 16:20:04 +00:00
91 lines
3.2 KiB
YAML
91 lines
3.2 KiB
YAML
# maker — V4 CLOB liquidity seeder, deployed in-cluster ALONGSIDE luxd so it can
|
|
# reach the native D-Chain CLOB route group at <DEX_HTTP_URL>/dex/<method>.
|
|
#
|
|
# It creates the canonical custody markets (LUX/LUSD, LUX/LETH) and maintains a
|
|
# 2-sided book around a reference mid every MAKER_INTERVAL — the orderbook the
|
|
# exchange Trade page renders (exchange-api reads the same D-Chain via dex_get_*).
|
|
#
|
|
# PER-NETWORK: change `namespace` + the DEX_HTTP_URL port to match the target
|
|
# luxd. The luxd RPC port differs per env (verified from lux infra):
|
|
# devnet → lux-devnet : http://luxd-0.luxd-headless:9650/v1/chain/D
|
|
# testnet → lux-testnet : http://luxd-0.luxd-headless:9640/v1/chain/D
|
|
# mainnet → lux-mainnet : http://luxd-0.luxd-headless:9630/v1/chain/D
|
|
# This base manifest targets devnet (where the end-to-end flow is validated).
|
|
# Deploy: `kubectl kustomize k8s | kubectl apply -f -`.
|
|
---
|
|
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: maker-config
|
|
namespace: lux-devnet
|
|
labels:
|
|
app: maker
|
|
data:
|
|
# REQUIRED: the D-Chain CLOB route prefix on the in-cluster luxd (chain alias D).
|
|
# The maker POSTs frozen frames to <DEX_HTTP_URL>/dex/<method>. Same base the
|
|
# exchange-api reads (dex_get_markets) — one chain surface.
|
|
DEX_HTTP_URL: "http://luxd-0.luxd-headless.lux-devnet.svc:9650/v1/chain/D"
|
|
# Maker identity written into each order / deposit (<=16 bytes).
|
|
MAKER_USER: "maker"
|
|
# Quote shape: half-spread (bps each side), levels per side, requote cadence.
|
|
MAKER_SPREAD_BPS: "10"
|
|
MAKER_LEVELS: "5"
|
|
MAKER_INTERVAL: "5s"
|
|
MAKER_SKEW_BPS: "2"
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: maker
|
|
namespace: lux-devnet
|
|
labels:
|
|
app: maker
|
|
component: clob-seeder
|
|
spec:
|
|
# Singleton: two seeders sharing MAKER_USER would double-deposit and fight over
|
|
# the same resting book. Recreate ensures the old pod stops before the new one
|
|
# starts (no two-maker overlap during a rollout).
|
|
replicas: 1
|
|
strategy:
|
|
type: Recreate
|
|
selector:
|
|
matchLabels:
|
|
app: maker
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: maker
|
|
component: clob-seeder
|
|
spec:
|
|
securityContext:
|
|
runAsNonRoot: true
|
|
runAsUser: 1000
|
|
runAsGroup: 1000
|
|
seccompProfile:
|
|
type: RuntimeDefault
|
|
containers:
|
|
- name: maker
|
|
# Pin a published tag (Docker Build Standard: vX.Y.Z or sha-<sha7>;
|
|
# never :latest/:main). v0.1.0 is the first release tag produced by CI.
|
|
image: ghcr.io/luxfi/maker:v0.1.0
|
|
imagePullPolicy: IfNotPresent
|
|
# No args: DEX_HTTP_URL (from the ConfigMap) is read as the -dex-http
|
|
# default, which puts the binary in seed mode (create + maintain the
|
|
# D-Chain books). Config flows through env only — one source of truth.
|
|
envFrom:
|
|
- configMapRef:
|
|
name: maker-config
|
|
securityContext:
|
|
allowPrivilegeEscalation: false
|
|
readOnlyRootFilesystem: true
|
|
capabilities:
|
|
drop: ["ALL"]
|
|
resources:
|
|
requests:
|
|
cpu: "25m"
|
|
memory: "64Mi"
|
|
limits:
|
|
cpu: "250m"
|
|
memory: "256Mi"
|
|
restartPolicy: Always
|