← useverdex.xyz
Internal audit · 8–9 November 2026

Verdex Audit #2

We went through every Verdex smart contract, our server and the web app, line by line, and ran static analysis over all of it. Then we fixed what we found, redeployed the contracts and published the source. This page lists every finding and what happened to it.

This is an internal audit, not a third-party one. It was done by the Verdex team, like our first audit in October. No third-party firm has audited the contracts yet, and you should treat them that way.

Scope
20 contracts · 4,754 lines
Also covered
server, keepers, web app
Compiler
solc 0.8.28 · via-IR · opt 1000
Tests
66 passing, incl. mainnet forks

Summary

We found no way for an outside attacker to take user funds. The serious findings came down to three things: how much users had to trust the Verdex executor that runs automated trades, how much power the Lend owner had, and a set of Base contracts that could not execute at all.

All of them are now fixed. We corrected the source, tested it (66 tests, many on forks of Robinhood Chain and Base), had the fixes reviewed again, and deployed 16 new contracts on 8 November. Every one is verified on Sourcify with an exact match. No one had used the old contracts, so nobody needed to move anything.

SeverityFoundFixedMitigatedAcknowledged
Critical1100
High6600
Medium9810
Low201613
Informational4013

The new contracts

These are the contracts the app uses from today. Click an address to read its verified source.

ContractChainAddress
TreasuryRobinhood Chain0x6dd1…2933
LendRobinhood Chain0x14b4…5a10
LeverageRobinhood Chain0x0f5c…a4eb
OrdersRobinhood Chain0xa852…d71e
VaultsRobinhood Chain0x41fd…059d
Auto-InvestRobinhood Chain0x4d88…9bac
AgentRobinhood Chain0xe814…e99f
Index routerRobinhood Chain0x7f30…ee3e
Index plansRobinhood Chain0xf9f6…fd75
Term loansRobinhood Chain0x82a4…2d7b
MinesRobinhood Chain0x5974…9b99
GiftRobinhood Chain0xb60c…4b40
OrdersBase0x6dd1…2933
VaultsBase0x14b4…5a10
Auto-InvestBase0x9675…f73a
Index routerBase0x1294…6060

Options and existing index tokens were not affected and keep their addresses. The old contracts stay on-chain but the app no longer uses them.

What changed for users

Contracts

V-01High

Base automation contracts could not execute

Fixed
VerdexOrdersCL · VerdexVaultsCL · VerdexAutoInvestCL

These contracts read the Aerodrome Slipstream pool price with a 7-field layout, but Slipstream returns 6. Every price read reverted, so nothing on Base could ever fill. No one had used them and no funds were held.

Corrected and redeployed. Orders, vaults and plans were tested end to end on a fork of Base.

V-02High

Executor-run trades used only the pool price at that moment

Fixed
VerdexAgent · VerdexOrders · VerdexVaults · VerdexAutoInvest · VerdexIndexPlans

The minimum a trade had to return came from the pool price in the same transaction, so an executor that moved the price first could fill at a bad price. For the agent, a sale could be valued at a crashed price.

Every execution now checks the pool's 30-minute average price and refuses to run if the current price is more than about 2% (200 ticks) away. Sales are valued at the higher of the two prices. What an executor can still do is bounded by that 2% band plus the slippage you set.

V-03High

The Lend owner could take funds through the reserve function

Fixed
VerdexLend · skim, interest-rate settings

Reserves were paid out without checking the market held that cash, and interest rates had no upper limit.

A payout is now capped at the market's own cash, and rates are capped at 20% base plus 300% slope. All 14 markets were recreated with their previous settings.

V-04High

Lend liquidations could write off debt that the collateral still covered

Fixed
VerdexLend · liquidate

With some settings, a liquidator who moved the pool price could seize all the collateral and leave part of the debt as a loss for suppliers.

Debt is only written off when the position is underwater at the 30-minute average price, and market settings that allow the problem are now rejected.

V-05Medium

Treasury payouts were sent wherever the executor chose

Fixed
VerdexTreasury · distribute

Half of every VERDEX buy is burned in the same transaction, as described. The other half was paid by an executor to any list it chose, at once.

A payout list is now published on-chain and can only be paid 48 hours later, exactly as published. The owner can cancel a pending list (and so can delay payouts) but cannot take the funds.

V-06Medium

Mines roll weights could be pushed in thin pools

Mitigated
VerdexMines · roll

A roll's weight comes from a 30-minute average price move. Holding a pool's price up for those 30 minutes could raise a roll's payout.

The cap is now 2x instead of 4x, so the most such a push can add is far smaller. It can still pay when a mine's reserve is large compared with its pool.

V-07Medium

Index plan tips were paid whatever the size of the buy

Fixed

The tip is now paid in proportion to what was actually bought; the rest goes back to the plan's owner.

