DSS 2026 — What you need to know about Core Solidity Jacob Czepluch Source video: https://www.youtube.com/watch?v=W_ZsDboXbAc Automatic captions — not human-reviewed. Complete spoken-audio coverage is unverified. Source language tag: en (English). Source export SHA256: b136e47da787218c0b30c5c41ad88f996c8ed956bfe24edaaca33d4778e636f8 [0:00] All right. [0:01] Hello, everyone. [0:03] Thank you for being here. I was supposed [0:05] to present this morning at 10:00, but I [0:07] thought it was 10:15, so [0:09] I didn't present this morning. [0:11] And now I'm trying to present instead. [0:14] So I will talk a little bit about [0:17] what you need to know [0:18] about core solidity from a security [0:20] perspective. [0:23] So yeah, I'll walk you through that. We [0:25] don't have that much time, but [0:27] let's [0:28] see if we can get some useful [0:29] information through. [0:31] A little bit about myself. I wrote my [0:33] first smart contract back in 2015 when I [0:36] wrote my bachelor thesis about Ethereum. [0:39] This is some of the code from back then. [0:42] It looks pretty familiar, I think, but [0:44] with some differences, of course. [0:46] Since then, I've also been doing an [0:48] internship at the Ethereum Foundation in [0:49] 2015 working on the Python client that [0:52] actually used to exist back then. [0:54] Then I worked for 6 years on the Raiden [0:56] network, which was payment channels, 10 [0:59] years too early, as so many things were [1:00] back then. [1:02] Then I've been doing hack prevention [1:03] tools at Firefly Systems, and now I'm [1:05] the solidity developer relations at the [1:07] Agro Collective. [1:10] So if you take five things away from [1:12] this talk, it should be that core [1:14] solidity is a new front end for Sol C. [1:18] So basically from Yul onwards, it's the [1:20] same pipeline. [1:23] We have or the language will have enums [1:25] that carry data, so algebraic data types [1:28] and [1:29] pattern matching. [1:31] So basically whenever you have [1:34] like [1:35] a case that is that doesn't have a [1:37] match, then you simply don't compile. So [1:39] this catches a whole [1:40] category of of of box in the compiler. [1:45] Modules choose what they export, so you [1:48] will have to be explicit about what your [1:50] contracts are [1:53] basically [1:54] exposing. [1:57] There'll be no inheritance, so I this is [1:59] a controversial one, [2:01] um but also something that has been the [2:04] pain uh and the cause of a lot of [2:06] issues. [2:07] Um and it will be replaced by something [2:09] like traits in in in in Rust. Uh we're [2:12] still [2:13] There's some different ways of doing it [2:14] and uh yeah, we're experiencing a lot. [2:16] Um and we will have a standard library, [2:18] which I think is also a great thing that [2:20] a lot of people have been asking about [2:21] since [2:23] day one. Um and that means that we're um [2:26] basically separating language from the [2:28] compiler so we can add features to the [2:31] language without having to release a new [2:32] version of the compiler. [2:35] Um and where are we today with this? Um [2:39] still a prototype, of course. Uh [2:41] please do not uh deploy contracts to [2:43] mainnet with it. [2:45] Um we're still changing the language a [2:47] lot. There will definitely be a breaking [2:49] changes moving forward still. [2:52] We have uh [2:54] browser playground that um yeah, you can [2:56] compile, deploy uh [2:58] to testnets, call the contracts, um [3:02] view the bytecode, stuff like that. So [3:04] you can basically play around with the [3:05] language already. [3:07] Um [3:08] we've ported a bunch ported a bunch of [3:10] contracts um [3:12] so just to to to ensure that it actually [3:15] works. And we are also currently working [3:18] on uh a lean four model [3:20] uh of the semantics of the language. Um [3:24] and we also doing like [3:26] like like um semantics of the API [3:28] encoding and we found a couple of bugs [3:31] uh through this already. [3:33] Um and yeah, as I mentioned, we have uh [3:36] like it's a prototype, but we did just [3:37] make the first alpha release uh last [3:40] week. So you can actually [3:42] uh download it and run it on on on Linux [3:44] and Mac and it has a formatter, a [3:46] language server, and plugins for um the [3:49] most uh [3:50] popular um editors. [3:54] We've also since the beginning of summer [3:56] been conducting uh around 20 interviews [4:00] with a lot of different people from the [4:01] ecosystem ranging from auditors, [4:04] protocols, [4:06] library developers, tooling, [4:09] and wallets. [4:11] And we've basically collected feedback [4:13] on [4:14] classic Solidity, but also core and and [4:16] and introduced it to to a bunch of these [4:18] people. And some of the the feedback we [4:20] got was that these enums that carry data [4:23] is [4:25] something people really like. [4:28] Almost everyone was like getting it [4:29] right away and thought that it was a a [4:31] very welcome change or introduction [4:34] to the language. [4:36] A lot of the auditors we talked to were [4:37] also quite happy to see that you now [4:39] have to be explicit about what a [4:41] contract is exposing. So in the past, if [4:44] you did inheritance, you could inherit [4:46] like several layers deep and your [4:49] contract would expose public functions [4:51] from [4:51] from all of this. [4:53] And now you have to be explicit about [4:54] what a contract contract exposes, which [4:57] will also make the lives of auditors [4:59] quite a lot easier, I think. [5:03] As I mentioned, removing inheritance is [5:05] is one of the let's say main concerns [5:08] for some of the projects that [5:10] have relied heavily on inheritance for [5:13] for many years. And they are, of course, [5:16] a little bit skeptical about how how [5:18] should their contracts look [5:21] without this. [5:23] I totally understand that, and I don't [5:24] expect from the get-go that [5:29] very well-established protocols are just [5:31] porting their entire code base over. [5:34] It will definitely be a a long [5:37] adoption, and it's probably more going [5:38] to be new projects that will be writing [5:40] core Solidity, and [5:42] older projects will will stick to to [5:44] classic. And we will also continue to [5:46] maintain classic Solidity. It's not like [5:48] we're abandoning it. [5:50] I'll talk a little bit about more about [5:52] that later. [5:53] And another interesting point was, as [5:55] you probably most agree with, that [5:59] most people think that AI will be [6:00] writing [6:01] most of the code in the future, and [6:03] humans will mostly review it. [6:06] Um and for that reason, explicit uh code [6:10] uh is better. Um and [6:13] so we can have more like explicitness in [6:15] the language itself. And uh same with [6:17] like precise errors. [6:20] Um these interviews also meant that we [6:22] already changed some things in both the [6:24] approach we we took to to Core Solidity [6:26] and also in some of the the features. So [6:29] from these interviews, people had [6:30] questions regarding like some of the [6:32] examples we had and like how we would [6:35] show or do a specific thing um which has [6:37] then meant that we've been developing [6:39] examples for this that we've shared and [6:41] gotten a lot of good feedback from and [6:43] some people already [6:44] uh opened pull requests or issues with [6:46] uh with things they found after trying [6:48] it out. Um [6:50] so yeah, the the the interview is [6:52] already shaped kind of the the future of [6:53] the language. And whenever we have [6:55] design calls, I take the feedback and [6:57] and kind of represent the community as [7:00] well in in these calls. So so we have a [7:02] good process going for this um which I [7:05] think is is quite nice because it's [7:07] important that we design a language that [7:09] users actually want to use and not just [7:10] one that uh we think is uh interesting [7:13] to to make. [7:15] So that's uh [7:16] moving in the right direction. [7:19] So more into to to the language. As I [7:21] mentioned, it's a new front end for the [7:23] SolC back end. So from basically [7:25] lowering to to um to Yul, the pipeline [7:28] is the same. This also means that all [7:30] tools that currently work on bytecode [7:32] will will not uh have to to change [7:34] anything per se. [7:36] Uh the tools that rely on the exported [7:38] uh AST, they will need to do some uh [7:41] adjustment because the the AST will will [7:43] look different. [7:45] Um and then the the work we're currently [7:47] doing on the new pipeline uh is the ACFG [7:51] um like in the back end um will benefit [7:54] um both classic and Core of course [7:57] because it will be the the same pipe uh [7:59] pipeline that it goes through. And for [8:01] those who don't know, ACFG is a new [8:03] pipeline that fixes stack too deep um [8:06] but will also allow for a lot nice [8:08] optimizations, both in terms of like [8:11] tooling, but more more importantly in [8:13] compile time, which is some of the [8:15] things we've got the most [8:19] the most [8:21] the most [8:22] criticism for, of course. Yeah, so why [8:25] why a new front end? Like why not [8:28] change classic Solidity to cover all [8:30] these things? [8:33] Classic Solidity has quite a lot of [8:35] years, like 11 years now, and almost [8:37] every time there's a new feature, it's [8:39] more added as a patch than actually [8:41] designed in a in a good way. [8:44] So like yeah, it's pretty hard to [8:46] maintain the compiler by now, and like [8:48] one example is try catch, which you all [8:49] probably know about, and it's like not [8:51] the most pleasant thing to to work with. [8:54] And there's no formal specification, and [8:56] if we were to write one, it would mean [8:57] that documenting how every single [8:59] feature interacts with each other, which [9:01] is just a crazy task. [9:04] So the motivation would be to say, okay, [9:07] what if we start over? What if we design [9:09] a language from the ground up that [9:10] actually makes sense [9:12] for what a smart contract language [9:14] should look like in 2026 or like then [9:17] 2024? [9:18] So Core has a small set of primitive [9:21] primitives in like a lower language, [9:24] eight primitives and one type, which [9:26] makes it possible to yeah, formally [9:28] verified, for example. [9:31] Which we we are working on. [9:33] And I'm just jumping ahead because I'm [9:34] running out of time. But yeah, we also [9:36] have a bunch of new features like [9:37] generics, traits, enums as I mentioned, [9:39] pattern matching, and we'll have [9:42] standard library. [9:44] I'll skip this slide. [9:46] It's just comparing some of the [9:48] differences, but it's not that [9:49] important. [9:51] A couple of code examples. So [9:54] most of you probably know how pattern [9:55] matching works, but in this case, in [9:57] this example, we are not covering the [10:00] stale [10:01] case, which means that the compiler [10:03] catches this error and tells you right [10:04] away you you're not handling this [10:06] specific case. [10:08] So you kind of [10:09] compiler makes sure that you always have [10:11] coverage for all [10:13] possibilities of of a of a of an enum. [10:17] Unless you have like a catch-all [10:19] arm, which in that case it will still [10:22] allow it, but [10:24] still better. [10:26] Then we have something like [10:29] like in the modules as I mentioned. So [10:31] this module doesn't have a contract. It [10:33] just exposes the the functions. And in [10:35] this case we can construct all pools [10:39] in a function in this module [10:41] and run a require on it. So basically [10:43] check for an invariant. And the only [10:45] place that is can make a new pool is in [10:47] this module. So outside of pool, that's [10:51] all, [10:52] we cannot construct pools or we cannot [10:54] read its fields either. So this kind of [10:56] gives you a one place only where you can [10:59] do all these checks and do all these [11:00] invariant checks. You don't have to do [11:01] it in every single function that updates [11:04] a value, which I think is is is pretty [11:07] neat as well. [11:10] As I mentioned, modules replace [11:12] inheritance. In this example we have [11:15] possible. This is like a a token simple [11:18] token example where we have possible [11:20] that is then [11:21] exposing the functions that it it wants [11:23] to [11:24] pose. And then we import it in the token [11:26] contract where we can then [11:29] use possible. So in [11:31] those of you who know the Open Zeppelin [11:33] ERC 20, they have all these extensions [11:35] that you can import. And here we do it [11:38] like this instead of through [11:41] inheritance. [11:46] Yeah, we'll have the the standard [11:47] library, which I think is [11:49] really great thing to to have in a in [11:52] the language because we can actually [11:54] make changes to the language without [11:56] also having a release of the compiler. [11:59] This is an example for how add is [12:02] implemented on [12:04] U and 256. And as you can see U and 256 [12:06] is word, which is the [12:08] the base type of this lower language. [12:11] And a lot of things are being [12:12] implemented in the standard library. One [12:15] of the the people who are helping out in [12:17] the project um [12:18] used to work in Solidity in the early [12:20] days and he said that he implemented [12:22] some of the the things in the standard [12:24] library in an afternoon and it used to [12:26] take them three months when they did it [12:28] in the in [12:30] SolC back in 2017 or something like [12:32] that. So I think that shows some of the [12:34] the [12:35] the power that we can get out of uh a [12:37] language that has a a standard library. [12:44] So we still have some uh open design [12:46] questions of course. It's still early [12:48] days um but [12:50] uh we appreciate feedback on on all of [12:52] these of course. Some of them are [12:54] bigger, some of them are smaller. Um but [12:56] if you ever check out the language and [12:58] you run into something you don't [12:59] understand or that it's weird or ideas [13:01] for what to improve then don't hesitate [13:03] to to open uh [13:05] uh an issue. Um currently what we have [13:07] open is like storage and upgrades uh [13:10] like state owned modules as I mentioned. [13:13] They are control enum values that stay [13:15] valid when a variant is is added, [13:17] proxies. Um so there's still [13:19] a lot of things we that we need to [13:21] figure out. Then one of the bigger [13:23] things is like or bigger things but one [13:25] thing that will matter a lot I think is [13:26] initialization of state. [13:28] So right now as you all know in in in [13:30] classic Solidity if you initialize a [13:32] value it will have the basically the [13:33] zero value of of that uh [13:36] that um type which can be somewhat uh [13:40] confusing and we are currently [13:41] discussing if we should have implicit [13:43] type uh like so you cannot initiate a a [13:46] value without also assigning uh a value [13:48] specifically to it and that will [13:51] uh [13:52] be quite a nice thing but it will also [13:53] break with a lot of the ways people [13:56] think about Solidity in general. So this [13:57] is something we're very happy to get [13:59] feedback on. You can check the the issue [14:01] out. [14:02] Um another thing is like forward and [14:04] backward compatibility. Um so [14:07] of course we have to have backwards [14:09] compatibility but how do we do forward [14:10] compatibility? For example with pattern [14:12] like the the pattern matching how do we [14:14] do that in in like classic doesn't know [14:16] the API that you need to do that. So, [14:19] how should we handle this? Should we [14:21] like add it to the API or like so that [14:24] it classic, Viper, etc. will also [14:26] support it or should we just move ahead [14:28] and [14:29] see what like so we're not held back [14:32] basically. [14:34] Um and then yeah the the scope of the [14:36] standard library is also an open [14:38] question. [14:39] Um like should it be basic small as [14:41] possible or should we add [14:43] like batteries included basically. [14:46] I'm running out of time so [14:47] that's that's good. But yeah give it a [14:49] try. As I said we have the prototype [14:51] release you can download the binary [14:54] and we also have the playground. [14:56] On Thursday at 12:00 I'm giving a [14:58] workshop on Core Solidity hands-on how [15:01] to write your first smart contracts. [15:04] And if you're interested in also getting [15:05] a [15:06] small intro or do one of these [15:07] interviews I talked about find me after [15:10] or write an email. [15:11] Um yeah that's all I'm out of time. [15:14] Thank you very much.