Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
248 commits
Select commit Hold shift + click to select a range
e86ec39
trigger build
shev-titan May 1, 2026
50ade9f
feat(vault): add depositForPermit for gasless approve+deposit
shev-titan May 1, 2026
8c34d46
feat(indexer): add CollateralVault subgraph with Goldsky CI/CD
shev-titan May 1, 2026
66dea82
initial mm
shev-titan May 5, 2026
1613216
reimplementation of MM
shev-titan May 5, 2026
85f6bea
refactor: update market maker configuration and schema to use Alchemy…
shev-titan May 5, 2026
cee619f
Merge pull request #1 from Lumerin-protocol/feat/unified-market-maker
shev-titan May 5, 2026
fa00122
fix: readme
shev-titan May 5, 2026
1fb26f1
Merge pull request #2 from Lumerin-protocol/feat/unified-market-maker
shev-titan May 5, 2026
66199fa
feat(infra): add bedrock terraform + deploy workflow for col-mar mark…
abs2023 May 5, 2026
ec4b9ba
fix: update CICD trigger version for market maker
abs2023 May 5, 2026
56e9eab
Merge pull request #3 from Lumerin-protocol/bedrock-infrasetup
abs2023 May 5, 2026
ade3b01
fix: update dockerfile, fix type stripping
shev-titan May 5, 2026
895a307
Merge pull request #4 from Lumerin-protocol/feat/unified-market-maker
shev-titan May 5, 2026
92b8f60
fix: update dockerfile, fix type stripping
shev-titan May 5, 2026
b8045fa
Merge pull request #5 from Lumerin-protocol/feat/unified-market-maker
shev-titan May 5, 2026
108c579
fix: dependencies for docker build
shev-titan May 6, 2026
128e9a0
Merge pull request #6 from Lumerin-protocol/feat/unified-market-maker
shev-titan May 6, 2026
e933f82
refactor: replace config summary with sanitised version in health checks
shev-titan May 6, 2026
3ae976f
Merge pull request #7 from Lumerin-protocol/feat/unified-market-maker
shev-titan May 6, 2026
1306a55
feat: add health URLs to deployment workflow
abs2023 May 6, 2026
efd7d26
Merge pull request #8 from Lumerin-protocol/bedrock/notification-url
abs2023 May 6, 2026
a9a4920
refactor: update additional_info formatting in deployment workflow
abs2023 May 6, 2026
9874eb1
Merge pull request #9 from Lumerin-protocol/bedrock/notification-url
abs2023 May 6, 2026
3facd2f
feat: hashprice subgraph integration for historical price query for v…
shev-titan May 6, 2026
9766180
Merge pull request #10 from Lumerin-protocol/feat/unified-market-maker
lsheva May 6, 2026
92c08e8
fix: add indexer env var
shev-titan May 6, 2026
47031eb
Merge pull request #11 from Lumerin-protocol/fix/mm-add-env-var
lsheva May 6, 2026
dbe7031
fix: add missing HASHPRICE_ORACLE_SUBGRAPH_URL var
shev-titan May 6, 2026
ef77952
Merge pull request #12 from Lumerin-protocol/fix/mm-add-env-var
lsheva May 6, 2026
8fb3c5e
feat: add depositForPermit function to CollateralVault and introduce …
shev-titan May 12, 2026
edf945b
feat: initialize collateral-margin keeper with Docker setup, configur…
shev-titan May 13, 2026
88a1269
integration tests
shev-titan May 14, 2026
ef9fd94
feat: enhance PerpsVenue with multicall liquidations and add integrat…
shev-titan May 14, 2026
c967e16
market-maker: flatten viem error chains in serialization
shev-titan May 25, 2026
1e914f9
keeper: add error serializer to pino config, delivery coordinator, an…
shev-titan May 25, 2026
b4cf275
market-maker: fix type errors — Lot events replace Position events, O…
shev-titan May 25, 2026
978d1d1
Merge pull request #13 from Lumerin-protocol/feat/coordinated-liquida…
shev-titan May 25, 2026
73d495a
Multicall batch size + order aggregation
shev-titan May 25, 2026
be12066
MulticallBatchSize and scripts chores
shev-titan May 25, 2026
d06f6fc
Merge pull request #14 from Lumerin-protocol/feat/coordinated-liquida…
shev-titan May 25, 2026
942c819
refactor(market-maker): move order execution lifecycle into instrumen…
shev-titan May 26, 2026
43a87d8
refactor(market-maker): split batch sizing into read/cancel/create co…
shev-titan May 26, 2026
dfe9c45
Merge pull request #15 from Lumerin-protocol/feat/coordinated-liquida…
shev-titan May 26, 2026
62fb448
fix(keeper): adapt to Futures v2.11.0 event/function renames
shev-titan May 26, 2026
350c661
ci(keeper): add test + deploy pipelines, switch to GitHub deps
shev-titan May 26, 2026
8b5750b
refactor(keeper): switch ABI deps to GitHub sources with pnpm patches
shev-titan May 26, 2026
b24d4d7
Remove pnpm version pin in CI workflow
shev-titan May 26, 2026
21007d4
trigger build
shev-titan May 26, 2026
23314ee
fix(ci): remove invalid working-directory from checkout step, scope p…
shev-titan May 26, 2026
0c56f87
fix: regen lockfile
shev-titan May 26, 2026
78a89bb
ci: integration test setup
shev-titan May 26, 2026
9b4b184
Update keeper-test.yml
shev-titan May 26, 2026
12fdd00
Update keeper-test.yml
shev-titan May 26, 2026
ab6bb09
Update keeper-test.yml
shev-titan May 26, 2026
b7508c6
Update keeper-test.yml
shev-titan May 26, 2026
e517592
Update keeper-test.yml
shev-titan May 26, 2026
43f762c
Update keeper-test.yml
shev-titan May 26, 2026
617f584
Update keeper-test.yml
shev-titan May 26, 2026
8959156
Update keeper-test.yml
shev-titan May 26, 2026
1ea1f35
Update keeper-test.yml
shev-titan May 26, 2026
78ef51f
Update keeper-test.yml
shev-titan May 26, 2026
102f3c7
Merge pull request #16 from Lumerin-protocol/feat/coordinated-liquida…
shev-titan May 26, 2026
119b5f8
fix(market-maker): requote gatekeeper misses stale orders at wrong pr…
shev-titan May 26, 2026
3e883f7
chore(market-maker): add fetch-logs.sh for CloudWatch log streaming
shev-titan May 26, 2026
05385eb
chore(market-maker): parameterise fetch-logs.sh by venue (futures|per…
shev-titan May 26, 2026
ade3132
Merge pull request #17 from Lumerin-protocol/feat/coordinated-liquida…
shev-titan May 26, 2026
fe7ec9c
fix(market-maker): correct import paths and add type annotation in or…
shev-titan May 26, 2026
e60db75
Merge pull request #18 from Lumerin-protocol/feat/coordinated-liquida…
shev-titan May 26, 2026
c7b2422
refactor(market-maker): wire batch sizes into every multicall via config
shev-titan May 26, 2026
124c185
Merge pull request #19 from Lumerin-protocol/feat/coordinated-liquida…
shev-titan May 26, 2026
219e3a1
feat(bedrock): add unified keeper ECS scaffolding and fix deploy CI
abs2023 May 26, 2026
6ff00d6
Merge pull request #20 from Lumerin-protocol/fix/col-mar-keeper-infra
abs2023 May 26, 2026
d277e70
fix(keeper): repair CI tests and Docker build after keeper infra merge
abs2023 May 26, 2026
2c0b4ac
Merge pull request #21 from Lumerin-protocol/fix/ci-keeper-node24
abs2023 May 26, 2026
7d808e3
ci(keeper): use Node 24-native GitHub Actions
abs2023 May 26, 2026
f91301d
Merge pull request #23 from Lumerin-protocol/fix/ci-actions-node24
abs2023 May 26, 2026
03715e1
fix(ci): clear Terraform stub command on keeper ECS deploy
abs2023 May 26, 2026
fe3a7df
fix(keeper): split Docker CMD flags for amaro import
abs2023 May 26, 2026
b15474e
Merge pull request #24 from Lumerin-protocol/fix/keeper-deploy-clear-…
abs2023 May 26, 2026
e81ed30
feat(points): add on-chain points program (Points, hook, redeemer) + …
shev-titan Jun 8, 2026
3f20c4a
docs(points): note unplug-before-finalize ordering on hook and finali…
shev-titan Jun 8, 2026
984b6ef
feat(points): drop hook accrual events, mirror mints from Transfer
shev-titan Jun 9, 2026
26a8a4c
chore(scripts): use PERPS_ADDRESS env var in deploy scripts
shev-titan Jun 9, 2026
c53468b
ci(points): add points subgraph deploy + test pipelines
shev-titan Jun 9, 2026
900f165
Merge pull request #25 from Lumerin-protocol/feat/points
shev-titan Jun 9, 2026
bf1f6cd
feat(points): add maker price-improvement multiplier to PointsHook
shev-titan Jun 11, 2026
4fa0342
feat(points): add deploy-points-hook script (redeploy hook, keep token)
shev-titan Jun 11, 2026
dfa9c5a
chore(points): disable redemption indexing for initial rollout
shev-titan Jun 11, 2026
4a7e6ae
Merge pull request #26 from Lumerin-protocol/feat/points
lsheva Jun 11, 2026
e4e604a
fix(points-subgraph): default Goldsky subgraph name to hpow-points
abs2023 Jun 11, 2026
1fb9984
fix(points): disable import of reedemer handlers
shev-titan Jun 15, 2026
e595d5d
Merge pull request #28 from Lumerin-protocol/feat/points
shev-titan Jun 15, 2026
aaa19a5
Merge pull request #27 from Lumerin-protocol/fix/dev-gs-points
shev-titan Jun 15, 2026
b280f5e
test: fix missing import
shev-titan Jun 15, 2026
b7549c8
Merge pull request #29 from Lumerin-protocol/feat/points
shev-titan Jun 15, 2026
49e48e9
ci(keeper): verify deploy rolled forward to the new revision
shev-titan Jun 16, 2026
a7f89b8
test(keeper): de-flake delivery settlement index-drop assertion
shev-titan Jun 16, 2026
332350e
Merge pull request #30 from Lumerin-protocol/feat/points
shev-titan Jun 16, 2026
094efc8
feat: disable delivery
shev-titan Jun 19, 2026
6edb8d6
chore: update futures-marketplace-abi dependency to a specific GitHub…
shev-titan Jun 19, 2026
5b94265
fix: patch abi
shev-titan Jun 20, 2026
15963f4
fix: deps resolution
shev-titan Jun 20, 2026
4ba5a84
Merge pull request #31 from Lumerin-protocol/feat/no-delivery
shev-titan Jun 20, 2026
a9c69e4
feat(keeper): liquidate-to-IM-buffer orchestration across futures + p…
shev-titan Jul 6, 2026
a4f5e0b
ci(keeper): pin sibling contract checkouts to feat/liquidate-to-im-bu…
shev-titan Jul 7, 2026
57058b8
fix(keeper): pin ABI deps to feat/liquidate-to-im-buffer contracts
shev-titan Jul 7, 2026
35f9b14
fix: ci typecheck
shev-titan Jul 7, 2026
d335ea9
Merge pull request #32 from Lumerin-protocol/feat/liquidate-to-im-buffer
shev-titan Jul 7, 2026
0b23c37
feat: align keeper + market-maker with the 1 PH/s/day contract unit
shev-titan Jul 8, 2026
fb67eca
chore(market-maker): include in-progress portfolio market-maker work
shev-titan Jul 8, 2026
3d69ec7
chore: pin keeper + market-maker contract ABI deps to merged dev commits
shev-titan Jul 8, 2026
ea9a46a
ci: fix flaky subgraph tests and unreachable keeper health check
shev-titan Jul 9, 2026
b3a7f19
ci: fix flaky subgraph tests and unreachable keeper health check
shev-titan Jul 9, 2026
0955030
Merge pull request #34 from Lumerin-protocol/ci/fix-dev-pipelines
shev-titan Jul 9, 2026
02c4958
test: fix position size for the cross venue test
shev-titan Jul 9, 2026
ce00917
Merge pull request #33 from Lumerin-protocol/feat/ph-contract-unit
shev-titan Jul 9, 2026
ef1e1a1
feat: single instance of market maker
shev-titan Jul 14, 2026
8d0b097
fix: update expected order count logic for exact-matching venues and …
shev-titan Jul 14, 2026
88e08eb
Merge pull request #35 from Lumerin-protocol/feat/ph-contract-unit
shev-titan Jul 14, 2026
7fc8b7a
fix(market-maker): tolerate shared-signer nonce contention
shev-titan Jul 15, 2026
d353d9f
Merge pull request #36 from Lumerin-protocol/feat/ph-contract-unit
shev-titan Jul 15, 2026
aec618d
feat(keeper,mm): retarget Futures venue to 3.0 aggregate API
shev-titan Jul 20, 2026
5153249
fix(keeper): restore futures-marketplace-abi pnpm patch
shev-titan Jul 20, 2026
f6a05d3
fix(ci,mm): align Futures 3.0 ABI pin and createOrder args
shev-titan Jul 20, 2026
23589b2
fix(keeper): pin futures ABI to commit that ships package.json
shev-titan Jul 20, 2026
f952ac6
refactor(futures): align PME/keeper/MM names with Futures expirationA…
shev-titan Jul 20, 2026
3cddb2f
fix(mm): read futures book via getOrderBookPrices
shev-titan Jul 20, 2026
fdb1d3c
fix(ci): bump PME VERSION and drop fragile futures ABI patch
shev-titan Jul 20, 2026
62901e9
fix(keeper): restore path in futures ABI lockfile resolution
shev-titan Jul 20, 2026
fe34a2b
test(keeper): align getOrder mocks with Futures 3.1 Order shape
shev-titan Jul 20, 2026
3c836e6
chore(deps): pin futures ABI to 3.1 Order unify tip
shev-titan Jul 20, 2026
ce0b494
fix(keeper): keep path:/contracts/abi in futures lockfile resolution
shev-titan Jul 20, 2026
b286a46
Merge pull request #37 from Lumerin-protocol/feat/futures-3-keeper-mm
shev-titan Jul 20, 2026
703c07a
feat(mm): drop exact matching mode for limit LOB stale policy
shev-titan Jul 20, 2026
9749b22
Merge pull request #38 from Lumerin-protocol/feat/mm-limit-matching
shev-titan Jul 20, 2026
7286387
feat(mm,keeper): submit via updateOrders; align liquidation comments
shev-titan Jul 21, 2026
5c217cc
docs: add AI agent discoverability plan
shev-titan Jul 21, 2026
d84b006
chore(deps): pin futures/perps to updateOrders liquidation SHAs
shev-titan Jul 22, 2026
872ce18
fix(keeper): interleave multi-expiry close legs for stop-when-healthy
shev-titan Jul 22, 2026
1c032d2
Merge pull request #39 from Lumerin-protocol/feat/mm-update-orders
shev-titan Jul 22, 2026
79fa56d
feat(mm): unify geometric-taper sizing and decay far futures expiries
shev-titan Jul 22, 2026
c3a15d3
Merge pull request #40 from Lumerin-protocol/feat/mm-taper-expiry-sizing
shev-titan Jul 22, 2026
54b4b08
feat(mm): raise dev collateral cap and split human/raw health
shev-titan Jul 22, 2026
535d98a
Merge pull request #41 from Lumerin-protocol/feat/mm-health-collateral
shev-titan Jul 22, 2026
0ca704d
chore: add biome lint gates and align Hardhat 3.9.1
shev-titan Jul 22, 2026
cf72bd4
chore: add typecheck CI gates for indexer packages
shev-titan Jul 22, 2026
3929f17
fix(keeper): restore path:/contracts/abi in futures ABI lockfile
shev-titan Jul 22, 2026
9253595
fix(keeper): restore path:/contracts/abi for perps ABI lockfile
shev-titan Jul 22, 2026
ca8c7b3
Merge pull request #42 from Lumerin-protocol/chore/typecheck-lint-ci
shev-titan Jul 22, 2026
d9862bc
feat(mm): use reduce-only amends in updateOrders
shev-titan Jul 22, 2026
4900db6
chore: refresh keeper/MM lockfiles for reduce-order deps
shev-titan Jul 22, 2026
2f96ae6
fix(keeper): restore ABI path in lockfile and CI errors
shev-titan Jul 22, 2026
145a2b7
chore: bump contract git deps to regenerated ABI commits
shev-titan Jul 22, 2026
2cce601
Merge pull request #43 from Lumerin-protocol/feat/reduce-order-size
shev-titan Jul 22, 2026
74c93e1
feat(mm): cut requote churn with band and size allowances
shev-titan Jul 22, 2026
6ed5673
chore(mm): raise staleSizeAllowanceUsd default to 50
shev-titan Jul 22, 2026
79078a8
Merge pull request #44 from Lumerin-protocol/feat/mm-band-size-allowance
shev-titan Jul 22, 2026
420b722
test(mm): cover band/size allowance grid-slide and strict mode
shev-titan Jul 22, 2026
c7a941b
fix(mm): cancel better leftovers that would self-match
shev-titan Jul 22, 2026
13559cf
Merge pull request #45 from Lumerin-protocol/fix/mm-cancel-self-match
shev-titan Jul 22, 2026
9dc4d6f
feat(keeper,mm): drop oracle unit rebase for 1 PH/s·day HashpriceUSD
shev-titan Jul 27, 2026
166215e
fix(ci): install hardhat-viem-abi via HTTPS tarball
shev-titan Jul 27, 2026
a4c7ee0
Merge pull request #46 from Lumerin-protocol/feat/hashprice-usd-1ph-unit
lsheva Jul 28, 2026
b424cde
feat: add @hashpower/collateral-abi npm package with auto-publish pip…
abs2023 Jul 29, 2026
a7f184a
ci: add ABI drift check (compile-and-compare on contract changes)
abs2023 Jul 29, 2026
df8a549
Merge pull request #47 from Lumerin-protocol/feat/collateral-abi-package
abs2023 Jul 29, 2026
29b0c93
fix(ci): tag ABI releases instead of committing version bump to prote…
abs2023 Jul 29, 2026
858546c
Merge pull request #48 from Lumerin-protocol/fix/abi-publish-tag
abs2023 Jul 29, 2026
4b97f64
ci(collateral-abi): 0.x semver line for pre-GA + exact-version dispat…
abs2023 Jul 30, 2026
d064610
Merge pull request #49 from Lumerin-protocol/ci/abi-0x-semver
abs2023 Jul 30, 2026
dcd2b82
fix(collateral-abi): semver diff only counts JSON arrays as ABI files
abs2023 Jul 30, 2026
cf29d38
Merge pull request #50 from Lumerin-protocol/fix/abi-diff-manifest
abs2023 Jul 30, 2026
bde0c39
ci(collateral-abi): publish with explicit --tag latest to allow versi…
abs2023 Jul 30, 2026
15cd5b4
Merge pull request #51 from Lumerin-protocol/ci/publish-tag-latest
abs2023 Jul 30, 2026
a59eb93
ci(collateral-abi): dispatch hashpower.io rebuild after publish
abs2023 Jul 30, 2026
7db5fc6
Merge pull request #52 from Lumerin-protocol/ci/dispatch-site-rebuild
abs2023 Jul 30, 2026
5f85519
fix: rename setMarginEngine → setPortfolioMargin in keeper deploy stack
shev-titan Jul 31, 2026
339a59a
feat(engine): stress resting orders and net PnL portfolio-wide
shev-titan Aug 5, 2026
cb9b4f6
refactor(keeper): extract the margin model into @hashpower/portfolio-…
shev-titan Aug 5, 2026
bb697e8
chore(keeper): lock the portfolio-margin git dependency
shev-titan Aug 5, 2026
4846d1e
chore(abi): declare the abi folder as a package
shev-titan Aug 5, 2026
cded226
chore(keeper): pin ABIs to the current contracts and drop the manifes…
shev-titan Aug 5, 2026
9372f53
chore(build): upgrade hardhat-viem-abi and name the generated ABI pac…
shev-titan Aug 6, 2026
88c05ef
fix: deploy pme script
shev-titan Aug 6, 2026
2c0167d
feat: inc version
shev-titan Aug 6, 2026
0783cea
ci(keeper): point venue checkouts at the branches implementing this e…
shev-titan Aug 6, 2026
8d50711
Merge pull request #53 from Lumerin-protocol/feat/hashprice-usd-1ph-unit
lsheva Aug 6, 2026
f9a1b95
fix(market-maker): resolve collateral token through vault
shev-titan Aug 6, 2026
2b81ff2
Merge pull request #54 from Lumerin-protocol/feat/hashprice-usd-1ph-unit
lsheva Aug 6, 2026
f3c91b5
fix(keeper): remove obsolete Docker patch copy
shev-titan Aug 6, 2026
c34b4a3
Merge pull request #55 from Lumerin-protocol/feat/hashprice-usd-1ph-unit
lsheva Aug 6, 2026
659f0a6
fix(market-maker): adapt to current venue ABIs
shev-titan Aug 7, 2026
c614362
Merge pull request #56 from Lumerin-protocol/feat/hashprice-usd-1ph-unit
lsheva Aug 7, 2026
f78886f
chore(keeper): refresh contract ABI dependencies
shev-titan Aug 7, 2026
c4d5ce9
Merge pull request #57 from Lumerin-protocol/feat/hashprice-usd-1ph-unit
lsheva Aug 7, 2026
18571f9
refactor(keeper): consume unified order aggregates
shev-titan Aug 7, 2026
4f1a1c5
refactor: use typed contract batch methods
shev-titan Aug 7, 2026
f807ff7
refactor: retire expired-order sweeper
shev-titan Aug 7, 2026
890fc7c
perf(pme): specialize resting order checks
shev-titan Aug 8, 2026
2bf1d05
perf(pme): compute liquidation margins together
shev-titan Aug 8, 2026
c0ecd98
fix(pme): fail closed on invalid spot prices
shev-titan Aug 8, 2026
b445276
fix(pme): preserve signed option convexity
shev-titan Aug 8, 2026
8661576
perf(pme): fast-return zero order margin
shev-titan Aug 8, 2026
863a4e6
perf(pme): collapse equivalent stress scenarios
shev-titan Aug 8, 2026
559f3af
fix(contracts): mirror signed perps entry value
shev-titan Aug 10, 2026
60aed6a
fix(keeper): decode signed perps entry value
shev-titan Aug 10, 2026
9e24a51
fix(market-maker): decode signed perps entry value
shev-titan Aug 10, 2026
e642d9b
fix(keeper): align integration harness with siblings
shev-titan Aug 10, 2026
ed089e7
refactor(futures): consume HashPowerFutures artifact
shev-titan Aug 10, 2026
fbc4515
fix(futures): sync consumer ABI
shev-titan Aug 10, 2026
ecb877b
fix(keeper): read futures orders via AtExpiration multicalls
shev-titan Aug 10, 2026
b4e8d29
feat(pme): add isLiquidatable — the canonical cross-venue health pred…
shev-titan Aug 10, 2026
d6eea43
refactor: drop venue isLiquidatable from mocks, ABIs and consumers
shev-titan Aug 10, 2026
b8a7647
fix(keeper): pin pnpm 10 to keep git subpath deps
shev-titan Aug 17, 2026
5f74df8
fix(ci): run market-maker tests on node 24
shev-titan Aug 17, 2026
d4e7659
fix(ci): pin siblings to the converged contract branches
shev-titan Aug 17, 2026
a8ac309
fix(keeper): read futures order ids without multicall3
shev-titan Aug 17, 2026
a1bf400
fix(ci): run market-maker tests through the package script
shev-titan Aug 17, 2026
a06131f
chore: adopt pnpm 11.22 across every package
shev-titan Aug 17, 2026
c4c6153
fix(ci): declare build allowances for pnpm 11
shev-titan Aug 17, 2026
8741e70
chore(points-indexer): track matchstick-ts by tag
shev-titan Aug 17, 2026
f012946
Merge pull request #59 from Lumerin-protocol/refactor/remove-outdated…
shev-titan Aug 17, 2026
f947b29
chore: adopt pnpm 11.22 at the repo root
shev-titan Aug 17, 2026
f31525a
fix(mm): ship pnpm-workspace.yaml into the Docker deps stage
shev-titan Aug 17, 2026
a6dbfe7
Merge pull request #61 from Lumerin-protocol/fix/mm-docker-pnpm-works…
shev-titan Aug 17, 2026
d998697
Merge pull request #60 from Lumerin-protocol/chore/pnpm-11.22
shev-titan Aug 17, 2026
0ebb776
fix(keeper): forward discovery backfill block
shev-titan Sep 1, 2026
51db674
feat(keeper): index futures participants by expiry
shev-titan Sep 1, 2026
6284a5b
Merge pull request #62 from Lumerin-protocol/fix/keeper-backfill-env
shev-titan Sep 1, 2026
61693aa
fix(keeper): expose liveness during startup
shev-titan Sep 1, 2026
58ba907
Merge pull request #63 from Lumerin-protocol/fix/keeper-startup-health
shev-titan Sep 1, 2026
c7da87f
feat(contracts): add Hardhat --env loader plugin
shev-titan Sep 15, 2026
667f314
chore: add .env.example for machine-local secrets
shev-titan Sep 15, 2026
bf25da8
ci: dispatch ABI publishes to hashpower-mcp so hosted MCP can follow
abs2023 Sep 15, 2026
baa9423
ci: also publish collateral-abi from main
abs2023 Sep 15, 2026
df1b6f6
Merge pull request #66 from Lumerin-protocol/chore/mcp-abi-dispatch
abs2023 Sep 15, 2026
d1977e8
refactor: canonicalize the mainnet network name to base
shev-titan Sep 17, 2026
7648f1f
feat: load public config from config/<env>.env everywhere
shev-titan Sep 17, 2026
abd0616
fix(contracts): drop run:stg now that config/stg.env is gone
shev-titan Sep 17, 2026
186f7f4
fix(indexer): source ENV_FILE by an explicit relative path
shev-titan Sep 17, 2026
9ead5c4
Merge pull request #65 from Lumerin-protocol/feat/hardhat-env-loader
shev-titan Sep 17, 2026
f36530a
fix(config): set subgraph start blocks so Goldsky can deploy
shev-titan Sep 17, 2026
8533436
Merge pull request #67 from Lumerin-protocol/fix/subgraph-start-blocks
shev-titan Sep 17, 2026
37aa20e
Inject keeper and market-maker secrets from Secrets Manager.
abs2023 Sep 21, 2026
9ea3d84
Merge pull request #69 from Lumerin-protocol/bedrock/deploy_to_main
abs2023 Sep 21, 2026
0fb1bbd
Stop creating the unused perps market-maker service.
abs2023 Sep 21, 2026
07ffe63
Merge pull request #70 from Lumerin-protocol/bedrock/deploy_to_main
abs2023 Sep 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
111 changes: 111 additions & 0 deletions .bedrock/.terragrunt/00_bedrock.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
################################################################################
# VERSIONS
################################################################################
terraform {
required_version = ">= 1.2.7"
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 6.37.0" # Latest version as of 2026-01-15
}
}
}

