Skip to content
View GushALKDev's full-sized avatar

Block or report GushALKDev

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Maximum 250 characters. Please don’t include any personal information such as legal names or email addresses. Markdown is supported. This note will only be visible to you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
GushALKDev/README.md

Hi there, I'm Gustavo Martín 👋

Senior Smart Contract Engineer | Protocol Architect | Security Researcher

Linkedin

"Critical systems cannot fail." From engineering SCADA controls for particle accelerators at CERN to architecting complex DeFi protocols. I specialize in building zero-to-one financial infrastructure, gas-optimized state machines (O(1)), and securing smart contracts through invariant testing and formal verification.


🛠️ Tech Stack & Tools

Solidity Foundry Rust/Anchor TypeScript NodeJS NestJS Go


🚀 Featured Engineering & Architecture

🏦 Money Market - Lending / Borrowing Protocol (In progress...)

An isolated, single-base money market on EVM, architecturally inspired by Compound III (Comet), built from scratch around a provable-solvency thesis. View Repository

  • Provable Solvency by Construction: Index-based accounting (a signed int104 principal times a global supply/borrow index) where every conversion rounds toward the protocol, supply present value floors and borrow principal ceils, so the sum of balances can never exceed backing. Enforced by a stateful invariant suite: the accounting identity, exact principal-to-totals equality, and directed-rounding invariants.
  • Single Accounting Path: Every base movement (supply, withdraw, borrow, repay, absorb settlement) routes through one internal mutator across the positive/negative sign crossing, so reward accounting can never drift from balance accounting. Borrowing is simply a withdrawal taken past zero on a signed balance, no separate debt token.
  • Isolated, Single-Base Design: One borrowable base asset (USDC) with supply-only collateral that is never rehypothecated, containing collateral risk to the market instead of a shared pool. Separate borrow and liquidation collateral factors give every position a price buffer before it becomes liquidatable.
  • Derived Supply Rate (ADR): A deliberate divergence from Comet's two independent curves: the supply rate is derived from the borrow curve (borrowRate * U * (1 - reserveFactor)), making the borrower-interest / supplier-interest / reserve split exact by construction under directed rounding, rather than relying on two hand-tuned curves.
  • Absorb Liquidation with Explicit Bad Debt: Comet-style two-step liquidation. The protocol absorbs an underwater account against reserves in one permissionless call, seizing collateral at a liquidationFactor penalty and crediting any surplus back to the borrower as base supply, then sells the seized collateral to liquidators at a store-front discount. Uncovered debt is recognized as negative reserves, not left as dust.
  • Confidence-Aware Oracle: Pyth pull as the primary source with a Chainlink deviation anchor plus staleness and confidence checks. Borrow capacity is valued at price - conf and absorb eligibility at price + conf, so wide-uncertainty periods tighten borrowing and harden liquidation instead of trusting a single point estimate.
  • Tech: Solidity 0.8.26, Foundry, OpenZeppelin v5, Solady, Pyth, Chainlink. Invariant, fuzz, and fork tested.

🏦 Institutional RWA Tokenization (In progress...)

A permissioned security token for a real-estate-backed note, implementing the ERC-3643 identity and compliance model from scratch. View Repository

  • Compliance as Architecture: Every transfer is gated by an identity check and a pluggable rule engine. Inverts the ERC-20 default: transfers are forbidden unless identity and compliance approve, not permitted unless the balance is short.
  • Dual Trust Model (EIP-712): Two identity registration paths, an agent-written record and a signed attestation verified on-chain against an authorized claim signer. The signed payload binds investor, attributes, expiry and a per-user nonce under a domain separator, closing replay across chains, after KYC lapse, and within the validity window.
  • Modular Compliance Engine: Rules (max holders maintained incrementally in O(1), country restrictions, per-investor lockups) plug into a composable engine, so the rule set changes by governance action rather than by redeploying the token.
  • Institutional Custody: Custodian-gated forced recovery moves a position from a lost or compromised wallet to a new verified one, carrying the full freeze state across so recovery cannot launder a freeze, and preserving total supply.
  • On-Chain / Off-Chain Boundary: Legal documents anchored by keccak256 of the content, not the URI (ERC-1643), so a silent amendment to the terms is evident on-chain.
  • Tech: Solidity 0.8.24, Foundry, OpenZeppelin v5, EIP-712, ERC-3643 (T-REX) subset, ERC-1643.

