About
Enclave Portfolio is two Chainlink CRE Confidential Workflows built on one idea: an automated trading strategy has to live somewhere, and wherever it lives, someone can read it. In a bot, the host can. In a smart contract, everyone can. In an oracle node's config, every operator can. Once a strategy is readable, every future move is predictable — and predictable moves get front-run. Confidential Workflows put the strategy inside an AWS Nitro enclave: hardware-isolated memory the node operator physically cannot inspect, with secrets released only to an attested binary. Delete the enclave from either workflow and there is no decision left to make.
Workflow 1 — Confidential Rebalancer (Best Confidential Workflow). Most "private rebalancers" hide a set of target weights. That doesn't work: a rebalance moves the book toward the target, so anyone reading balances before and after recovers it in one observation. We fixed this at the design level. The user's entire portfolio construction is one secret spec — which assets, the strategic base allocation, which market signals tilt it (risk parity, momentum, equal-weight, composable by strength), per-asset weight bounds, and the rebalancing policy. Each cycle the enclave composes target weights from that spec and live prices, sizes trades under a per-trade cap, checks price impact against a secret ceiling, and emits only the orders. The targets are never stored and never the same twice, so the trades don't converge on anything an observer can solve for. Two users on the same deployed workflow can run entirely different portfolios; the public code reveals only that "a spec is evaluated."
Workflow 2 — Automated Liquidation Protection (the Challenge). Protects a vETH-collateral / vUSD-debt position on the challenge's ChallengeLending contract. Two facts from the contract shape the strategy: deposits don't reduce debt (so they cost nothing in the loan-continuity score), and liquidation only fires when the admin separately calls checkAllHF(). So: on ChallengeStarted, deposit exactly enough collateral to survive down to a secret floor price — one transaction, before any price moves, no race. On every PriceUpdate, recompute the health factor with the contract's exact integer math; if it falls under a secret trigger, top up to a secret target, then repay within a secret cap, then repay whatever it takes. The transaction is signed inside the enclave with a Vault-held key. Logs carry only held or acted and a tx hash — never a threshold, an amount, or a price.
Engineering. No float ever touches money: token amounts are bigint base units, USD is fixed-point 1e8, health factors are computed bit-for-bit as the contract does. Every parser refuses rather than guesses. 102 tests, including a bit-exact offline model of ChallengeLending that replays all five published scenarios and harsher ones. A private copy of the challenge contracts on Sepolia, with our wallet as admin, serves as a live test harness — we've watched the enclave sign a deposit() between a price drop to $1,500 and the liquidation check, and survive.
From the public ETHGlobal showcase page. Votes, swipes and the judge score are hackfeed's own.