################################################################################
# Profiles - Interpolation is not supported for the 'version' input
################################################################################
# Default profile - used for global configs and where a provider is not defined
provider "aws" {
region = "us-east-1"
profile = var.provider_profile
ignore_tags {
key_prefixes = ["kubernetes.io/"] # all resources will ignore any addition of tags with the kubernetes.io/ prefix
}
}

##########################
# Region-specific profiles
##########################
# titanio-net
provider "aws" {
alias = "titanio-net"
region = "us-east-1"
profile = "titanio-net"
ignore_tags {
key_prefixes = ["kubernetes.io/"]
}
}
# titanio-prd
provider "aws" {
alias = "titanio-prd"
region = "us-east-1"
profile = "titanio-prd"
ignore_tags {
key_prefixes = ["kubernetes.io/"]
}
}

# Virginia
provider "aws" {
alias = "use1"
region = "us-east-1"
profile = var.provider_profile
ignore_tags {
key_prefixes = ["kubernetes.io/"]
}
}
# Ohio
provider "aws" {
alias = "use2"
region = "us-east-2"
profile = var.provider_profile
ignore_tags {
key_prefixes = ["kubernetes.io/"]
}
}
# California
provider "aws" {
alias = "usw1"
region = "us-west-1"
profile = var.provider_profile
ignore_tags {
key_prefixes = ["kubernetes.io/"]
}
}
# Oregon
provider "aws" {
alias = "usw2"
region = "us-west-2"
profile = var.provider_profile
ignore_tags {
key_prefixes = ["kubernetes.io/"]
}
}