📈 Synthetic Trading Protocol

A high-leverage synthetic futures platform utilizing a Single-Sided Liquidity (SSL) Unified Vault and a 3-layer solvent defense system. View Repository

  • Single-Sided Liquidity (SSL): Unified USDC Vault acting as the global counterparty (PvPool model: Traders vs LPs), eliminating liquidity fragmentation across trading pairs.
  • Hybrid Solvency Engine: A 3-layer defense system featuring Preventive (Adaptive OI based on Volatility), Reactive (Assistant Fund injection), and ($SYNTH Bonding) mechanisms.
  • Oracle Aggregation (DON): Custom Decentralized Oracle Network aggregating prices from 6-8 nodes (median filtering) with Chainlink validation to prevent price manipulation.
  • Oracle-Based Execution: Enables large size trades at oracle price, utilizing dynamic spreads (based on OI and Volatility) to simulate market depth and protect LPs.
  • Tech: Solidity, Foundry, ERC-4626, Chainlink Oracles, Custom DON (Decentralized Oracle Network), Solady.

🛡️ Yield Bearing Vaults Protocol

A modular ERC-4626 production-grade architecture decoupling vault accounting from yield strategies. View Repository

  • Modular Architecture: Decoupled Vault/Strategy pattern enabling atomic pass-through deposits; funds route instantly (User → Vault → Strategy → Protocol) in a single transaction.
  • Leveraged Loop: Engineered an atomic Uniswap V4 Flash Loan (zero fee) & Aave V3 E-Mode strategy to cycle liquidity, maximizing LTV (up to 93%) and capturing yield spread with up to 10x leverage. Proportional deleverage maintains leverage ratio on withdrawals.
  • Automatic Health Monitoring: Continuous position health checks with automatic emergency divest when health factor drops below threshold, preventing liquidations while maintaining user fund access.
  • Emergency Recovery: Seamless automatic reinvestment when emergency mode is deactivated, restoring leveraged positions without manual intervention.
  • Defensive Security: Implemented critical protections including Emergency Circuit Breakers, Reentrancy Guards, Inflation Attack Prevention (Dead Shares), Optimized Withdrawals (skip divest during emergency), and access-controlled emergency activation.
  • Financial Integrity: Enforced High Water Mark accounting to align fees with net performance.
  • Gas Optimizations: Storage packing (~40k gas deployment savings), computation caching (~250-400 gas per flash loan), batch whitelist operations (~21k gas per additional address), and unchecked math where safe.
  • Testing & Coverage: 205 tests achieving 93.72% coverage with 352,608+ total iterations. Includes 27 stateful fuzzing invariant tests using the handler pattern (BaseVaultHandler, WETHLoopStrategyHandler, AdminHandler) with ghost variable tracking. Supports dual-mode execution: mock mode (345,600 operations, 256 runs × 50 depth) for fast iteration, and fork mode (real Aave V3 + Uniswap V4) for protocol validation.
  • Tech: Solidity 0.8.26, Foundry, ERC-4626, Aave V3, Uniswap V4, OpenZeppelin.

🔮 Prediction Market Protocol (Private R&D)

An advanced decentralized prediction market architected from scratch focusing on capital efficiency and atomic execution.

  • Virtual CPMM Math: Engineered a custom Virtual Liquidity AMM to prevent liquidity draining and ensure continuous price discovery (soft bounds).
  • Mechanism Design: Implements an "Entry Toll" fee model (High Entry / Zero Exit) to maximize revenue while incentivizing arbitrage rebalancing.
  • Architecture: Decoupled trading logic from custody (Gnosis CTF), implementing an Atomic Router for 1-click swaps and quadratic exit calculations.
  • Security & Ops: Features Inflation Attack Protection (dead shares), CREATE2 deterministic deployment, and rigorous invariant testing.
  • Tech: Solidity, Foundry, Gnosis Conditional Tokens, OpenZeppelin.

