Unreconciled funding budget in Manager HCA registration leads to the user approving a permit for 2.5× the total the checkout displays
On the HCA registration route the wallet signs an EIP-2612 permit sized from the full funding budget, but the checkout screen and the success receipt show only the registration price. While the budget quote is still in flight the screen presents that smaller price as an exact total with the register button live, so a user can approve a permit for roughly 2.5 times the figure displayed.
- Disclosed after under an hour
89578 w a high unreconciled funding budget in manager hca registration leads to the user approving a permit for 2 5 the total the checkout displays
Submitted on Aug 19th 2026 at 23:42:19 UTC by @Ispolin11 for Audit Competition | ENS
- Report ID: #89578
- Report Type: Websites & Apps
- Report severity: High
- Target: https://github.com/immunefi-team/audit-comp-ens/tree/audit-comp-ready/apps/manager
- Impacts:
- Causing the application to display or pre-fill an incorrect address, name, or transaction detail, so that a user sends funds or submits a transaction to an unintended recipient, such as: - resolving or rendering an ENS name to an attacker-controlled address - showing the wrong recipient or amount on a transaction the user then approves
Description
Brief/Intro
On the standalone-HCA registration route — the one the Manager app ships with — the wallet signs a single EIP-2612 permit sized from the funding budget (registrationPrice + commitLegCost + registerLegCost, less whatever the HCA already holds), and the application reports registrationPrice alone. Two consequences follow, and they are not equally conditional. The success receipt captions the registration price "Total Paid" in every case, so the application never states the amount that actually left the wallet. And while the budget quote is still outstanding — a state that needs no failure of any kind — the checkout screen states that same price as an exact total, the "up to" hedge that would mark it provisional dropped, with the register button already live, so a user who acts there approves a permit for 2.5× the figure the screen just gave them — the ratio when the HCA is empty, a state registrationFunding.ts#L24-L31 calls "the common case". Nothing anywhere in the application compares the number it displayed against the number it signs for: the two come from separate quotes, and the one that sizes the permit is accepted with no ceiling and no plausibility check.
Vulnerability Details
Every line reference below is against commit 1c9b47f (the tip of audit-comp-ready), and every link is addressed by that commit rather than by the branch, so the line numbers cannot drift. The app is configured for Sepolia only (wagmi.ts#L80, chains: [sepoliaWithEns]), so the USDC figures throughout are that deployment's. That is the deployment as it stands; the defect is in the application's logic — one state standing for two, two quotes that are never reconciled, a value accepted without a bound — and none of that is chain-specific, so a mainnet deployment would move the figures below and not the structure. Each table is the output of running the shipped code with the surrounding module injected — no network, no orchestrator; the PoC section carries the files and the commands.
1. Two numbers, and only one of them reaches the user
The permit is sized from the budget, in registration.machine.ts#L723:
value: bigintMax(
context.hcaBudget! - (context.hcaUsdcBalance ?? 0n),
0n,
),
and the budget itself is the sum of three parts, in budget.ts#L330:
const total = commitCost + registerCost + registrationPrice
The number the application carries into the registration is registrationPrice alone. It enters at TokenPickerContent.tsx#L203-L221, where startRegistration sends totalPrice: pricingQuery.data.rawPrice together with basePriceNumber and premiumPriceNumber — three fields, all from the pricing query, none from budgetQuery, which is in scope a few lines above in the same component (:163). From there it travels through registrationUi.machine.ts#L546-L560 as price: event.totalPrice, and that event carries no budget field at all. The checkout screen does show the budget when it has one — section 3 sets out exactly when it does not.
The two figures are not ones I picked. The project's own unit-test fixture fixes them:
// apps/manager/src/features/register-v2/workflow/pricing/lib/registrationFunding.test.ts:6-10
/** The live failure this gate was built for: 20.000000 held, 20.196054 needed. */
const PRODUCTION_FAILURE = {
total: 20_196_054n,
registrationPrice: 8_000_021n,
}
To be exact about what that records: it is a funding shortfall — a wallet holding 20.000000 against a budget of 20.196054 — not a display failure. I cite it only for what it does establish, which is the scale of the two numbers on a real registration: the project itself puts the rent at 8.000021 and the budget at 20.196054, a ratio of 2.5245. The PoCs accompanying this report use 12_200_000 for the two legs, the figure from registration.hca.actors.ts#L621-L625 — "on Sepolia an 8.00 USDC name has run to a ~20.20 USDC budget" — which gives 20.200021 and the same 2.52.
2. Root cause: one null carries two different meanings
computeRegistrationFunding returns null for two states that require opposite handling, and registrationFunding.ts#L51-L57 documents both in a single sentence:
Returns
nullwhen no budget has been quoted yet (or the quote failed), in which case callers should show the price alone rather than block: a flaky orchestrator is not evidence the user cannot pay.
The first meaning — "this route has no budget" — is the pure-EOA renewal flow, which reuses the same components (renew/…/TokenPickerContent.tsx#L9) and where the rent genuinely is the whole cost. The second — "this route has a budget and we could not obtain it" — is the HCA route. The consumer cannot tell them apart, so it applies the first behaviour to both.
Four separate things fall back on that single value in TokenPickerContent.tsx:
const requiredAmount = funding?.walletDebit ?? pricingData // :434 — the checkout gate
const displayTotal = funding?.total ?? pricingData // :438 — the headline figure
…
{(funding || isQuotingFunding) && <NetworkCostRow … />} // :491 — the network cost line
…
<PaymentTotalRow isEstimate={!!funding} total={displayTotal} /> // :575 — the "up to" hedge
The headline figure and the affordability gate both drop to the rent the moment funding is null, and the hedge goes with them, since it is isEstimate={!!funding}. The network cost row survives one of the two states: gated on (funding || isQuotingFunding), it renders with an em dash while the quote is in flight and disappears entirely once the quote has settled into error.
3. What the screen states in each of the three states
Rendering the shipped TokenPickerContentBase at one rent under all three budget states, with a wallet holding $10.00 — above the rent, below the budget, which is precisely the wallet the gate exists to stop:
| Budget state | Total shown | up to hedge |
Network cost row | Register button (wallet $10.00) |
|---|---|---|---|---|
| quote present | $20.20 |
yes | yes | disabled |
| quote in flight | $8.00 |
no | yes (value —) |
enabled |
| quote failed | $8.00 |
no | no | enabled |
The first row is correct, and I want to be explicit about that: with a quote in hand this screen does its job. The defect is what the two unquoted states do.
The button in that first row is disabled because the wallet holds $10.00 — the gate is working. A wallet holding the whole budget clears all three states, and that is the case the impact runs through: the user who can pay is exactly the user who proceeds. Rendered at a $50.00 balance, the in-flight state gives total=$8.00, hedged=false, canProceed=true.
The in-flight row matters most, because it requires no failure of any kind. It is the state of every first visit to this screen while the quote is outstanding, and that quote is deliberately expensive — hcaBudget.query.ts#L36-L41 notes it costs "TWO prepareTransaction round trips to the Rhinestone orchestrator".
It is also not a one-shot race on page load. The budget query is keyed on the duration and on the primary-name opt-in (hcaBudget.query.ts#L136-L145), the second with the code's own note — "Keyed, not just passed: toggling the primary-name switch changes the quote, so it has to refetch rather than serve the other variant." That switch is rendered on this same screen (TokenPickerContent.tsx#L338-L341). A different key is a different cache entry, and this query configures no placeholderData, so the first time a combination is selected there is nothing to show and the screen re-enters the row above: the total back at the rent, the hedge gone, the button live. Returning to a combination already fetched does not reopen it: that key has data, so funding is not null and both disclosures are back. The window belongs to keys with nothing cached — the first visit, and the first selection of each new combination. The PoC confirms both keys differ.
The obvious objection is that the quote lands a moment later and the screen corrects itself. That is right, and it bounds this row to users who act inside the window rather than to all of them. It does not close it: the window opens on every first visit and again on each new combination of those inputs, the button is live throughout it, and nothing on the screen marks the figure as provisional — the one element that would say so, the up to hedge, is precisely what is missing. I have not measured how long the window stays open in production; that depends on the orchestrator's response time and is not observable from the audit environment.
The failed row is reachable because isQuotingFunding is budgetQuery.isLoading (:358) and the query carries retry: 1. On the installed React Query 5.90.12, a settled error state gives isLoading: false with data: undefined, so funding and isQuotingFunding are false together and the last disclosure goes with them.
That row is narrower than the one above it, and the reason is worth stating plainly. The screen's query and the registration machine call the same estimateHcaBudgetActor, and that actor throws outright when the budget could not be quoted (registration.hca.actors.ts#L481-L487). A persistent failure therefore fails both: the machine errors and no permit is signed at all. This row produces the divergence only when the failure is transient — the screen's two attempts fail and the machine's later, independent attempt succeeds. The in-flight row needs no failure anywhere, which is why it, and not this one, carries the claim.
4. The receipt reports the rent in every case
RegistrationDetails.tsx computes its figure from confirmedData, which holds basePriceNumber, premiumPriceNumber and totalPrice — all rent, no budget:
const totalPrice =
basePriceWithoutDiscount + details.premiumPriceNumber - discountAmount // :51-55
and captions it at :122-126:
<Trans>Total Paid</Trans>
The component renders during registration (RegisteringStep.tsx#L221) and again on success (SuccessStep.tsx#L10), and it is route-agnostic — the same component serves the EOA registration, where the caption is correct.
State this precisely, because the obvious phrasing is wrong in one direction: the receipt states the amount that left the wallet in no case at all. Running the shipped machine at three HCA balances. The debit and the permit count come from the run; the receipt column is the rent — the figure this section has just shown the row computes — set beside them for comparison:
| HCA balance | Wallet debited | Receipt states | Permits signed |
|---|---|---|---|
$0.00 |
$20.20 |
$8.00 |
1 |
$5.00 |
$15.20 |
$8.00 |
1 |
$20.20 |
$0.00 |
$8.00 |
0 |
It understates against an empty HCA and overstates against a fully funded one. The figure printed is the rent every time, because the rent is the only number confirmedData carries. This half needs no failure, no race and no particular timing.
5. No reconciliation exists, and the two figures come from different quotes
Feeding the shipped machine a budget ten times the rent produces a permit for $80.00 against a displayed $8.00, and the machine reports no error — nothing anywhere compares the two. The displayed price is not even an input to the estimator; its captured input keys are name, duration, publicClient, chainId, signer, sessionEnable, primaryName.
The two figures are also independently derived. The UI's quote is never handed to the machine: context.hcaBudget is undefined at the moment START_REGISTRATION lands, and the machine re-quotes for itself at registration.machine.ts#L607-L636.
Two comments in hcaBudget.query.ts speak to this and do not agree with one another. At :29-33:
This runs the SAME estimator the registration machine runs in
computingHcaBudget, so the number shown at checkout is the number the machine will size the permit from.
Eight lines below, at :36-41:
It only has to be fresh enough to catch a gas regime change between opening the confirm screen and pressing register; the machine re-quotes for real either way.
A third sits in the component that renders the figure, at TokenPickerContent.tsx#L148-L154:
Mirrors what
registrationUi.machine.tshands the machine forSTART_REGISTRATION, so the figure on this screen is the one the permit is sized from. Quoting without it under-funds and the permit preflight then rejects a wallet this screen just told the user was sufficient.
One of the three describes the shipped behaviour — the machine re-quotes. The other two state an equality that nothing enforces. The closing clause of the third is the team's own description of the failure mode: a wallet that "this screen just told the user was sufficient" being rejected further down. I am not claiming the team promised one thing and built another — I am pointing at the gap the re-quote comment leaves open and the other two assume closed: the numbers are separately derived, and no code anywhere reconciles them. A larger re-quote is therefore signed without objection — a budget of $24.00 against a screen that had said up to $20.20, machine error none. I did not observe a gas move producing that divergence in the wild; what the PoC establishes is that the code accepts it if one occurs.
6. Every bound sits on the branch that never funds anything
budget.ts carries an explicit sanity ceiling, and its comment says exactly what it is for:
// budget.ts:133-137
/**
* Sanity ceiling on the per-leg gas price used by the FALLBACK model, to stop
* a transient base-fee spike from ballooning the estimate. …
*/
const FALLBACK_MAX_GAS_PRICE_WEI = 5_000_000_000n
That guards the number the application computes for itself. The other branch — quotedCommit.value / quotedRegister.value, returned by the orchestrator and taken verbatim at budget.ts#L322-L323 — reaches total with no ceiling, no plausibility check, and no comparison against the price the user was shown. Driving the shipped estimateHcaBudget down both branches. The two are provoked by different amounts, named in the table, because what separates them is not the size of the ratio but whether it can grow at all:
| Branch | Benign input | Hostile input | Ratio |
|---|---|---|---|
the model the app computes — gas price 1 gwei → 500 gwei (500×) |
$10.70 |
$21.50 |
×2.01 |
the value the app is given — quote 6_100_000 → 5_000_000_000 per leg (~820×) |
$20.20 |
$10008.00 |
×495 |
The ceiling is 5 gwei, and it absorbs everything above itself: run the computed branch at 5 gwei and again at 500 gwei and it returns the identical $21.50.
And the unbounded value reaches the permit unchanged: carried into the shipped machine it is signed for in full — $10008.00 against a displayed $8.00, machine error none.
I am not suggesting the orchestrator returns implausible values, and this is not a claim about Rhinestone. The claim is only about this code: whatever the quote returns is what the permit is signed for.
The sharp form of the asymmetry is not that one branch is clamped and the other is not. It is that the clamped branch never funds anything. registration.hca.actors.ts#L481-L487 rejects it outright:
if (breakdown.source !== 'quote') {
throw new Error(
`HCA budget could not be quoted (source: ${breakdown.source}). ` +
`Refusing to size the funding permit from the fallback model. ` +
…
)
}
So there are two guards against the budget the team distrusts — a gas-price clamp and a hard refusal — and none at all on the value they trust, which is the only one that ever sizes a permit.
7. What the team decided, and what those decisions cover
The null behaviour is not accidental, and there are two decisions on record. The first is in the project's own test:
registrationFunding.test.ts#L166— "A flaky orchestrator must fall back to showing the price, not to a block."
The second is in the component that renders the hedge, PaymentTotalRow.tsx#L4-L10:
With a funding budget quoted that is
rent + networkFee, and the fee half is an estimate, so the figure is an upper bound: hence "up to". Without a budget the total is exact rent and the hedge would be a lie, so it is dropped.
I am not reporting that the screen should block, and I am not disputing either decision on the route it was written for. On the renewal and pure-EOA routes there is no budget, the total genuinely is exact rent, and a hedge there would indeed be a lie.
What neither decision covers is the HCA route, where "without a budget" does not mean there is no budget — it means the budget exists and could not be obtained. There the rent is not the total, so the hedge is not a lie; it is the only qualification on a figure that needs one. The first decision is about not blocking, and says nothing about also removing the hedge, hiding the network cost row, and moving the affordability gate from the budget to the rent — all of which the same null does. The second is about a route where the premise "the total is exact rent" holds, applied through shared components to one where it does not.
It is worth noting where the testing stops. computeRegistrationFunding has 13 unit tests, including one asserting the two-state overload explicitly (returns null when no budget has been quoted). Not one of them asserts what a consumer renders, or gates on, when that null arrives.
8. This is the route the app ships with
The finding applies to the standalone-HCA path and not to the pure-EOA one. That is not a narrowing — the EOA path is a debug switch. apps/manager/.env.example ships:
# When `true`, force the transaction manager to use plain EOA signing only
# (no Rhinestone smart account) … Set `true` only for
# local EOA-only debugging on forks without bundler/relayer infrastructure.
VITE_FF_USE_EOA=false
At that value, and with the variable unset, isFeatureEnabled('USE_EOA') evaluates false. The budget query whose absent result drives this entire finding is enabled for the rhinestone signer and disabled for the EOA one.
One qualification I should make myself: .env.example is an example file, not the production deployment's configuration, which is not in the repository. What supports the reading beyond it is that the whole budget, permit, NetworkCostRow and preflight apparatus exists only for the HCA path — none of that is built for a debugging switch.
9. What a fix has to touch
Noting this because the shape of the fix bears on how the defect reads: it is not a null check. Give the funding summary a third state instead of overloading one null — say RegistrationFunding | 'no-budget-on-this-route' | 'unquoted' — so TokenPickerContentBase can keep today's behaviour for the renewal route while telling the user, on the HCA route, that the network half is unknown. RegistrationDetails needs the budget threaded through confirmedData, or the row re-captioned to something the rent actually answers. Neither closes the third gap: as long as the permit is sized from a value that is never compared against the figure shown, the two can part again for any reason.
Impact Details
What the user authorises versus what the application states
The permit is an EIP-2612 approval over the user's USDC, honoured by a transferFrom(wallet → HCA) executed inside the session-signed commit batch. At the project's own figures the rent is $8.000021 and the budget $20.196054 — a factor of 2.5245, of which about 60% is the network half.
At the moment of approval the two figures diverge in the unquoted states of section 3 — chiefly the in-flight one, which needs no failure anywhere, and the failed one only when the failure is transient, for the reason given there. In those states the screen states the rent as an exact total, with the hedge that PaymentTotalRow.tsx exists to add explicitly dropped, and the permit that follows is signed for the budget. In absolute terms that is $12.196033 on an $8.000021 name — the difference between the two figures, and a number the project's own test asserts directly as the network half, at registrationFunding.test.ts#L20-L22. In the quoted state the screen is right and there is no divergence at signature — that state is not part of this claim.
Where they diverge in every case is afterwards: the receipt captions the rent "Total Paid" regardless, so the amount that left the wallet is stated nowhere in the application.
Two further bounds are absent rather than wrong. Because the two figures are separately quoted and never compared, the authorised amount is not bounded by the displayed one even when the screen is correct — a re-quote of $24.00 behind a displayed up to $20.20 is signed with no error. And because the orchestrator's value is accepted without a ceiling, nothing in the application limits how far the two can part: driven with an implausible quote, the permit is signed for $10008.00 against a displayed $8.00.
Where the money goes, stated plainly
The surplus is not stolen and not sent to a third party. It lands in the user's own Hybrid Custody Account, and a later registration draws it down: the permit tops the HCA up rather than re-funding it, so a subsequent budget is reduced by whatever is already there.
Two things bound that mitigation:
- The application never shows the user that balance.
hcaBalanceis read only inside the budget query and the registration machine, and I found no place in the UI that renders it. - The application offers no way to take it back. I found no withdraw, sweep, or transfer-out path for the HCA's USDC in
apps/manager,packages/smart-account, orpackages/transaction-manager. A user who registers one name and stops is left with the difference sitting in a smart account whose balance the app does not display. It is their own account and it is not cryptographically lost — but within the audited application it is neither visible nor recoverable.
There is no attacker, and the selected impact does not require one
Nothing here is attacker-influenced: no third party chooses the name, the timing, or the amount. The wallet's own signing prompt carries the permit value, so the true figure is disclosed at the moment of signature — by the wallet, which is the only place in the flow where it appears at all. The application states it nowhere, before the signature or after it.
I state these plainly because they are the facts that argue against a higher rating, and the assessment should be made on the complete picture. They do not remove the impact. The in-scope row selected for this report is:
**Causing the application to display or pre-fill an incorrect address, name, or transaction detail, so that a user sends funds or submits a transaction to an un
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely a single null return from the funding calculation stands for both 'this route has no budget' and 'the budget could not be obtained yet', so the checkout falls back to showing the rent alone, drops the 'up to' hedge and enables the button, while the permit is still sized from a separately obtained budget with no reconciliation.
Impact
A user acting during the quote window could approve a permit for about 2.5 times the total shown, and the success receipt always captions the rent as 'Total Paid', never the amount actually debited; the failed-quote variant only diverges when the failure is transient.
What the attacker needed
HCA registration route; budget quote still in flight or transiently failed; user acts inside the quote window
The fix
The HCA route should distinguish 'no budget' from 'budget not yet obtained', keep the provisional hedge and disable or hold the register button until a budget is available, and reconcile the displayed figure against the amount the permit is sized from.
How it was found
- Open the HCA registration checkout for a name while the budget quote is still outstanding.
- Observe the screen shows only the registration price as an exact total, with no 'up to' hedge.
- Note the register button is already enabled.
- Press register, and the wallet is asked to sign a permit sized from the full budget rather than the displayed price.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
When you register a name, the app asks your wallet for permission to take some money. That permission is for the full cost, which includes network fees on top of the name price. The screen, however, only shows the name price and calls it the total, so you can agree to pay more than you were told.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.