# Frankfurt
provider "aws" {
alias = "euc1"
region = "eu-central-1"
profile = var.provider_profile
ignore_tags {
key_prefixes = ["kubernetes.io/"]
}
}
# Singapore
provider "aws" {
alias = "apse1"
region = "ap-southeast-1"
profile = var.provider_profile
ignore_tags {
key_prefixes = ["kubernetes.io/"]
}
}
# Hong Kong
provider "aws" {
alias = "ape1"
region = "ap-east-1"
profile = var.provider_profile
ignore_tags {
key_prefixes = ["kubernetes.io/"]
}
}
103 changes: 103 additions & 0 deletions .bedrock/.terragrunt/00_data_global.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
################################################################################
# APP-SPECIFIC GLOBAL LOOKUPS (data files, dns, iam, etc...)
################################################################################

################################################################################
# DEVOPS/BEDROCK SOURCE INFO
################################################################################

################################
# WAF Protection - for Cloudfront (Global Scope)
################################
data "aws_wafv2_web_acl" "bedrock_waf_cloudfront" {
provider = aws.use1
name = "waf-bedrock-cloudfront"
scope = "CLOUDFRONT"
}
################################################################################
# ECS CLUSTER LOOKUP
################################################################################
# The ECS cluster is owned by the derivatives-marketplace repo (resource
# aws_ecs_cluster.derivatives_marketplace). We share the cluster across
# both repos to avoid running two Fargate clusters per account.
#
# Coupling note: if derivatives-marketplace destroys the cluster, the
# services defined in this repo will stop. Coordinate cluster-level
# changes between the two repos.
################################################################################