🏛️ Multi-Level Real Yield Staking (O(1) Algorithm)

A hardened staking contract designed to solve linear gas scaling issues in reward distribution. View Repository

  • The Breakthrough: Replaced legacy loop-based reward logic with an "O(1) accumulator model".
  • Impact: Achieved ~97% gas reduction for claiming rewards, ensuring constant-time execution regardless of staker count.
  • Features: Lock-up levels, Real Yield distribution, and emergency withdraw mechanics.

🌌 Pulsar DAO (Solana/Rust)

Redefining governance on Solana to combat voter apathy and whale dominance. View Repository

  • Architecture: Implements a novel Hybrid Voting model with Proxy Lock security and Trustless Treasury execution.
  • Stack: Built purely in Rust using the Anchor framework.

🤖 GMX V2 AI Agent

Bridging the gap between Natural Language Processing (NLP) and DeFi execution. View Repository

  • Functionality: An AI-powered conversational bot capable of executing complex trades on GMX V2 (Arbitrum) via Telegram commands.
  • Tech: Node.js, TypeScript, OpenAI API, Ethers.js.

🛡️ Security Research & Auditing

My development philosophy is "Audit-Ready by Default." I actively conduct security reviews and practice advanced testing methodologies.

Protocol Type Focus Area Tools Used
Vault Guardians ERC-4626 Compliance & Access Control Foundry, Fuzzing
Thunder Loan Flash Loans & Oracle Manipulation Manual Review, Slither
Boss Bridge L1<->L2 Message Passing & Signature Replay Stateless Fuzzing
TSwap AMM Invariant Analysis (k=x*y) Invariant Testing

🏗️ Backend & Infrastructure

Beyond smart contracts, I architect the off-chain nervous system that powers DeFi protocols.

  • EIP-712 Verification: Secure off-chain signature verification system for gasless interactions.
  • NestJS Teslo Shop: Full-scale e-commerce backend demonstrating robust architectural patterns (Modules, Guards, Interceptors).
  • Go Events API: High-performance REST API built with Go and Gin.

💻 Tech Stack Distribution

languages graph


"Talk is cheap. Show me the code." — Linus Torvalds

Pinned Loading

  1. evm-yield-bearing-vaults evm-yield-bearing-vaults Public

    A modular ERC-4626 production-grade architecture decoupling atomic vault accounting from yield leveraged strategies with automated risk management, emergency safeguards, High Water Mark performance…

    Solidity

  2. evm-dexynth-multilevel-real-yield-staking evm-dexynth-multilevel-real-yield-staking Public

    Hardened & Secure Multi-Level Staking Smart Contract designed to distribute Real Yield in the form of Reward Tokens. Users stake their DEXY tokens and choose a lock-up period (level), which determi…

    Solidity

  3. audit-evm-vault-guardians audit-evm-vault-guardians Public

    Security review of Vault Guardians Protocol. This protocol allows users to deposit certain ERC20s into an ERC4626 vault managed a vaultGuardian.

    Solidity

  4. huff-yul-horse-store huff-yul-horse-store Public

    Basic simplestorage/horse store for Huff & OPCODES training

    C++

  5. solana_pulsar_dao solana_pulsar_dao Public

    Pulsar DAO redefines governance on Solana by combating voter apathy and whale dominance. We implement a novel Hybrid Voting model with Proxy Lock security, Trustless Treasury execution, and on-chai…

    JavaScript

  6. gmx-v2-ai-agent gmx-v2-ai-agent Public

    🤖 AI-powered conversational trading agent for GMX v2 protocol on Arbitrum mainnet. Execute complex trades using natural language commands via Telegram bot, powered by Node.js, TypeScript, and ChatGPT.

    TypeScript 1