Skip to content

Instantly share code, notes, and snippets.

View jonaprieto's full-sized avatar

Jonathan Cubides jonaprieto

View GitHub Profile
@jonaprieto
jonaprieto / deployments-summary.md
Last active March 4, 2026 17:14
Anoma PA & ERC20 Forwarder Deployment History
@jonaprieto
jonaprieto / anoma-envio-audit.md
Created February 28, 2026 02:50
Audit report for anoma-envio indexer (2026-02-27)

Audit Report: anoma-envio Indexer

Date: 2026-02-27 Scope: Full codebase — EventHandlers.ts, schema.graphql, decoders, config, tests Commit: a8e7aef (branch: next)

1. Architecture Overview

Envio HyperIndex indexer for the Anoma Protocol Adapter (PA-EVM) contracts. Indexes 11 on-chain events across 5 chains (Mainnet, Arbitrum, Base, Optimism, Sepolia) into a GraphQL API with 14 entity types. Core logic is ~960 lines in EventHandlers.ts plus ~440 lines of decoders.

@jonaprieto
jonaprieto / anoma-evm-smart-contracts.md
Created February 25, 2026 05:42
Anoma EVM Smart Contracts: PA-EVM & AnomaPay ERC20 Forwarder overview

Anoma EVM Smart Contracts

An overview of the Protocol Adapter (PA-EVM) and AnomaPay ERC20 Forwarder smart contracts.


What is the Protocol Adapter?

The PA-EVM is a Solidity smart contract that settles Anoma Resource Machine transactions on EVM-compatible chains.

@jonaprieto
jonaprieto / bnb-deploy-notes.md
Last active February 24, 2026 14:39
Deploying RISC Zero Verifier + Protocol Adapter to BNB Smart Chain

Deploying RISC Zero Verifier + Protocol Adapter to BNB Smart Chain

Notes on deploying the Anoma Protocol Adapter (pa-evm) to BNB Smart Chain. This is a living doc — updated as we go.

Things to keep in mind

EVM version: osaka vs cancun

The pa-evm project targets evm_version = "osaka" in its Solidity compiler settings (Solidity 0.8.33). Osaka (also referred to as Fusaka in some contexts) is the upcoming Ethereum upgrade — not yet live on Ethereum mainnet, let alone other chains.

@jonaprieto
jonaprieto / properties_review.md
Created February 19, 2026 01:54
Formal methods review: properties soundness audit

A) Properties Verdict: Unsound.
The \section{Properties} claims do not align with the Lean formalization on key assumptions (notably type preservation and progress), and the Lean liveness theorem (eventualDelivery) is not semantically tied to actual transition steps. There are also logic-mode inconsistencies (constructive vs classical) and rule-faithfulness mismatches (notably payload wrapping/mediation).

B) Properties Findings (severity-ordered)

Extracted claims and Lean mapping:

  1. Well-typedness implies “no orphaned messages” and spawn pairing (main.tex:2043, main.tex:2048) → spawnPairing exists (formalization/MailboxActors/MailboxActors/System/WellTyped.lean:59), but no Lean theorem for no-orphaned-messages.
  2. Proposition Type Preservation (main.tex:2051) → typePreservation (formalization/MailboxActors/MailboxActors/Properties/TypePreservation.lean:18).
  3. Proposition Progress (main.tex:2079) → progress (`formalization/MailboxActors/MailboxActors/Properties/Progress.
@jonaprieto
jonaprieto / swap-variant-current.md
Created February 16, 2026 14:39
Swap Settlement: Current Implementation (two-party signing, server-orchestrated)

Swap Settlement: Current Implementation

Variant: Two-party signing, server-orchestrated single action

Diagram

sequenceDiagram
    participant M as Maker
    participant S as Server

End-to-End ERC20 Wrap & Swap on Sepolia

This tutorial walks through wrapping ERC20 tokens into Anoma shielded resources and executing an atomic swap between two parties — all on Ethereum Sepolia testnet with ZK proofs generated remotely via RISC Zero Bonsai.

Overview

The flow has four steps:

@jonaprieto
jonaprieto / intent-swap-diagrams.md
Created February 5, 2026 15:58
AnomaPay Intent-Based Swap: Sequence Diagrams

AnomaPay Intent-Based Swap: Sequence Diagrams

1. Maker-Taker Flow (New Design)

sequenceDiagram
    participant Alice as Alice (Maker)
    participant Server as AnomaPay Server
    participant Pool as Intent Pool
    participant Bob as Bob (Taker)

Hello there!

@jonaprieto
jonaprieto / keybindings.jsonc
Last active June 14, 2023 22:39
Dance config for vscode
[
{
"key": "ctrl+g",
"command": "dance.modes.set.normal",
"args" : {
"mode": ""
},
"when": "(editorTextFocus) && (dance.mode == 'normal' || dance.mode == 'insert' || dance.mode == 'insert' || dance.mode == 'window' || dance.mode == 'view' || dance.mode == 'file' || dance.mode == 'project')",
},
// ===========================================================================