data "aws_ecs_cluster" "derivatives" {
provider = aws.use1
cluster_name = local.derivatives_ecs_cluster_name
}


################################
# Hashpower DNS & ACM Lookups
#
# Conditional: lmn resolves root domains, dev/stg resolve env subdomains.
# Dependent code uses the same local reference regardless of account.
#
# Usage:
# DNS zone:
# local.hp_dns["exc"].zone_id
# local.hp_dns["exc"].name # "hashpower.exchange" (lmn) or "dev.hashpower.exchange" (dev)
# local.hp_dns["tok"].zone_id
#
# ACM cert:
# local.hp_acm["exc"].arn
# local.hp_acm["tok"].arn
#
# Keys: exc = hashpower.exchange, tok = hpow.io, com = hashpower.io (when acquired)
################################
locals {
env_prefix = substr(var.account_shortname, 8, 3)
is_lmn = local.env_prefix == "lmn"

hashpower_domains = {
exc = "hashpower.exchange"
tok = "hpow.io"
# com = "hashpower.io" # uncomment when domain is acquired
}
}

# DNS: root zones in titanio-net (lmn only)
data "aws_route53_zone" "hp_root" {
for_each = local.is_lmn ? local.hashpower_domains : {}
provider = aws.titanio-net
name = each.value
private_zone = false
}

