
    <rss 
      xmlns:dc="http://purl.org/dc/elements/1.1/"
      xmlns:content="http://purl.org/rss/1.0/modules/content/"
      xmlns:atom="http://www.w3.org/2005/Atom"
      xmlns:media="http://search.yahoo.com/mrss/" 
      xmlns:typefully="https://typefully.com/profile"
      version="2.0">
      <channel>
        <title>Odysseus | phylax.systems (@odysseas_eth)</title>
        <link>https://typefully.com/odysseas_eth</link>
        <description>ceo @phylaxsystems / adv @arete_xyz The society that separates its scholars from its warriors will have its thinking done by cowards and its fighting by fools</description>
        <pubDate>Wed, 11 Jan 2023 12:43:29 GMT</pubDate>
        <lastBuildDate>Wed, 11 Jan 2023 12:43:29 GMT</lastBuildDate>
        <generator>Typefully</generator>
        <image>https://screenshots.typefully.com/screenshot?size=1200x640&amp;url=https://typefully.com/odysseas_eth/card</image>
        <atom:link href="https://typefully.com/odysseas_eth" rel="self" type="application/rss+xml"/>
        
    <item>
      <guid>https://typefully.com/odysseas_eth/gobblers-solidity-notes-Yze62K9</guid>
      <title>Gobblers Solidity notes</title>
      <description>I read the Gobblers contract a while back, and here is a compilation of my notes.

It&#39;s not a complete review, but rather the things I found interesting.

