Skip to content
View MilosMicun's full-sized avatar

Block or report MilosMicun

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
MilosMicun/README.md

Milos Mirkovic

Solidity / DeFi Protocol Engineer

Focused on DeFi protocol design, smart contract architecture, protocol accounting, security, and adversarial testing with Foundry.

I build protocol-level systems where correctness depends on the interaction between math, state, permissions, and time.


Featured Projects

RWA Invoice Financing Protocol

A Solidity protocol for financing tokenized receivables through senior / junior liquidity tranches.

Built as an end-to-end protocol engineering project covering architecture, implementation, economic accounting, adversarial testing, security review, deployment, and live execution.

Engineering highlights

  • explicit invoice lifecycle: CREATED → VERIFIED → FUNDED → SETTLED / DEFAULTED
  • senior / junior tranche funding and accounting
  • risk-based advance rates and Buyer exposure controls
  • oracle-driven settlement and default lifecycle with a real dispute window
  • Junior-first loss absorption
  • reserved default impairment through pendingLoss
  • no second NAV haircut when a reserved default loss is realized
  • role-separated origination, verification, risk, oracle, and execution permissions
  • stored-term settlement rather than recomputing historical financing economics
  • fuzz testing and stateful invariant testing
  • independent ghost accounting for invariant verification
  • external review remediation and protocol-accounting hardening

Validation

  • 229 / 229 tests passing
  • 12 stateful invariants passing
  • deployed and verified on Ethereum Sepolia
  • completed live end-to-end settlement and default scenarios
  • public transaction evidence and final accounting inspection

Repository · Live Demo · Deployment


Lending Protocol Engine

A minimal Solidity lending protocol focused on the core mechanics and accounting of collateralized DeFi lending.

Engineering focus

  • collateral deposits and withdrawals
  • collateralized borrowing and repayment
  • oracle-based collateral valuation
  • health-factor and solvency checks
  • interest and debt accounting
  • liquidation mechanics
  • failure-path and edge-case testing
  • fuzz and invariant-based verification

The project explores the primitives underlying larger lending systems while keeping the architecture small enough to reason about protocol behavior and accounting explicitly.

Repository


Protocol Engineering Focus

Solidity · Foundry · EVM · DeFi · Protocol Accounting · Lending · ERC-4626 · Oracle Systems · Liquidations · Access Control · Fuzz Testing · Stateful Invariants · Smart Contract Security

My approach is to treat smart contracts as more than isolated functions.

They are simultaneously:

  • state machines — transitions must remain valid across the full lifecycle
  • accounting systems — assets, debt, liquidity, losses, and exposure must reconcile
  • permission systems — authority and trust boundaries must be explicit
  • adversarial environments — correctness must survive unexpected execution sequences

The goal is not only to prove that individual transactions succeed, but that protocol state and accounting remain correct across valid and adversarial execution paths.


Engineering principle

math + state + time

Pinned Loading

  1. rwa-invoice-financing rwa-invoice-financing Public

    RWA invoice financing protocol with ERC-4626 senior/junior vaults, NFT-based receivables, oracle-driven settlement, waterfall accounting, and stateful invariant testing.

    Solidity 1

  2. lending-protocol-engine lending-protocol-engine Public

    Modular DeFi lending protocol with ERC4626 vaults, indexed debt accounting, liquidation mechanics, oracle safety, and invariant-tested solvency.

    Solidity

  3. defi-lending-primitives defi-lending-primitives Public

    Building core components of a DeFi lending protocol: oracles, AMM pricing, interest rate models, and liquidation mechanics.

    Solidity

  4. solidity-security-patterns solidity-security-patterns Public

    Smart contract security patterns: exploit → fix → invariant, with Foundry tests and gas analysis.

    Solidity

  5. foundry-testing-patterns foundry-testing-patterns Public

    Solidity smart contract testing patterns using Foundry: unit, integration, fork, fuzz and invariant testing.

    Solidity

  6. evm-simulator-js evm-simulator-js Public

    A minimal EVM simulator in JavaScript implementing stack, memory, storage and opcode execution to explore Ethereum Virtual Machine internals at the instruction level.

    JavaScript 1