# DNS: env subdomain zones in local account (dev, stg)
data "aws_route53_zone" "hp_env" {
for_each = local.is_lmn ? {} : local.hashpower_domains
provider = aws.use1
name = "${local.env_prefix}.${each.value}"
private_zone = false
}

# ACM: always in local account, domain conditional on env
data "aws_acm_certificate" "hp" {
for_each = local.hashpower_domains
provider = aws.use1
domain = local.is_lmn ? each.value : "${local.env_prefix}.${each.value}"
statuses = ["ISSUED"]
}

locals {
hp_dns = local.is_lmn ? data.aws_route53_zone.hp_root : data.aws_route53_zone.hp_env
hp_acm = data.aws_acm_certificate.hp
}

output "hp_dns" {
value = { for k, v in local.hp_dns : k => { zone_id = v.zone_id, name = v.name } }
}

output "hp_acm" {
value = { for k, v in local.hp_acm : k => {
arn = v.arn
domain = local.is_lmn ? local.hashpower_domains[k] : "${local.env_prefix}.${local.hashpower_domains[k]}"
} }
}

88 changes: 88 additions & 0 deletions .bedrock/.terragrunt/00_data_use1_1.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
################################
# Regional DATA LOOKUPS
################################

data "aws_vpc" "use1_1" {
provider = aws.use1
tags = {
Name = "vpc-${var.region_shortname}-${var.vpc_index}-${var.account_shortname}"
}
}
data "aws_internet_gateway" "use1_1" {
provider = aws.use1
filter {
name = "attachment.vpc-id"
values = [data.aws_vpc.use1_1.id]
}
}

