<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <updated>2026-10-23T12:08:31Z</updated>
  <generator>https://njump.me</generator>

  <title>Nostr notes by BlitzPerp</title>
  <author>
    <name>BlitzPerp</name>
  </author>
  <link rel="self" type="application/atom+xml" href="https://njump.me/npub13kfh0ahh5qfq6adxtvnxgwvg3fcyqyydvh38vmwh56ds2krvccjqdvk568.rss" />
  <link href="https://njump.me/npub13kfh0ahh5qfq6adxtvnxgwvg3fcyqyydvh38vmwh56ds2krvccjqdvk568" />
  <id>https://njump.me/npub13kfh0ahh5qfq6adxtvnxgwvg3fcyqyydvh38vmwh56ds2krvccjqdvk568</id>
  <icon>https://blossom.jumble.social/02f2b7ed6a9445a18aed0c6b979b0891be2eeb02338fc9b6614c839971b41e60.png</icon>
  <logo>https://blossom.jumble.social/02f2b7ed6a9445a18aed0c6b979b0891be2eeb02338fc9b6614c839971b41e60.png</logo>




  <entry>
    <id>https://njump.me/nevent1qqs0fsw6wtpajkqh96l0gkpng6k8hagd4zjkm2h4xnymsg6zsfvgkgszyzxexalk77spyrt45edjvepe3z98qsqs34j7yand67nfkp2cdnrzgu0t48n</id>
    
      <title type="html"># How and why we added Creusot to the BlitzPerp Infra Creusot ...</title>
    
    <link rel="alternate" href="https://njump.me/nevent1qqs0fsw6wtpajkqh96l0gkpng6k8hagd4zjkm2h4xnymsg6zsfvgkgszyzxexalk77spyrt45edjvepe3z98qsqs34j7yand67nfkp2cdnrzgu0t48n" />
    <content type="html">
      # How and why we added Creusot to the BlitzPerp Infra&lt;br/&gt;&lt;br/&gt;Creusot proves properties of Rust code. You write a statement that must hold when a function returns (contract), and Creusot checks it for every possible input, not just the ones your tests try.&lt;br/&gt;&lt;br/&gt;In the BlitzPerp backend we applied Creusot to the perp&amp;#39;s money arithmetic: the code that computes PnL, funding, fees, and the split of a coin between maker and taker. The production code calls the proved functions directly. We followed with TLA&#43; and ProVerif.&lt;br/&gt;&lt;br/&gt;## Why we did it&lt;br/&gt;&lt;br/&gt;Some code decides who gets each satoshi. An error in the settlement arithmetic causes a direct loss of money, and it need not show up as a crash, it may just produce a wrong payout. A review reads the code; a test tries some values. Creusot covers the entire space of typed inputs (let&amp;#39;s say `u64` or `i64`).&lt;br/&gt;&lt;br/&gt;The proofs live alongside the backend code, so there is no second copy to drift out of sync. If someone changes a function so that its contract becomes false, the next proof run fails.&lt;br/&gt;&lt;br/&gt;## What we did&lt;br/&gt;&lt;br/&gt;To start, we created a small crate, `kernel`, with no standard-library dependency. It depends only on `creusot-std`. The crate initially held one function, `split_collateral`, which divides the coin between maker and taker after the venue fee. Since it needs a nightly Rust compiler and BlitzPerp builds on stable, we added a separate Nix shell, `.#creusot`.&lt;br/&gt;&lt;br/&gt;The core of the contract is one line:&lt;br/&gt;&lt;br/&gt;```rust&lt;br/&gt;split.0@ &#43; split.1@ &#43; venue_fee@ == collateral@&lt;br/&gt;```&lt;br/&gt;&lt;br/&gt;Maker output plus taker output plus venue fee equals the collateral exactly. No satoshi is lost and none is created, for any input.&lt;br/&gt;&lt;br/&gt;After this initial evaluation we added more functions to the kernel, verifying the arithmetic of matching, position maintenance, funding accrual, venue fee allocation, and payouts. Later commits covered the decision logic around that arithmetic: rebalance authorization, the re-signing rule during position lifetime, settlement clearing and matching, position-opening authorization, and the provenance of the funding rate.&lt;br/&gt;&lt;br/&gt;## Conclusion&lt;br/&gt;&lt;br/&gt;On top of that, we built a TLA&#43; formal model of the protocol and verified that, under the modeled assumptions, it is safe and fair, and that a 2-of-3 vault quorum keeps working after restarts with state recovered from logs. However, the model only proves that a finalized state cannot later change, assuming all participating state machines behave honestly; Byzantine voters are not modeled yet. So the result is reassuring for crashes, restarts, and honest operation, but it is not yet a proof of safety against actively malicious participants.&lt;br/&gt;&lt;br/&gt;With ProVerif we built a symbolic models of the cryptographic protocol&amp;#39;s messages. These models cover one deliberately narrow property of the current BLISK deployment where the two live members of an OR gate independently derive the same clause key before they accept the policy instance. BLISK is a novel protocol and tools like ProVerif allow us to be more confident about specific design decisions that use it in BlitzPerp design.&lt;br/&gt;&lt;br/&gt;Together, the three tools give the BlitzPerp prototype a solid foundation for releasing on mainnet sooner rather than later. None of them proves that the cryptography is hard to break, though. That part needs a computational proof and an external review.&lt;br/&gt;&lt;br/&gt;Read the litepaper: &lt;a href=&#34;https://blitzperp.com/docs/litepaper&#34;&gt;https://blitzperp.com/docs/litepaper&lt;/a&gt;  &lt;br/&gt;Follow us on X: &lt;a href=&#34;https://x.com/intent/follow?screen_name=BlitzPerp&#34;&gt;https://x.com/intent/follow?screen_name=BlitzPerp&lt;/a&gt;  &lt;br/&gt;Nostr: &lt;a href=&#34;https://njump.me/nprofile1qqsgmymh7mm6qysdwkn9kfny8xyg5uzqzzxktcnkdht6dxc9tpkvvfqpzfmhxue69uhk7enxvd5xz6tw9ec82cspz3mhxue69uhhyetvv9ujuerpd46hxtnfdulm8gvh&#34;&gt;https://njump.me/nprofile1qqsgmymh7mm6qysdwkn9kfny8xyg5uzqzzxktcnkdht6dxc9tpkvvfqpzfmhxue69uhk7enxvd5xz6tw9ec82cspz3mhxue69uhhyetvv9ujuerpd46hxtnfdulm8gvh&lt;/a&gt;  &lt;br/&gt;Join our chat: &lt;a href=&#34;https://t.me/StandardSatsCommunity&#34;&gt;https://t.me/StandardSatsCommunity&lt;/a&gt;
    </content>
    <updated>2026-11-08T22:05:36Z</updated>
  </entry>

  <entry>
    <id>https://njump.me/nevent1qqs8gfk0829sfeq99553yn3tuw2jx86dpkva2haqr635ldtx6u0mc3szyzxexalk77spyrt45edjvepe3z98qsqs34j7yand67nfkp2cdnrzg3w8z4s</id>
    
      <title type="html">Here is our exchange, running on custom Signet, sending orders ...</title>
    
    <link rel="alternate" href="https://njump.me/nevent1qqs8gfk0829sfeq99553yn3tuw2jx86dpkva2haqr635ldtx6u0mc3szyzxexalk77spyrt45edjvepe3z98qsqs34j7yand67nfkp2cdnrzg3w8z4s" />
    <content type="html">
      Here is our exchange, running on custom Signet, sending orders and opening perpetual futures positions backed up by offchain Bitcoin transactions. Let&amp;#39;s talk about it on Plan B Lugano, testnet.blitzperp.com.&lt;br/&gt;&lt;br/&gt; &lt;img src=&#34;https://blossom.jumble.social/a4bc0fbe2d20b1c25322cb3088f0e8526026b24b4415955a741e12f00d9f1111.png&#34;&gt; 
    </content>
    <updated>2026-10-23T12:17:52Z</updated>
  </entry>

</feed>