Files
zeekayandHanzo Dev 188a4f4e8a chain: the deploy key signs, and owns nothing afterwards
The markets could not be built at all — LiquidInitializationParams grew a
maxPriceDeviation rate limiter, and SecurityTokenAdapter reports one address
for both halves of a pair the engine now checks, which a like-kind market can
never satisfy. Index is that pair's price: collateral in its own synthetic,
opening at parity, and unable to fall, so an oracle can hand out room but never
seize a position.

What did deploy left the deploy key holding all of it: unlimited synthetic and
collateral mint, arbitrary NAV, halt, and the fee vaults. Ownership now goes to
OWNER and the yield index to ORACLE, and each step re-reads the chain and fails
the run if the deploy key kept anything. Both handovers are by nomination, so
each market is built by a Regent that spends itself in the transaction that
creates it rather than by a key that would stay admin until the multisig signs.

Nothing mints synthetic outside a market: the fee vaults' float was supply
totalSyntheticsIssued never counted, which the transmuter's own arithmetic
underflows on.

The lib/ symlinks point at working trees, so pins records a hash of every
source each step compiles and deploy.sh stops before broadcasting if upstream
moved. deploy.json is gone — deploy/<chainId>.json is the one address book, and
the two disagreed about which address held LBTC.

Co-authored-by: Hanzo Dev <[email protected]>
2026-08-25 12:30:56 -07:00

97 lines
3.6 KiB
TOML

# The Lux Financial on-chain stack. The tokens come from luxfi/standard and the
# self-repaying-loan protocol from luxfi/liquid; this broadcasts them, hands the
# result to its owner, and records the addresses.
#
# Two contracts are defined here, both under the protocol's pragma, and both
# because the shape of this deployment has no expression upstream. Index prices a
# like-kind market, which neither adapter in the protocol repo can describe.
# Regent is a market's admin for the one transaction that builds it, so that the
# deploy key never is.
#
# The two repos disagree on solc: standard pins ^0.8.31, liquid pins 0.8.28. So
# each step compiles under the pragma of the repo it deploys from, and the steps
# hand addresses to each other through JSON. No contract is ever re-declared to
# bridge the gap.
#
# tokens (0.8.31) collateral and synthetics -> out/tokens.<chain>.json
# protocol (0.8.28) a Liquid market per collateral -> deploy/<chain>.json
# grants (0.8.31) mint rights, then the handover -> (reads deploy/<chain>.json)
[profile.tokens]
src = "script/tokens"
script = "script/tokens"
test = "script/tokens"
out = "out/tokens"
libs = []
solc_version = "0.8.31"
evm_version = "cancun"
optimizer = true
optimizer_runs = 200
via_ir = false
fs_permissions = [{ access = "read-write", path = "./" }]
allow_paths = ["lib", "../../standard", "../../liquid"]
remappings = [
"forge-std/=lib/standard/lib/forge-std/src/",
"@openzeppelin/contracts/=lib/standard/lib/openzeppelin-contracts/contracts/",
"solmate/=lib/standard/lib/solmate/src/",
"@luxfi/standard/=lib/standard/contracts/",
]
[profile.protocol]
src = "script/protocol"
script = "script/protocol"
test = "script/protocol"
out = "out/protocol"
libs = []
solc_version = "0.8.28"
evm_version = "cancun"
optimizer = true
# Liquid needs the IR pipeline (stack-too-deep in _sync without it), and it
# needs the Yul optimizer left ON — with Yul disabled the runtime comes out at
# 30,893 bytes, past the EIP-170 limit, so it would deploy on a node with a
# raised cap and nowhere else. With Yul on it lands at 21,550.
optimizer_runs = 800
via_ir = true
fs_permissions = [{ access = "read-write", path = "./" }]
allow_paths = ["lib", "../../standard", "../../liquid"]
remappings = [
"forge-std/=lib/liquid/lib/forge-std/src/",
"@openzeppelin/contracts/=lib/liquid/lib/openzeppelin-contracts/contracts/",
"openzeppelin-contracts-upgradeable/=lib/liquid/lib/openzeppelin-contracts-upgradeable/contracts/",
"@chainlink/contracts/=lib/liquid/lib/chainlink-brownie-contracts/contracts/",
"@luxfi/oz/=lib/liquid/lib/openzeppelin-contracts/contracts/",
"@luxfi/oz-upgradeable/=lib/liquid/lib/openzeppelin-contracts-upgradeable/contracts/",
"@luxfi/erc-3643/=lib/liquid/lib/erc-3643/",
"@luxfi/onchain-id/=lib/liquid/lib/onchain-id/",
"@onchain-id/solidity/=lib/liquid/lib/onchain-id/",
"@permit2/=lib/liquid/lib/permit2/src/",
"@luxfi/liquid/=lib/liquid/src/",
]
[profile.grants]
src = "script/grants"
script = "script/grants"
test = "script/grants"
out = "out/grants"
libs = []
solc_version = "0.8.31"
evm_version = "cancun"
optimizer = true
optimizer_runs = 200
via_ir = false
fs_permissions = [{ access = "read-write", path = "./" }]
allow_paths = ["lib", "../../standard", "../../liquid"]
remappings = [
"forge-std/=lib/standard/lib/forge-std/src/",
"@openzeppelin/contracts/=lib/standard/lib/openzeppelin-contracts/contracts/",
"solmate/=lib/standard/lib/solmate/src/",
"@luxfi/standard/=lib/standard/contracts/",
]
[profile.default]
src = "script/tokens"
script = "script/tokens"
out = "out/tokens"
libs = []
solc_version = "0.8.31"