DSS 2026 — Safe Staking: A Runtime Security Framework for LSTs Yash Saraswat Source video: https://www.youtube.com/watch?v=u40qemWvaWg Automatic captions — not human-reviewed. Complete spoken-audio coverage is unverified. Source language tag: en (English). Source export SHA256: f1ed1a5ce2ab458c1d7d5dbfb9780bb5de644243f78fd590f756a51eb1cbd9e0 [0:00] Yeah, so my name is Yash and I work at a [0:02] smart contract engineer at EtherFi. And [0:05] today I want to talk about [0:07] safe staking and in general, how do you [0:09] protect a DeFi protocol [0:12] like if you're if you're building a [0:13] protocol yourself or if you're just like [0:15] a regular user of a protocol, how do you [0:17] know that [0:19] any product that you use on chain is [0:21] actually safe for you to use and safe [0:22] for your funds. And [0:25] yeah, [0:26] I don't need to talk about this too [0:28] much. [0:29] This year has been quite quite a wild [0:33] quite a wild in terms of smart contract [0:36] hacks and DeFi hacks. And like mostly if [0:39] you look at what has been happening this [0:41] year, it's not exactly someone figuring [0:43] out a way to hack a protocol like hack a [0:46] smart contract or hack like some in [0:48] where like [0:50] logic in the code is mostly around [0:53] access control. It's mostly around [0:55] operational keys being leaked. It's [0:56] mostly around like some pipeline going [0:58] wrong and something like that. [1:00] And [1:05] and if you if you are a user and if [1:07] you're using a DeFi protocol then you [1:09] want to like be more confident that is [1:12] the protocol I'm using actually safe or [1:13] not. What are how how can you actually [1:16] do that? So these are like three [1:18] questions that you can probably ask [1:20] yourself before putting your money in [1:21] any protocol. And question one is who [1:23] can move my funds? [1:25] Question two [1:26] [cough] [1:28] what stops a bug from draining what [1:29] stops a bug from draining them? And [1:31] three, what happens when something [1:33] breaks anyway? Like [1:35] how does the incident response of a team [1:37] look like etc. [1:40] And [1:41] the approach that I want to talk about, [1:42] this is something that we applied [1:43] EtherFi and I think it's a really good [1:45] security model is the Swiss Swiss cheese [1:48] model, which is like very simple. It [1:50] basically means that at every single [1:52] layer there are probably some things [1:56] Excuse me. Sorry for my my coughing. [1:58] There are probably a bunch of [2:01] that can go wrong and these are the [2:02] security holes through which attackers [2:04] can find gaps and try to [2:07] access access your funds. But if you [2:09] stack a bunch of these layers on top of [2:11] each other, then the chances that a [2:13] hacker is able to find a gap through all [2:15] of them and is able to [2:19] break into break into everything and [2:20] actually access your funds is quite [2:22] less. And that is the whole point of the [2:25] Swiss cheese model is that you just like [2:26] add more and more security layers and [2:28] more and more security features as much [2:30] as you can think of and that just like [2:33] exponentially reduces the amount of [2:36] like surface that is available for a [2:38] hacker to exploit. [2:43] So the first [2:47] so the first layer that I want to talk [2:48] about is operational security. [2:50] This is everything around admin keys, [2:53] control matrix, pausing ability, etc. [2:57] One thing that I forgot to add in the [2:58] slides here, which is like very [2:59] important is control matrix and [3:03] the fact that like a protocol should [3:05] [snorts] [3:05] have a very clear and defined [3:08] differentiation on like what type of [3:10] access controls can move what type of [3:13] levers. For example, let's say that [3:15] there's a smart contract, there are some [3:16] funds on it and there are some liquidity [3:18] operations that you want to run and you [3:20] can very clearly define on the smart [3:22] contract that funds can only move in a [3:23] certain way [3:25] and you just need like [3:27] an operational key to like do that based [3:29] on your discretion. There is there is no [3:31] chance of loss of funds if your smart [3:33] contracts are audited and verified [3:36] that the flow is not broken. [3:38] In that [3:39] [cough and clears throat] [3:42] In that case, you can [3:44] you can just like [3:45] give an operational key access to move [3:47] those funds and [3:51] operational key access to move those [3:53] funds and you can feel that okay, like [3:55] this is like [3:58] like good enough because like there is [3:59] no potential loss of funds in that [4:00] scenario. On the on the completely other [4:02] extreme, let's say that [4:04] you need to give access control now to [4:05] upgrading your protocol contracts. That [4:08] involves huge risk. Anyone who who can [4:10] get access to controlling your protocol [4:13] upgrades can like change the logic [4:16] and like basically steal funds. [4:19] Even thinking about like lower access [4:21] controls like who can set some config [4:24] parameters may cause a catastrophic [4:28] catastrophic [4:29] attack vectors for your protocol. So [4:31] these these type of [4:34] levers need a much more secure access [4:37] control and that's and that's where time [4:40] locks and multisigs and high threshold [4:43] and high threshold controls are actually [4:45] like quite useful. So it's always a good [4:47] practice if you're working with any [4:49] protocol to like check how their access [4:50] control looks like. [4:52] Do they actually have a policy where [4:54] super critical functions like upgrades [4:56] and config changes are actually behind [4:58] secure [4:59] secure thresholds because [5:02] what we've seen over the last years a [5:03] bunch of [5:06] a bunch of hacks have happened because [5:07] like someone just like [5:09] blindly signed some transaction even [5:10] it's even if it's behind a multisig it's [5:14] it's not behind a time lock so you [5:16] didn't get a chance to actually wait and [5:18] see [5:20] like what's going to happen on chain. [5:24] The next lever is like on smart [5:25] contracts. Obviously like if you're [5:27] trusting a smart contract to have [5:29] logic that protects you that protects [5:31] you then you definitely need invariance [5:33] as mentioned in the previous talk as [5:34] well. And [5:37] this is a this is a like [5:39] quite [5:40] like quite the norm in the industry that [5:42] you definitely need like in invariance [5:44] enforced in your smart contracts. You [5:45] need to get them audited. If possible [5:47] you should also get them formally [5:48] verified. You should always have your [5:50] invariance first tested, integration [5:52] tested and [5:54] and like run a bunch of static analyzers [5:57] on it and [5:58] [cough and clears throat] [5:59] and yeah this is like pretty standard. [6:02] The the next is also [6:05] cross chain risk and actually want to [6:07] like expand this also like to third [6:09] party risk as well. Like you might have [6:11] a protocol sitting [6:13] on Ethereum mainnet and let's say like [6:16] there are some cross chain let's say you [6:18] have a token that is like deployed on [6:19] some other chains, but [6:22] basically what I mean by this section is [6:24] that you also need to account for all [6:25] the third party risk. Let's say you have [6:27] external protocols integrated, you have [6:29] a cross chain [6:31] protocol integrated, [6:33] then do you actually have the best [6:35] possible config set [6:37] for the security of those external [6:39] layers? For example, [6:41] we all know earlier this year [6:43] our seeds got hacked because they were [6:45] using layer zero infrastructure and they [6:47] were [6:47] not using the correct config. So instead [6:49] of using their [6:52] their recommended config, they were [6:53] using a one of one demon which allowed [6:55] them to get hacked. So [6:58] can you ensure [7:01] [laughter and cough] [7:03] so can you ensure that before using any [7:04] protocol are you actually use [7:06] those that protocol actually have [7:08] correct config set for all the [7:11] external external dependencies that they [7:13] have like there is no key that there's [7:16] no like single operational key that has [7:18] like very high privileged taxes. There [7:20] is no like verifiers are [7:23] for a cross chain protocol specifically [7:24] there are like multiple verifiers etc [7:26] etc. [7:30] And then yeah and then the final lever [7:32] is around active defense. This is [7:34] basically like what do you do in the [7:36] case that an hack actually happens? How [7:39] do you act? How how can you ensure that [7:41] you can minimize the effect of a hack? [7:43] And [7:44] the number one step for that is [7:45] obviously detection. You you should [7:47] always have monitoring, you should [7:49] always have [7:51] and that is where defining invariance is [7:53] also [7:54] incredibly helpful because if you know [7:56] what can possibly go wrong, you can also [7:58] create monitors to basically see if [8:00] something suspicious happens. Basically [8:02] that's how you define what being [8:05] suspicious on chain is. [8:08] And if you [8:09] and if you detect anything like that you [8:10] can start your incident response and go [8:13] go move on to the next steps. [8:15] The the second step is containment and [8:17] this is something that I feel has like [8:19] the most value and that is because [8:23] you need to have the ability to have [8:25] granular control over what actions you [8:28] can take in order to contain a hack. For [8:30] example, a bunch of protocols have [8:32] pausing ability but [8:34] [clears throat] [8:37] but that is not really helpful if the [8:39] only thing we can do is like pause the [8:41] entire protocol because if the only [8:43] thing that you can do is pause the [8:44] entire protocol that means that you [8:46] would be hesitant in using that ability [8:49] unless you're like really sure that [8:51] something really bad is happening and [8:54] that is something that you should not [8:56] have. You should never have hesitancy in [8:57] order [8:59] hesitancy in a situation where you [9:00] believe something wrong might happen. So [9:04] that's why having granularity and [9:06] basically like the smallest action [9:07] possible is really helpful. If you know [9:10] for example for example we at Etherfi we [9:12] are a staking protocol we have a staking [9:14] token called VETH and we have an [9:16] integration with Lido to manage [9:20] like we hold some of our assets in Lido. [9:22] So for example recently when the [9:24] consensus validators [9:27] got hacked when when what we saw was [9:31] just that Lido is having mass exits and [9:34] we at that point of time did not know [9:36] why that was happening. So we could [9:38] since we have this granular control that [9:40] we can pause like certain flows instead [9:42] of pausing the entire protocol we just [9:43] took that action and paused [9:46] flows related to Lido so that if there [9:47] is some exposure to Lido that we're not [9:49] aware of right now we can [9:52] contain ourselves [clears throat] from [9:53] that and then [9:55] and then after containing then we can [9:56] investigate and find out what happened [9:58] within a few hours we within a few hours [10:00] we [10:01] got the whole picture that there was [10:02] some key compromise in some [10:04] [clears throat] [10:06] in some validators and that like there [10:07] is no real issue to us and that's [10:11] when we [10:12] when we unblocked the flow and we [10:14] basically like recovered [10:16] recovered our protocol back to the [10:17] original state. We were we did not [10:19] hesitate in taking that decision because [10:21] pausing does not mean that we are [10:22] pausing our entire protocol. [10:24] Deposits still work, withdrawals still [10:26] work, [10:27] bridging still work, rebasing still [10:28] worked, everything worked. The only [10:30] thing that we paused was [10:32] our integration with Lido and that [10:38] and that granularity basically allowed [10:40] us to have [10:41] allowed allowed us to take that action [10:43] that quickly without having any [10:45] hesitation. [10:47] The way we have built our pausing system [10:49] it's also it also auto lists [10:50] automatically. So like if there's if [10:52] you're pausing a very critical action it [10:54] auto lists like within eight hours and [10:57] less critical actions have longer longer [10:59] periods. We also have a feature we also [11:02] have the ability to blacklist an [11:03] address. This is something that we also [11:05] did like very recently with the Binance [11:07] hack where again like the Binance hack [11:10] happened we did not know why it happened [11:12] but the first thing we knew is that okay [11:13] we can trace on chain like what are all [11:16] the addresses that hold the [11:18] that hold the stolen funds and we just [11:21] started blacklisting those addresses and [11:22] that is also like one lever that we [11:24] could take that which just [11:27] it does not mean that that attacker [11:29] could not have [11:33] could not have like move funds to [11:35] another address bypass our blacklist by [11:37] like rotating address faster than we [11:39] were able to take action and then enter [11:41] our protocol but it's just like it's an [11:43] extra layer of security. Like if we [11:44] wanted to discourage the hacker from [11:46] using our protocol to like launder the [11:48] funds he would not he would probably be [11:50] discouraged because he could see that we [11:52] are blacklisting his addresses. So [11:55] so that's what I meant initially like [11:57] more layers of security it's it it's not [12:00] a guarantee that your system is secure [12:02] but it also add it just adds like [12:06] more probability that your security that [12:08] your system is going to be safer. [12:13] [cough] [12:15] And coming back to invariants. So if [12:17] you've defined an invariant, that means [12:18] that if that invariant has gone wrong, [12:20] then like you are [12:23] then that's pretty bad basically. [12:26] In that scenario, if you have like [12:28] defined like what going wrong actually [12:30] instead of defining just like what a [12:32] suspicious activity looks like, you can [12:34] actually [12:36] you can actually wire wire [12:39] wire that monitor to directly [12:41] take actions without any human without [12:43] any human intervention. And that is what [12:45] I mean by atomic pause. But you cannot [12:48] just wire that willy-nilly and you [12:50] cannot just [12:53] you cannot just like wire any monitor to [12:54] an auto pause because like if that [12:56] monitor falsely fires for any reason, [12:58] then you probably have like [13:01] caused caused your protocol to [13:06] caused your protocol to like have some [13:07] downtime that it did not deserve. So we [13:10] also have like a policy on like what it [13:11] means for a what it means for a monitor [13:14] to be promoted to [13:16] actually firing an auto pause. And that [13:18] is a number one policy is that the [13:20] monitor should actually be [13:21] deterministic. It should not be [13:23] like monitoring something that oh it's [13:25] over a threshold. That means it's [13:26] suspicious. We should investigate. No, [13:28] it's a deterministic thing like we have [13:29] an exchange rate for V and the [13:31] underlying TVL. And if that exchange [13:33] rate is broken, then that means that [13:35] yeah okay something bad has happened. We [13:36] should pause the protocol and start [13:38] investigation immediately. We have a [13:39] verified coverage of it. Like whatever [13:41] we are [13:43] whatever we're trying to monitor, we can [13:44] actually deterministically verify [13:47] the sources [13:50] the sources of like where the monitor is [13:52] being fed from. [13:54] We test it and see that there are [13:55] actually zero false positives over over [13:58] used in a back tested window. And then [14:00] finally [14:02] the arm is also [14:03] the arm is also like our goal is to set [14:06] set it to the smallest possible action [14:09] that can be taken [14:11] up and that invariant goes wrong so that [14:13] we can also minimize the plus radius [14:15] in case there is a false positive. [14:19] And yeah, the same layers that I have [14:20] been talking about also apply to all our [14:23] other products for our [14:25] for our cash product, for a liquid [14:26] vaults and also for the RV market that [14:29] we have. So we basically follow these [14:31] policies across [14:35] all our all our products and that's how [14:38] we like ensure that we provide the [14:40] safest product to the users. So if you [14:42] are a user and you want to put your [14:44] money in any protocol, [14:47] you should probably [14:49] probably answering these questions and [14:50] trying to find the answer of these [14:51] questions would give you a very good [14:54] understanding of like [14:56] how the secure, how seriously that [14:58] protocol takes this takes its security. [15:01] And yeah, hopefully that will allow you [15:04] to make [15:05] better decisions with keep your [15:08] money. [15:09] And yes, same thing. [15:12] So yeah, thank you. [15:14] >> [applause]