DSS 2026 — Proving the Spoke: Formal Verification of Aave V4’s Hub-and-Spoke Architecture Lilian Cariou Source video: https://www.youtube.com/watch?v=bIfZX_t6r8I Automatic captions — not human-reviewed. Complete spoken-audio coverage is unverified. Source language tag: en (English). Source export SHA256: 85f5c0e5913c5bab1e6f8d94b80373592a157c4dfbb7b82c5288d9e60a70e904 [0:00] Hello everyone. Uh, I'm Lilian. I'm [0:03] working for Centrifuge. I'm doing I do [0:06] security and formal verification for [0:07] more than a year and a half. And if [0:09] approved by the DAO governance, um [0:13] custom spokes can be integrated within [0:15] uh shared liquidity apps um on Aave V4. [0:19] So the idea of this talk is to give you [0:21] an overview of what we formally proved [0:23] on Aave and what you should formally [0:25] prove if you want to develop your custom [0:27] spokes and maybe have it integrated one [0:29] day within the architecture. [0:33] Uh, tuk tuk. [0:36] Uh, so let's start about where we left [0:38] last year. If you were there last year [0:40] in GSS Buenos Aires and you saw the Aave [0:43] Centrifuge talk presented by Darius [0:45] Achief from Aave team and Thomas Ganor [0:48] from previous Centrifuge. This one was [0:50] about the apps, why the architecture, [0:52] why this design, how the math works, how [0:54] winding can drift, and one headline [0:57] property. The share weight can never go [0:58] down. It finished on a promise um on the [1:02] properties exist, you can take the new [1:04] spokes against them. [1:05] So some numbers to get your attention. [1:08] Aave V4 of course is live on multiple [1:11] networks. It has more than 1.4 billions [1:14] uh dollars supplied and more than 450 [1:18] millions uh dollars borrowed. So it's [1:21] bigs and let's see how it works. [1:25] First at the bottom, we have the apps. [1:28] The apps hold the liquidity and the [1:30] share accounting with a separate set of [1:32] books per assets. Apps are similar to [1:34] vaults and um and it caps what each [1:37] spoke can add and can draw. So the draw [1:40] caps is the spoke credit line. Then we [1:42] have spokes. Spokes are similar to [1:44] markets with an Oracle prices with [1:47] parameters and user position. [1:49] Then we have users. Users only interact [1:52] uh [1:53] to to a spoke via simple calls like [1:57] supply, withdraw, borrow, repay. And [1:59] finally we have custom spokes that can [2:02] plug in and reuse the liquidity that [2:04] they already desire. [2:05] Babylon spokes which is a custom spoke [2:07] extern to Ave should be the first one if [2:10] the approval is accepted. [2:12] It's a basically a lending market for [2:15] Bitcoin vault collateral that draws on [2:17] Ave liquidity instead of bootstrapping [2:18] its own. [2:20] So um the question for the rest of the [2:22] talk is what do the spokes have to [2:24] guarantee and what do the Ave guarantees [2:26] back? But before the properties let's [2:29] see where the state lives. [2:31] On the left you have what this what the [2:34] Ave stores per assets. So liquidity, [2:37] shares, index and premium accountings [2:39] and underneath it you have um the per [2:43] spoke slice which is what the Ave [2:46] believe each individual spoke is [2:47] holding. On the right you have what the [2:50] spokes basically stores position per [2:52] user per reserve. Each spoke has its own [2:55] storage of course because they have [2:57] different contracts. They are just [2:59] connected or linked to the same Ave uh [3:02] and by the way a spokes can be connected [3:04] to a multiple Ave. [3:06] But um but spokes here are connected to [3:11] the same Ave sharing the liquidity which [3:13] makes this architecture so powerful. And [3:15] one things really important on this [3:17] slide is that um um the the the the [3:21] agreements between Ave and a spokes [3:24] because a spokes only ever sees per [3:25] total uh [3:27] spokes. It never sees user position. So [3:29] the property linking a Ave and a spokes [3:32] um is uh is a property sorry the [3:35] agreement between a Ave and a spokes is [3:37] a property linking per spokes total Ave [3:39] per spokes total to spokes per user [3:41] position which has to be formally [3:43] proved. So let's have a look on what we [3:45] proved on the Ave. [3:47] The first property that was already [3:49] discussed last year as I said is a share [3:51] weight only goes Ave. So total assets [3:54] over total shares never decreased after [3:56] any function. The second properties is [3:58] that the Ave stays solvent. So total [3:59] asset cover total shares. What do we [4:02] mean is that we verified here that the [4:04] share weight is always at least one. [4:06] Property number three, no spokes can all [4:09] shares the hub as an account. So here we [4:11] verified that every spoke share sends to [4:14] the hub totals. And property number [4:16] four, this is a property that makes a [4:18] custom spokes a tractable piece of work [4:20] at all in terms of formal verification [4:23] because we formally verified that if [4:26] that one spoke cannot touch another [4:28] basically. So let's zoom on this fourth [4:30] property and have a look at what does it [4:33] looks like from a verification language [4:35] CVL point of view. [4:37] The idea of this no change to the spokes [4:40] rule is to have this F [4:42] here which is parametric meaning it can [4:45] be any hub function. So we make sure [4:47] that no matter the function call on the [4:49] hub from a spokes um [4:52] the state stays the same for a spoke [4:54] that is different ones than the one we [4:56] target. So whatever spoke A does on the [4:59] hub [5:00] doesn't [5:01] is it cannot add to spoke B's depth [5:04] depth. It cannot shrink spoke B shares [5:07] and cannot add a spoke A cannot add to [5:09] spoke B deficit. And the table on the [5:12] right is the idea in one picture. [5:14] For example, we have spoke A sorry there [5:17] are there should have been animation but [5:19] but here we are. And the idea is that [5:21] spoke A borrows its one shares goes for [5:24] 100 to 140. [5:26] And we formally verified that for spoke [5:28] B and spoke C it stays the same. [5:31] So as I said, this is a property that [5:33] lets a spokes be added without [5:34] re-auditing the ones already deployed [5:37] because [5:38] if you develop your custom spokes, you [5:40] have the formal insurance that even when [5:42] added to a new to a hub, it won't be [5:44] touched by another one. [5:46] So that was the upside. Let's have a [5:48] look on what we prove on the spoke. [5:51] On the spokes, we have five families. [5:52] Family number one is user isolation and [5:55] accounting integrity. [5:57] By user isolation here, what do we mean [6:00] is that we verified that if your balance [6:03] with an average change, it means that [6:05] you are a position manager you approve [6:07] make the call. And there is an exception [6:09] here. I left the security researcher in [6:11] the room guess what the exception for [6:14] user isolation. And about non-zero [6:16] change, here we wanted to verify that [6:19] whatever user gets [6:20] it means a non-zero cost come with it. [6:23] So for example, if shares are minted [6:25] from protocol, we verified that tokens [6:28] went in. If token are going out from the [6:30] protocol, it means that either shares [6:33] were burned or debt was added. And if [6:35] debt goes down for an account, it means [6:38] that tokens went in. [6:40] And here again, there is an exception. [6:42] It's due to windings, of course, we all [6:44] know that. But for winding, we verified [6:46] that it's never under shares, token or [6:48] debt really for free. So basically, we [6:51] verify that windings is always in the [6:52] protocol favor. [6:55] Going back to isolation, here the [6:56] exception you may have guessed that it's [6:58] it's liquidation. [7:00] It's well known and at its own family, [7:02] so it's [7:03] we will get into it soon. [7:06] On family number two is consistency. [7:10] As a reminder here, the only ever sees [7:13] one total per it doesn't see user [7:16] position. [7:17] So [7:19] it relies on the [7:21] own per user books to decide who may [7:23] borrow or not. And if these books drift [7:26] from what the believes each individual [7:29] as, it means that [7:32] liquidity can live against positions [7:33] that do not exist. And this loss would [7:35] land on users that never interacted with [7:38] with these [7:39] So that's the reason we have this this [7:42] family to prove that there is a [7:44] consistency between and a [7:46] The proof we built to prove a [7:49] consistency has three pieces. The first [7:51] piece is a ghost. A ghost is a winding [7:53] total the prover keeps which is not part [7:55] of the contract. [7:57] The second piece of the proof is a [7:59] A as its name suggests is [8:03] triggers on every write to drawn shares. [8:05] So on every SS draws on the code to [8:08] drawn shares here anywhere in the code, [8:11] it will keep it it it is triggered. And [8:14] the the goal of this hook is to keep the [8:17] growth variable we just defined up to [8:19] date. [8:20] And this English path that nobody sought [8:23] to test, that's why this kind of [8:25] properties is a good is a really good [8:26] fit for formal verification. [8:28] And piece number three is the invariant [8:30] itself, that the total equals of the [8:32] record for this box between the spoke [8:35] and the app. Um [8:37] here this invariant is proved by [8:39] induction, meaning it's it's true after [8:41] deployment and preserved by every call. [8:44] Again, here the exception is [8:45] liquidation, but liquidation sits [8:48] kind of outside this [8:50] this family this family and has its own [8:53] family. [8:54] And [8:56] and as I said, this three proof pattern [8:59] can be can be useful for other variables [9:02] like drawn shares, supply shares, and [9:04] premier shares and offsets. But here the [9:06] idea for [9:08] for drawn shares between the spoke on [9:10] the app was to prove that they matches [9:12] exactly because a missing share will be [9:14] debt nobody owes and an extra one will [9:17] be debt nobody can repay. [9:20] Family number three is else factor. [9:22] Basically, when you have a landing [9:23] protocol, you want to make sure that no [9:26] operation lower else without a checks. [9:28] So that's what we did and in addition, [9:30] we verify that an NFT account can only [9:32] move back up. And what was interesting [9:35] is there is that for the function they [9:37] skip the L checks, we verify that they [9:40] can only add collateral or reduce [9:42] depths. [9:43] Family number four, position invariants. [9:46] Here we verify that a position never [9:48] takes a shape the protocol cannot [9:50] handle. So kind of obvious things but [9:53] kind of hard to verify for manual audits [9:55] or LLM audits that the depth there is no [9:57] depth without collateral, the borrowing [9:59] flags always matches the actual depths [10:01] and there is no balance in a reserve [10:03] that does not exist. [10:05] Because all those states will make [10:07] all the downstream calculation [10:09] meaningless. So what we did is that we [10:11] roll them out once as invariants. And [10:14] and yeah, again this is kind of property [10:16] that is really good fit for EV. [10:18] And family number five, finally [10:21] liquidation. Here the main goal was to [10:24] verify that only an NLC account can be [10:26] liquidated. In addition, we verified [10:28] properties like if the liquidator [10:31] received collateral, it means the [10:33] borrower debts goes down, seizure and [10:35] bonus stay bound, and there is no [10:37] uninvolved account between during the [10:40] liquidation, and no bad debt is white [10:42] enough while the borrower still has [10:43] collateral. [10:45] These five families of rules we proved [10:48] on the spokes represent around 60 rules. [10:52] And everyone of them calls the So the [10:54] question is if you develop your custom [10:57] spokes, do we need to reprove the each [10:59] time? Because when we when we try to [11:02] that, we had to face the challenge of [11:05] trying to prove to be code because the [11:07] on a spoke is [11:09] is obviously [11:10] a big piece of code. And for that the [11:13] answer is no, we don't have to reprove [11:15] the because when we face that we had to [11:18] use what we call modular verification. [11:20] And for that we created what we call [11:23] symbolic app. [11:25] So let's have a look at the symbolic [11:26] app. [11:27] The idea of this part is that you, as I [11:29] said, you don't verify a system this big [11:32] in one piece. You split it, that's [11:34] modular verification. And modular [11:35] verification can be achieved in three [11:37] steps. The first step is that you prove [11:39] each component on its own. For example, [11:41] for the [11:42] share rate, solvency, per spoke [11:45] isolation properties were proved once [11:48] with no spokes involved. So they were [11:49] really proved on their own system. The [11:52] second step is that your proof become [11:54] axiom. So when when we we first created [11:58] the symbolic that specs, we define some [12:01] variable on it that was that were [12:04] important for for us like the share to [12:06] asset ghost variable. [12:08] A ghost variable is a variable that we [12:10] let free, meaning it can take any [12:12] values. But on these values, we assume [12:15] two behaviors that we already proved on [12:17] the hub, [12:19] uh that are the share only goes up and [12:21] it never drops below one. Those are [12:23] properties from a few slide ago that we [12:25] verified on the hub and that we know [12:27] that they hold. So at the end, we have a [12:29] free variable which establish the the [12:33] the hubs uh the hubs guarantees that we [12:36] already verified. And share trust at [12:38] ratio is an example. We can define other [12:41] variable like for example debt index can [12:42] get the same treatments. [12:44] And uh and that's proof number two [12:46] basically. The proof become axiom and [12:48] the axiom is what you assume uh that you [12:52] already proved on the hub. [12:53] Step number three is that you summarize [12:56] every every hub call uh [12:58] so when you want to verify something [13:00] about the spoke, about your custom [13:02] spokes, what you do is that you replace [13:04] every hub calls the spoke makes by a few [13:07] line of C V L running to the ghost [13:10] variable which establish the hubs [13:12] behaviors. [13:14] So at the end, the spoke is proved [13:16] against what the hubs guarantee [13:18] which is strong, which is mostly cheaper [13:20] and easier to prove for the [13:23] not against one version of its code. And [13:25] on top of that, what's nice is that if [13:27] you develop your custom spokes, you can [13:29] reuse this symbolic hub uh file.spec. [13:32] You can import it on your projects and [13:34] uh on the formal verification part of [13:37] your custom spokes will be a lot [13:38] cheaper. [13:41] So if you want to develop your custom [13:43] spokes, I hope I convinced you. Um there [13:45] are three steps. The first step is that [13:47] you import the shared model, symbolic [13:49] hub, math summaries, positions, such [13:51] models. Everything is available on our [13:53] repo. [13:54] Uh second is that you prove the [13:55] checklist. Your custom spokes uh will [13:59] can be proved against five families [14:02] which represent around 60 rules on [14:03] invariants. And this is important that [14:06] you reprove them because they describe [14:08] what any spokes must guarantee. And [14:10] finally um step number three is that you [14:13] write rules only for what you change. [14:15] For example, Babylon will liquidate a [14:18] BTC vault, which is different than other [14:20] spokes does. So, [14:22] it's a new behavior, meaning you have to [14:24] develop new rules, and for that we can [14:26] help at of course [14:29] on this process. So, at the end, the [14:31] answer to how much formal verification [14:32] work is a custom spokes is only the [14:35] different ones, not the world, which [14:36] makes everything a lot easier. [14:40] Thank you very much.