data "aws_subnet" "edge_use1_1" {
provider = aws.use1
count = 3
filter {
name = "tag:Name"
values = ["sn-use1-1-${var.account_shortname}-edge-${count.index + 1}"]
}
# in code for sgs, use the following: subnet_ids = [for n in data.aws_subnet.edge_use1_1 : n.id]
}

data "aws_subnet" "middle_use1_1" {
provider = aws.use1
count = 3
filter {
name = "tag:Name"
values = ["sn-use1-1-${var.account_shortname}-middle-${count.index + 1}"]
}
# in code for sgs, use the following: subnet_ids = [for n in data.aws_subnet.middle_use1_1 : n.id]
}

data "aws_subnet" "private_use1_1" {
provider = aws.use1
count = 3
filter {
name = "tag:Name"
values = ["sn-use1-1-${var.account_shortname}-private-${count.index + 1}"]
}
# in code for sgs, use the following: subnet_ids = [for n in data.aws_subnet.private_use1_1 : n.id]
}

data "aws_subnet" "edge_use1_1a" {
provider = aws.use1
filter {
name = "tag:Name"
values = ["sn-use1-1-${var.account_shortname}-edge-1"]
}
}

data "aws_subnet" "middle_use1_1a" {
provider = aws.use1
filter {
name = "tag:Name"
values = ["sn-use1-1-${var.account_shortname}-middle-1"]
}
}