V-08Medium

A Lend market's price could be made unavailable

Fixed

Markets now require the pool to store enough price history for their averaging window, both when created and when changed.

V-09Medium

Partial fills could leave tokens in the contract

Fixed

Every swap in Orders, Vaults, Auto-Invest, the agent and the index router now reverts unless the whole input is used.

V-10Low

Smaller contract issues

  • Fixed Mines: missed rolls catch up at most once every 20 hours.
  • Fixed Term loans: 0% offers can be taken; each loan is at least 1 USDG unless it takes the whole remainder.
  • Fixed Lend: a market wiped out by bad debt can take new supply again; liquidations and borrows that would move zero shares revert; settings changes emit events.
  • Fixed Leverage: shorts are capped at 2x in the contract, as longs already were.
  • Fixed Index: redemptions pay pro rata when a component runs short, and new shares cannot be issued until it is fully backed again. The router's sells leave nothing behind.
  • Fixed Treasury: the USDG leg of its floor uses the better of the current and average price; only listed spenders can be approved; stray tokens can only be sent to the burn address; ownership changes take two steps.
  • Fixed Gift: a gift key is scoped to its sender, so copying one cannot block a gift.
  • Fixed Vote: closed rounds are weighed at the balances held when they closed.
  • Acknowledged Holding any amount of VERDEX waives the Leverage and index fees. This is the product rule across Verdex.
  • Acknowledged Anyone can temporarily fill a Lend or Leverage cap with their own funds.
  • Acknowledged Changing Lend's reserve share does not settle interest first, so it applies to interest not yet accrued.
V-11Info

Notes

  • Checked A Mines pool with short price history could have stopped all rolls. All seven pools store 7,200 to 14,400 price points, and the new contract refuses any pool with too few.
  • Acknowledged Options: the writer picks the underlying, and a token with transfer restrictions could block exercise.
  • Acknowledged Feed: a single poster sets the price. No Verdex contract reads it and no feed is deployed today.
  • Acknowledged Per-wallet lists of options, loans and offers are never pruned.

Server and web app

W-01Critical

One server key held too many roles

Fixed

A single key ran every executor, the Mines keeper, the gift relay and the treasury executor, and its storage needed hardening.

Replaced with new keys, one for automation and one for the treasury, held only in our host's secret store and never in uploaded files. The new contracts trust only the new keys, and the old key has no role in them.

W-02High

The automatic gas top-up signed whatever route the aggregator returned

Fixed

It now signs only routes to LI.FI's own contract, with no ETH attached.

W-03High

Spam plans could waste executor gas

Fixed

The executor skips anything with a tip under 0.01 USDG, runs at most five items per owner and sixty per pass, and caps the gas of every transaction.

W-04Medium

A buy link could show a fake token name and amount

Fixed

A ?buy= link now takes the token's name and decimals from the token list or the quote, never from the link, and warns, showing the address, when a token is not listed.

W-05Medium

Notifications could be pointed at any web address

Fixed

Only real browser push services are accepted, every send times out after 10 seconds, sign-ups are rate limited, and the push passes cannot overlap.

W-06Medium

Unlimited approvals to the swap aggregator

Fixed

Approvals are now for the exact amount of each swap, and the app refuses any route that does not go through LI.FI's own contract.

W-07Medium

Chart cache could grow without limit

Fixed

Chart requests are normalised and capped, and the data-provider queue is bounded.

W-08Low

Smaller server issues

  • Fixed API errors no longer include internal details.
  • Fixed The static file check uses the full path.
  • Fixed Rate limits use the address our host's edge saw, not one the client can write.
  • Fixed The quote API rejects tokens it does not know instead of guessing their decimals.
  • Mitigated Referrer-Policy, HSTS, Permissions-Policy and a base CSP are set. A full script CSP is not yet, because the app is designed to be embedded by partners.

Who can do what now

No admin at all

Mines, Term loans, Options and Gift have no owner and no rescue function. Nobody can change them or move funds out of them.

Executor list only

Orders, Vaults, Agent, Auto-Invest and Index plans: the admin can only choose executors, and executors are bound by each user's limits and the 2% price band. Today the only executor is Verdex's server.

Owner settings

Lend: market parameters within hard bounds, and capped reserves. Treasury: executors, routers, spenders, burn share and slippage band, plus cancelling a pending payout. Index router and Leverage: a fee of at most 1%, plus caps.

The VERDEX liquidity position is held by a launch locker with no withdraw function, so it is locked for good. The team holds no VERDEX.

How we reviewed

Next

Found something we missed? Our bug bounty is described at useverdex.xyz/docs#bug-bounty. Our first internal audit, from October, is at useverdex.xyz/docs#audit. This page describes our own review of our own code. It is not an audit, a guarantee or financial advice.