kudos to @FrankieIsLost @transmissions11 for the excellent codebase 🔥 ►External contracts that are part of the system (e.g., goo) are saved as i…</description>
      <link>https://typefully.com/odysseas_eth/gobblers-solidity-notes-Yze62K9</link>
      <pubDate>Wed, 11 Jan 2023 12:43:29 GMT</pubDate>
      <content:encoded><![CDATA[I read the Gobblers contract a while back, and here is a compilation of my notes.<br><br>It's not a complete review, but rather the things I found interesting.<br><br>kudos to <a class="tweet-url username" href="https://twitter.com/FrankieIsLost" data-screen-name="FrankieIsLost" target="_blank" rel="nofollow">@FrankieIsLost</a> <a class="tweet-url username" href="https://twitter.com/transmissions11" data-screen-name="transmissions11" target="_blank" rel="nofollow">@transmissions11</a> for the excellent codebase 🔥<br><br><img alt="Image" src="https://api.typefully.com/media-p/14129cae-c2a5-4638-9f7b-022540fd3cf8/"><br><br>►External contracts that are part of the system (e.g., goo) are saved as immutables (e.g., `Goo public immutable goo`)<br><br>This is smart because immutables are replaced at deployment time with the value. Thus, they can be supplied from the constructor (dynamic) AND save gas.<br><br>► Constants to the system are ALL_CAPITAL<br><br>Good visual hack for readability<br><br>► Use weird uints for efficient packing in structs<br><br>We tend to forget that uint comes in all shapes and forms (e.g, uint96). No need to stick to the usual (uint256, uint128, etc.)<br><br><img alt="Image" src="https://api.typefully.com/media-p/230a9ad0-82d6-4536-aedd-302f6911154d/"><br><br>►Use custom errors instead of require<br><br>Seems suitable for gas usage and readability.<br><br>This should be done in new codebases and should not be introduced in older codebases, where it would coexist with 'require'. As <a class="tweet-url username" href="https://twitter.com/annascarroll" data-screen-name="annascarroll" target="_blank" rel="nofollow">@annascarroll</a> likes to say - "this seems like code-smell."<br><br>►Pack the increment of a variable inside something else, like an event emission. That way, you both get the storage variable incremented, and it's used simultaneously by the event.<br><br>Ingenius<br><br><img alt="Image" src="https://api.typefully.com/media-p/e8488535-5184-4503-9614-e5607dac1647/"><br><br>► Use underflow/overflow to revert to unintended behavior<br><br>This, IMHO, hinders *a bit* from the readability since the intended behavior is not clearly defined by a `require` or `if.` With appropriate commenting, it shouldn't be a problem.<br><br>► Use `++` operator liberally and in the place of the last expression that uses the variable instead of incrementing on its own<br>• `array[i++]` will use `i` to access the array and then increment it<br>• `array[++i]` will first increment and then access the array with `i + 1`<br><br>►Use calldata instead of memory. You skip from copying the data in memory, but you have to use data that come from calldata (directly or indirectly).<br><br>Although using `memory` is handier, `calldata` can indeed save up some gas. The restriction can be a bit frustrating, though.<br><br>►In a loop:<br>• it's better to store the array item in a memory variable<br>• define the memory variable once outside the loop (saves about seven gas on every iteration)<br><br><img alt="Image" src="https://api.typefully.com/media-p/b3f7dbc6-445d-4c4b-a457-82ff6537fd72/"><br><br>►It doesn't use modifiers but instead inlines the access control.<br><br>This saves gas, but again in my mind, hinders readability. With modifiers, it's easier to visually group functions for things such as access control or state machine restrictions.<br><br><img alt="Image" src="https://api.typefully.com/media-p/dd0bb678-26ec-4e14-9219-1851c0ce2eb0/"><br><br>► Saving gas from if statements:<br>• Use ternary operators in combination with variable definitions<br>• Use branchless expression via Assembly<br><br>I will probably use the compact if and definition. A similar practice is used in Rust. I tend to avoid Assembly.<br><br><img alt="Image" src="https://api.typefully.com/media-p/8128e62c-d3b7-4100-8e9d-0dd3268bcdd5/"><br><br>► Name tests with `FFI` or `Longrunning` so we can filter them out of the CI tests.<br><br>e.g `longrunning_testFuzzLiquidation`<br><br>►You can pack a variable definition and a check inside the same require.<br><br><img alt="Image" src="https://api.typefully.com/media-p/9628505d-be34-48b9-89eb-dcc6c225b2b3/"><br><br>►Deployment scripts:<br>• Functionality is implemented in a base contract that uses constructor args to define variables. You create a contract that inherits the base and calls the constructor with different args; thus, the constructors work as a configuration file.<br><br><img alt="Image" src="https://api.typefully.com/media-p/04e45c3c-7dd8-4956-9ae2-48ae30df4992/"><br><br>You can read the unrolled version of this thread here: <a href="https://typefully.com/odysseas_eth/Yze62K9" target="_blank" rel="nofollow">https://typefully.com/odysseas_eth/Yze62K9</a>]]></content:encoded>
      <typefully:post_id>Yze62K9</typefully:post_id>
      <typefully:post_type>thread</typefully:post_type>
      <typefully:pinned>false</typefully:pinned>
      null
    </item>
  
    <item>
      <guid>https://typefully.com/odysseas_eth/nomad-learnings-from-the-incident-XQskWEh</guid>
      <title>Nomad: Learnings from the Incident</title>
      <description>I recently talked on @EFDevcon about my learnings from the @nomadxyz_ hack, which saw about $190M in tokens drained from the Nomad Bridge.

Probably one of the most painful experiences I have ever had.

A quick thread 🧵 on how I went from Nomad to Very Mad

1/26 Firstly, a small disclaimer:

The vi…</description>
      <link>https://typefully.com/odysseas_eth/nomad-learnings-from-the-incident-XQskWEh</link>
      <pubDate>Thu, 20 Oct 2022 14:00:32 GMT</pubDate>
      <content:encoded><![CDATA[I recently talked on <a class="tweet-url username" href="https://twitter.com/EFDevcon" data-screen-name="EFDevcon" target="_blank" rel="nofollow">@EFDevcon</a> about my learnings from the <a class="tweet-url username" href="https://twitter.com/nomadxyz_" data-screen-name="nomadxyz_" target="_blank" rel="nofollow">@nomadxyz_</a> hack, which saw about $190M in tokens drained from the Nomad Bridge.<br><br>Probably one of the most painful experiences I have ever had.<br><br>A quick thread 🧵 on how I went from Nomad to Very Mad<br><br>1/26<br><br>Firstly, a small disclaimer:<br><br>The views I express today are my own and do not reflect Illusory Systems (the company behind Nomad)<br><br>Feel free to watch the presentation here:<br><br><a href="https://www.youtube.com/watch?v=Ow8YXfv02Jo" target="_blank" rel="nofollow">https://www.youtube.com/watch?v=Ow8YXfv02Jo</a><br><br>2/26<br><br>Nomad is NOT a bridge.<br><br>Nomad has a bridge.<br><br>Nomad is an optimistic protocol for interoperability that supports arbitrary messages between domains.<br><br>A bridge is just an application on top of a message-passing channel.<br><br>3/26<br><br><img alt="Image" src="https://api.typefully.com/media-p/63833760-6f00-489c-a8e9-ab18ed71129f/"><br><br>But how Nomad works?<br><br>Messages sent from a domain are added to a Merkle Tree. The tree's root compresses the information about whether a message belongs to the tree.<br><br>Nomad simply needs to send the root from one domain to another. The messages can be proven on that domain.<br><br>4/26<br><br><img alt="Image" src="https://api.typefully.com/media-p/2f8c657c-f306-42b7-ac11-12bc9c0f544e/"><br><br>A message is sent from a domain by calling the Home contract. It will add the message to the Merkle Tree, which updates the tree's root.<br><br>After the root is relayed to the Replica contract, we wait for the optimistic window and finally can prove and process messages.<br><br>5/26<br><br><img alt="Image" src="https://api.typefully.com/media-p/abff9e5f-cf33-4248-afb3-1ba596d42662/"><br><br>But how does a bridge work?<br><br>The user sends native tokens on the sending chain to the bridge. It locks native tokens on the sending chain and mints representation tokens on the receiving chain. These tokens have value only because they can be redeemed for the native ones.<br><br>6/26<br><br><img alt="Image" src="https://api.typefully.com/media-p/c91778ff-7aed-4a2a-8998-78bec6a341ba/"><br><br>IMHO, this is why bridges are hacked so often.<br><br>They are not only complex systems but also own tons of collateral. They are juicy targets that attract a lot of eyes.<br><br>Without collateral, users can't redeem back their representations.<br><br>7/26<br><br><img alt="Image" src="https://api.typefully.com/media-p/a485d2c6-4004-4841-8e1a-aee6e4d19fc8/"><br><br>Root Cause Analysis<br><br>A bug caused the Replica contract to fail to authenticate messages properly. This issue allowed any message to be forged.<br><br><a class="tweet-url username" href="https://twitter.com/coinbase" data-screen-name="coinbase" target="_blank" rel="nofollow">@coinbase</a> did an excellent incident analysis on this<br><br><a href="https://www.coinbase.com/blog/nomad-bridge-incident-analysis" target="_blank" rel="nofollow">https://www.coinbase.com/blog/nomad-bridge-incident-analysis</a><br><br>8/26<br><br>Currently, the Nomad Protocol is paused.<br><br>Restarting the Protocol is easy.<br><br>Restarting an under-collateralized Bridge is hard.<br><br>We want people to:<br>a) Collect funds whenever tokens exist in the bridge<br>b) Collect funds fairly<br><br>Follow <a class="tweet-url username" href="https://twitter.com/nomadxyz_" data-screen-name="nomadxyz_" target="_blank" rel="nofollow">@nomadxyz_</a> for updates and design details.<br><br>9/26<br><br>✅ My Suggestions for protocol devs:<br><br>Bismarck said that only a fool learns from his own mistakes. A wise man learns from the mistakes of others, so I would advise you to take note.<br><br>10/26<br><br><img alt="Image" src="https://api.typefully.com/media-p/62842b99-d103-43e5-b7d2-2d143f0f363c/"><br><br>I grouped my suggestions into four categories:<br><br>•  Test<br>•  Observe<br>•  Engage<br>•  Communicate<br><br>Think of them as multiple defenses of a castle. You layer them properly and hope the attackers won't breach the citadel.<br><br>11/26<br><br><img alt="Image" src="https://api.typefully.com/media-p/d9f5a8d5-2b22-4758-b4f0-30829ec13c46/"><br><br>🛠 Test 🛠<br><br>➡️ Testing<br>• unit tests<br>• property-based tests<br>• integration tests<br>• forking tests<br>• invariant tests<br><br>➡️ Honorable mention<br>• static analysis<br>• storage layout inspection<br><br>🔥 Use foundry 👇<br><a href="https://getfoundry.sh/" target="_blank" rel="nofollow">https://getfoundry.sh/</a><br><br>12/26<br><br>In my mind, priority should be in<br>- Unit Tests<br>- Property-based tests<br>- Forking Tests<br>- Audits<br><br>Moreover, I think that protocols should seriously consider."<br>- fork tests (bugs often require on-chain state to get surfaced)<br>- invariant tests (provably secure protocol)<br><br>13/26<br><br><img alt="Image" src="https://api.typefully.com/media-p/241edd60-6672-4b95-bfdb-0287a40a8603/"><br><br>👉 Quick plug<br><br>I created a simple script that you can add to your CI and verify that the storage layout of your contracts does not change without you noticing.<br><br>**A LOT** of the hacks that happened to upgradeable contracts were due to this.<br><br><a href="https://github.com/odyslam/bash-utils" target="_blank" rel="nofollow">https://github.com/odyslam/bash-utils</a><br><br>14/26<br><br>👁 Observe 👁<br><br>If you receive "u up" and aren't already up, it's already too late<br><br>15/26<br><br>Alerting in web3 is nascent, but it's a solved problem in Web2.<br><br>1.  Start with Business Objectives<br>2.  Define Actionable Alerts<br>3.  Define Playbook for every Alert<br>4.  Beware of Alert Fatigue 😴 (ignore alerts)<br><br>Read the Google SRE handbook: <a href="https://sre.google/sre-book/monitoring-distributed-systems/" target="_blank" rel="nofollow">https://sre.google/sre-book/monitoring-distributed-systems/</a><br><br>16/26<br><br>IMHO, we can group on-chain alerting into two large groups:<br><br>1. Hereustic-based alerts. Define rules, but require human intervention to interpret<br>2. Invariant-based alerts. If invariants break, then alert. Mitigation can be automated due to its binary nature (true/false)<br><br>17/26<br><br>An interesting note about "Invariant-based" alerts:<br><br>Interestingly, <a class="tweet-url username" href="https://twitter.com/rikardhjort" data-screen-name="rikardhjort" target="_blank" rel="nofollow">@rikardhjort</a> from <a class="tweet-url username" href="https://twitter.com/rv_inc" data-screen-name="rv_inc" target="_blank" rel="nofollow">@rv_inc</a> mentioned a similar use of continuous invariant testing as part of an alerting system in his talk "Formal method for the working DeFi dev"<br><br>Expect more 🤙<br><br><a href="https://archive.devcon.org/archive/watch/6/formal-methods-for-the-working-defi-dev/" target="_blank" rel="nofollow">https://archive.devcon.org/archive/watch/6/formal-methods-for-the-working-defi-dev/</a><br><br>18/26<br><br>⚔️ Engage ⚔️<br><br>It's now the time to manage an incident.<br><br>Prepare for the incident. Have explicit ownership of all the deliverables (which should also be precise).<br><br>Unless you have simulated it before, you won't react in time under stress and extreme time constraints.<br><br>19/26<br><br><img alt="Image" src="https://api.typefully.com/media-p/49a988f1-4631-4ced-95e6-8f5efa22d62b/"><br><br>Read The Anatomy of a Good Emergency Procedure by our good friends at <a class="tweet-url username" href="https://twitter.com/TenderlyApp" data-screen-name="TenderlyApp" target="_blank" rel="nofollow">@TenderlyApp</a> and <a class="tweet-url username" href="https://twitter.com/iearnfinance" data-screen-name="iearnfinance" target="_blank" rel="nofollow">@iearnfinance</a> and adapt it to your organization.<br><br>Then run gamedays for the entire org.<br><br><a href="http://blog.tenderly.co/what-good-war-room-emergency-procedure-yearn-finance-case/" target="_blank" rel="nofollow">http://blog.tenderly.co/what-good-war-room-emergency-procedure-yearn-finance-case/</a><br><br>20/26<br><br>🗣 Communicate 🗣<br><br>Now that everything is said and done. It's time to face the music.<br><br>Although we always have the user in mind, we shouldn't talk to anyone. Not a tweet, not a GitHub commit, nothing.<br><br>First, we talk with our legal team.<br><br>Then, we talk with users.<br><br>21/26<br><br>Let's see an example timeline for the first hours/days after the incident:<br><br>1. Inform legal<br>2. Inform users<br>3. Inform partners<br>4. Get a chain analytics firm<br>5. Setup a recovery address<br>6. Align with legal on a bounty<br>7. Inform users<br><br>🔁 Rinse and repeat steps 1,2,3,4<br><br>22/26<br><br>A note on chain analytics firms:<br><br>They provide valuable information to Legal Enforcement Agencies (which are contacted via your legal team). They also help with asset recovery, as people have a sudden change of heart as LEA zeroes in their real identity. 🤷‍♂️<br><br>23/26<br><br>Expect Asset Recovery to be a parallel workstream to everything you do. It will continue to consume human resources and capital throughout the following months of operations as you:<br>• mitigate the hack<br>• restart the protocol<br>• figure out the way forward<br><br>24/26<br><br><img alt="Image" src="https://api.typefully.com/media-p/51ae594a-bfc7-4f82-882d-2c6b05d9742e/"><br><br>I am sure multiple protocols are thinking about the same issues, so I am always looking for cool stuff to collab on and make the space a tiny bit more secure.<br><br>I hope I have given you a map you can use as you develop your protocol.  Security shouldn't be an afterthought.<br><br>25/26<br><br>I feel truly blessed to work alongside <a class="tweet-url username" href="https://twitter.com/annascarroll" data-screen-name="annascarroll" target="_blank" rel="nofollow">@annascarroll</a> , <a class="tweet-url username" href="https://twitter.com/_prestwich" data-screen-name="_prestwich" target="_blank" rel="nofollow">@_prestwich</a> , and the rest of the Nomad crew.<br><br>You can be sure that the Nomad team is working overtime to push the protocol forward and restart the bridge.  I couldn't have asked for better teammates.<br><br>26/26<br><br>You can read the unrolled version of this thread here: <a href="https://typefully.com/odysseas_eth/XQskWEh" target="_blank" rel="nofollow">https://typefully.com/odysseas_eth/XQskWEh</a>]]></content:encoded>
      <typefully:post_id>XQskWEh</typefully:post_id>
      <typefully:post_type>thread</typefully:post_type>
      <typefully:pinned>false</typefully:pinned>
      null
    </item>
  
    <item>
      <guid>https://typefully.com/odysseas_eth/wtf-is-nomad-and-why-i-joined-R7s2z9E</guid>
      <title>WTF is Nomad and why I joined</title>
      <description>
After taking some much-needed time off, I am stoked to announce that I am joining @nomadxyz_ as a vibes engineer, working towards a cross-chain future founded on the principles that I care most about.

Trustless and Secure.

👇 A thread (like you didn&#39;t see it coming)

1/ This thread is divided int…</description>
      <link>https://typefully.com/odysseas_eth/wtf-is-nomad-and-why-i-joined-R7s2z9E</link>
      <pubDate>Tue, 12 Apr 2022 17:59:11 GMT</pubDate>
      <content:encoded><![CDATA[<br>After taking some much-needed time off, I am stoked to announce that I am joining <a class="tweet-url username" href="https://twitter.com/nomadxyz_" data-screen-name="nomadxyz_" target="_blank" rel="nofollow">@nomadxyz_</a> as a vibes engineer, working towards a cross-chain future founded on the principles that I care most about.<br><br>Trustless and Secure.<br><br>👇 A thread (like you didn't see it coming)<br><br>1/<br><br><img alt="Image" src="https://api.typefully.com/media-p/f691633e-fa5e-4136-aea0-7efbb0f4a478/"><br><br>This thread is divided into two parts:<br><br>1) WTF is Nomad?<br><br>2) Why I am excited about joining Nomad<br><br>2/<br><br><br>Nomad is NOT a bridge.<br><br>Nomad is a protocol for sending arbitrary messages between different domains, either L1 blockchains or sidechains, and rollups<br><br>Wherever you read chain, think domain<br><br>A bridge is an app that uses channels to send tokens from one chain to another<br><br>3/<br><br>Bridges and channels are often conflated because a bridge is the first and foremost application of a messaging channel.<br><br>Nomad is so much more than that.<br><br>With Nomad, we can extend any functionality to be cross-chain.<br><br>e.g: Vote on one chain and execute proposals on another<br><br>4/<br><br>The vision is to have a unified protocol that connects any domain with any other domain.<br><br>No need for hops between domains and complex representations, as all assets will be able to be directly bridged.<br><br>To do that, we need a simple, robust protocol.<br><br>We need Nomad.<br><br>5/<br><br>Generally, there are three kinds of channels<br><br>- Light-client: A smart contract verifies block headers from the other domain. =&gt; Secure, Fast, EXPENSIVE<br><br>6/<br><br>- Validators/Trusted: A PERMISSIONED set of validators move messages (or tokens) -&gt; Fast, Cheap, Security low<br><br>The main problem with Validator sets is that you can only minimize Trust, but never completely remove it. Both Ronin and Wormhole hacks happened on trusted bridges.<br><br>7/<br><br>- Optimistic Rollup(ORU) Channels: TIED to their optimistic rollup, secure, slow<br><br>8/<br><br>Nomad has an Optimistic design:<br><br>Relatively slow (faster than ORU), lower security than ORU, LOW complexity, HIGH reusability<br><br>(At the end of the thread, I link a couple of resources about our design)<br><br>9/<br><br>With a focus on low complexity and high reusability, we create an easy-to-reason-about protocol that can rapidly be deployed.<br><br>Direct channels mean that messages don't multi-hop to reach their destination, and tokens are directly respresented.<br><br>SIMPLE⬆️ =&gt; SECURE⬆️<br><br>10/<br><br>We allow fraud in edge cases that are managed through crypto-economic security while targeting reusability, low complexity, and low cost.<br><br>With Nomad becoming THE channel protocol, teams don't have to trust Y number of bridges.<br><br>They trust one implementation for all.<br><br>11/<br><br>This is an important point, as most people prefer to use the native bridge of a rollup for fewer trust assumptions.<br><br>But, if they use 5 rollups, they have to trust 5 bridge implementations.<br><br>The more domains they want, the more critical a singular implementation is.<br><br>12/<br><br>📍 HOW Nomad works<br><br>It's part of the optimistic family of system designs. It sees some attestation over some fact and if a specific amount of time passes, then it accepts it as valid.<br><br>13/<br><br>The sending chain is the source of truth and contains the “Home” contract where messages are enqueued. Messages are committed in a Merkle tree. The root of this tree is signed by the updater and relayed to the receiving chain.<br><br>14/<br><br>Any chain can maintain a Replica, which stores the latest Root it knows about. By receiving updates through the Relayer, it can replay all updates and reach the same Root as Home. <br><br>The processor makes sure that updates are processed after the time window elapses.<br><br>15/<br><br>Fraud can happen on the receiving chain, but you can prove it on the sending chain and the updater will get slashed.<br><br>Fraud can't be hidden and we only need a single honest party for the Updater to get slashed and the system to be halted.<br><br>Fraud = Costly. Public. Blocked.<br><br>16/<br><br>Nomad is comprised of smart contracts and off-chain rust agents that work in tandem.<br><br>Main contracts:<br><br>🏡 Home.sol: Source of truth for all messages sent FROM the domain.<br><br>👥 Replica.sol: Source of truth for all messages received FROM a domain to the destination domain.<br><br>17/<br><br>📠 Router.sol: Application-specific, encodes/decodes messages passed in the channel for that app.<br><br>It sits between the app and either Replica or Home.<br><br>Nomad channels are like internet cables, raw. The router makes sense of the signal, converts it to data, and routes it.<br><br>18/<br><br>Offchain Agents<br><br>Updater: poll Home and update source of truth (SoT) with new messages<br><br>Relayer: Watches Home SoT and adds to Replica queue<br><br>Processor: After time passes, updates Replica SoT with messages from the queue<br><br>Watcher: polls for fraud in Relay and reports to Home<br><br>19/<br><br>An overview of the architecture, with a supposed message flying from Ethereum to Polygon and back to Ethereum.<br><br>The numbers on the lines signify the order of participation of each entity.<br><br>Watcher's step is optional (only if fraud occurs, thus between 2 and 3).<br><br>20/<br><br><img alt="Image" src="https://api.typefully.com/media-p/f2ef54a6-d6e4-4739-a39c-e9f7cec051d5/"><br><br>For every Home contract, there is an Updater that “updates” the Root, a Relayer that relays the new Root to every Replica, and a Watcher.<br><br>For every Replica contract, there is a Processor that updates the Replica root after the time window.<br><br>21/<br><br><img alt="Image" src="https://api.typefully.com/media-p/62a4c5f8-4830-479b-814c-6fc409c0e41a/"><br><br>Now, let's see the above use-case, but with greater detail:<br><br>After I send the message through the Gov Router, an event is emitted by Home that a new message was added to the route.<br><br>Updater listens for that event and reacts.<br><br>22/<br><br><img alt="Image" src="https://api.typefully.com/media-p/38fb1cb0-733d-4380-ba3c-879623ed9e42/"><br><br>Updater "updates" the Home Root, which in turn is detected by Relayer which propagates the change to the Replica. <br><br>Note that “dispatch” in the previous flow does not trigger an Update of the Root. The updater can wait for multiple queued messages and "batch" update them.<br><br>23/<br><br><img alt="Image" src="https://api.typefully.com/media-p/b1466458-3ea8-4f42-b7e0-9b8479740a32/"><br><br>Next, the processor will pick up the new Root in Replica and wait for the time window.<br><br>Once the time elapses, it verifies the messages that it picked through event emission against the new Root.<br><br>Finally, Replica calls the respective routers and sends the raw messages.<br><br>24/<br><br><img alt="Image" src="https://api.typefully.com/media-p/f46f7c19-db4e-4de5-adf6-276c5760f730/"><br><br>The above flow was the happy path, aka how the system will work if everything goes as planned.<br><br>There are two types of fraud:<br><br>- Improper Update<br>- Double Update<br><br>Moreover, we are actively working on our Fraud Recovery mechanism and you can expect many things in the future.<br><br>25/<br><br>Improper Update<br><br>The Updater signs a fRoot that wasn't queued, thus including fake messages and it to the Replica<br><br>The Watcher<br><br>a) submits the fRoot + Updater's sig to Home. Updater gets slashed, and Home shuts down<br><br>b) removes Replica from the Registry, closing the channel<br><br>26/<br><br><img alt="Image" src="https://api.typefully.com/media-p/d65ea4ca-a0df-4d33-80b7-16c5a0df8fd8/"><br><br>Double Update<br><br>Double Update can be proven in both Home and Replica.<br><br>The watcher submits two roots that share a root, and have valid signatures but are not equal. At some point in the message Tree, there was a fork.<br><br>The contract fails and Updater gets slashed.<br><br>27/<br><br><img alt="Image" src="https://api.typefully.com/media-p/05133845-7a97-4b30-8d67-823a2c248ef4/"><br><br>While the system is now highly centralized, we want to be highly transparent, as we move towards realizing our vision.<br><br>Currently, we are finalizing our Governance module, which will enable voters to choose new chains to be added to send and/or receive messages.<br><br>28/<br><br>Nomad Governance TL;DR:<br><br>We define a governor chain where the governance lives. <br><br>That chain MUST have a direct connection to every other chain so that governance proposals can be executed (e.g change x parameter in chain Y).<br><br>The chains may or may not have a direct channel.<br><br>29/<br><br><img alt="Image" src="https://api.typefully.com/media-p/1cf9fa88-405b-40ce-8fe6-dfe840f01f3b/"><br><br>Moreover, we are working towards decentralizing the operation of our off-chain agents.<br><br>In our design, the only permissioned agents are the Updater and the Watcher.<br><br>The Updater is bonded so that it honestly updates the Root of the Home.<br><br>Watcher is fully trusted (for now)<br><br>30/<br><br>The Watcher performs two functions, one which is permissionless and one which is not.<br><br>a) Inform Home of a fraudulent update in Replica, slashing the Updater. Home can detect fraud.<br><br>b) Halt the Replica. As it can't detect fraud, it assumes that the Watcher is honest.<br><br>31/<br><br><img alt="Image" src="https://api.typefully.com/media-p/aa9d3fc6-e210-4d3c-97df-a6ac66ab9334/"><br><br>In the future, we want to improve the design and make Watcher a permissionless entity that anyone can run, but are incentivized to be an honest actor.<br><br>We have a couple of designs in mind, so stay tuned anon for a thread in the future ⚡️<br><br>We are on it, anon.<br><br>32/<br><br>When I started talking with the team, I immediately knew that there was something special about it.<br><br>While <a class="tweet-url username" href="https://twitter.com/pranaymohan" data-screen-name="pranaymohan" target="_blank" rel="nofollow">@pranaymohan</a> talked about the state of affairs in bridging and the opportunity with Nomad, <a class="tweet-url username" href="https://twitter.com/barbaraliau" data-screen-name="barbaraliau" target="_blank" rel="nofollow">@barbaraliau</a> underlined the challenges that the team is tackling.<br><br>Honesty ✅<br><br>33/<br><br>But it's not only about honesty. It's also about pragmatism.<br><br>You can't go where you want, if you don't know where you **are**.<br><br>Realizing a vision is like a vector, the direction is equally important to speed.<br><br><a class="tweet-url username" href="https://twitter.com/annascarroll" data-screen-name="annascarroll" target="_blank" rel="nofollow">@annascarroll</a> gave me confidence that we will get there.<br><br>34/<br><br>Then, I started reading about the protocol and I found the same characteristics.<br><br>While extremely early, the team has ensured that the documentation serves as a true source of truth for the state of the protocol.<br><br>It's not about benefits, but tradeoffs.<br><br>35/<br><br>There are BILLION dollar projects that use marketing-speak in the dev docs, omitting questionable design decisions and real-life data.<br><br>But, Nomad is different.<br><br>We don't need to hide anything.<br><br>We trust our design decisions and our ability to tackle their challenges.<br><br>36/<br><br>In Nomad I will be initially helping at the protocol level, formalizing the protocol, and (obviously) porting our test suite to Foundry. <br><br>At the same time, I plan on familiarizing myself with the codebase of the  Rust Agents, enabling me to contribute there as well.<br><br>37/<br><br>Apart from that, one of my goals is to maintain a "state of affairs".  <br><br>An accurate 1-pit stop for developers and users that want to know about our protocol.<br><br>Where we excel, where we suck, and what we want to improve. <br><br>I want Nomad to be an example to follow.<br><br>38/<br><br>Ah, did I mention that Nomad just raised 💲22M to build the protocol for a cross-domain future? <br><br>Yup, it did.<br><br><a href="https://twitter.com/nomadxyz_/status/1513891049906872325" target="_blank" rel="nofollow">https://twitter.com/nomadxyz_/status/1513891049906872325</a><br><br>39/<br><br>Dive deeper into Nomad:<br><br><a href="https://docs.nomad.xyz/#how-nomad-passes-messages-between-chains" target="_blank" rel="nofollow">https://docs.nomad.xyz/#how-nomad-passes-messages-between-chains</a><br><br><a href="https://github.com/nomad-xyz/monorepo" target="_blank" rel="nofollow">https://github.com/nomad-xyz/monorepo</a><br><br>40/<br><br>Check out the data for yourself:<br><br><a href="https://dune.xyz/0xroll/Nomad-Bridge-Ethereum" target="_blank" rel="nofollow">https://dune.xyz/0xroll/Nomad-Bridge-Ethereum</a><br><br>Try out our bridge:<br><br><a href="https://app.nomad.xyz/" target="_blank" rel="nofollow">https://app.nomad.xyz/</a><br><br>41/<br><br>A great talk about bridges and the tradeoffs with an Optimistic design, by <a class="tweet-url username" href="https://twitter.com/_prestwich" data-screen-name="_prestwich" target="_blank" rel="nofollow">@_prestwich</a><br><br><a href="https://www.youtube.com/watch?v=ZQJWMiX4hT0" target="_blank" rel="nofollow">https://www.youtube.com/watch?v=ZQJWMiX4hT0</a><br><br>You can read more about the Optimistic design in this great post by <a class="tweet-url username" href="https://twitter.com/ConnextNetwork" data-screen-name="ConnextNetwork" target="_blank" rel="nofollow">@ConnextNetwork</a> <br><br><a href="https://blog.connext.network/optimistic-bridges-fb800dc7b0e0" target="_blank" rel="nofollow">https://blog.connext.network/optimistic-bridges-fb800dc7b0e0</a><br><br>42/42<br><br>You can read the unrolled version of this thread here: <a href="https://typefully.com/odyslam_/R7s2z9E" target="_blank" rel="nofollow">https://typefully.com/odyslam_/R7s2z9E</a>]]></content:encoded>
      <typefully:post_id>R7s2z9E</typefully:post_id>
      <typefully:post_type>thread</typefully:post_type>
      <typefully:pinned>false</typefully:pinned>
      null
    </item>
  
      </channel>
    </rss>
  