# Regional ALB: ACM for the env public zone (hashpower.exchange or dev/stg.hashpower.exchange)
data "aws_acm_certificate" "lumerin_marketplace_ext" {
provider = aws.use1
domain = local.hp_dns["exc"].name
types = ["AMAZON_ISSUED"]
most_recent = true
}

# CloudFront / website (if used): same zone as hp_acm["exc"]
data "aws_acm_certificate" "lumerin_marketplace_website" {
provider = aws.use1
domain = local.hp_dns["exc"].name
types = ["AMAZON_ISSUED"]
most_recent = true
}

################################
# WAF Protection
################################
data "aws_wafv2_web_acl" "bedrock_waf_use1_1" {
provider = aws.use1
name = "waf-bedrock-use1-1"
scope = "REGIONAL"
}
32 changes: 32 additions & 0 deletions .bedrock/.terragrunt/00_outputs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
################################################################################
# OUTPUTS - # Usage: terragrunt output <name>
################################################################################

output "github_actions_role_arn" {
description = "ARN of the IAM role for GitHub Actions"
value = var.create_core ? aws_iam_role.github_actions_collateral_margin[0].arn : null
}

output "github_actions_role_name" {
description = "Name of the IAM role for GitHub Actions"
value = var.create_core ? aws_iam_role.github_actions_collateral_margin[0].name : null
}

################################################################################
# SERVICE ENDPOINTS (internal ALB, reachable via VPN)
################################################################################

output "perps_mm_endpoint" {
description = "Perps Market Maker health endpoint (internal ALB via VPN)"
value = var.perps_mm_service.create ? "https://perpsmm.${local.hp_dns["exc"].name}/health" : null
}

output "futures_mm_endpoint" {
description = "Futures Market Maker health endpoint (internal ALB via VPN)"
value = var.futures_mm_service.create ? "https://futuresmm.${local.hp_dns["exc"].name}/health" : null
}

output "col_mar_keeper_endpoint" {
description = "Unified margin keeper health endpoint (internal ALB via VPN)"
value = var.keeper_service.create ? "https://keeper.${local.hp_dns["exc"].name}/health" : null
}
Loading
Loading