Skip to content

Instantly share code, notes, and snippets.

View lucas-manuel's full-sized avatar

Lucas Manuel lucas-manuel

View GitHub Profile
@lucas-manuel
lucas-manuel / spark-spell-20261022-reviewer-checklist.md
Last active October 16, 2026 13:19
Spark Spell 2026-10-22 - Reviewer Checklist

Spark Spell 2026-10-22 - Reviewer Checklist

Good to deploy

Development Stage

Preparation

  • Spell branch is up to date with the latest base branch (i.e. git rev-list --count origin/<SPELL_BRANCH>..origin/<BASE_BRANCH> prints 0 after git fetch). - git rev-list --count origin/feat/sc-1744-spell-20261022..origin/master prints 0.
  • LIST every commit on the base branch since the last externally reviewed spell (i.e. git log <PREVIOUS_SPELL_LAST_REVIEWED_COMMIT>..origin/<BASE_BRANCH>): - git log 0ae6c69..origin/master (2026-10-08 spell, #204)
  • feat: Add removeExcessLiquidity test (#205), #205
@lucas-manuel
lucas-manuel / vault.sol
Last active October 8, 2026 02:07
Spark Prime Vault
// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity ^0.8.25;
import { ERC1967Utils } from "openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Utils.sol";
import { IERC4626 } from "openzeppelin-contracts/contracts/interfaces/IERC4626.sol";
import { SafeERC20 } from "openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol";
import { IERC20 } from "openzeppelin-contracts/contracts/token/ERC20/IERC20.sol";
import { IERC20Metadata } from "openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Metadata.sol";
import { AccessControlEnumerableUpgradeable }

Spark Spell 2026-10-08 - Reviewer Checklist

Good to Handover

Development Stage

Preparation

  • LIST every commit since the last externally reviewed spell:
@lucas-manuel
lucas-manuel / sparklend-rounding-release-security-notes.md
Created September 3, 2026 00:48
SparkLend Rounding Release — Security Notes (dev @ 900c189f, diff base v1.0.0)

SparkLend Rounding Release — Security Notes

Design summary, known issues, and deployment constraints for the SparkLend rounding release. Prepared by Phoenix Labs as supplemental material for the release and its external audit. Version of 2026-09-02.

Scope

  • Repository: sparkdotfi/sparklend-v1-core
  • Release candidate: branch dev, commit 900c189f
  • Diff base: tag v1.0.0, commit 8120e495 (the code deployed behind the live proxies)
@lucas-manuel
lucas-manuel / diamond-pau-spark-upgrade.md
Last active August 26, 2026 07:25
Diamond PAU Spark Upgrade

Onboarding the Diamond PAU Controller alongside the existing ALM Controller

Proposal

Spark proposes onboarding the Diamond PAU Controller on Ethereum mainnet in parallel with the existing MainnetController. Both controllers operate the same ALMProxy. The new controller receives its own dedicated RateLimits instance and is wired with exactly three integrations: UNISWAP_V4_FACET (swaps and LPing), CCTP_FACET (CCTP v2 transfers), and DUAL_POOL_FACET (LPing through the DualPoolHook).

  1. No funds are migrated. The custody contract keeps its bytecode, storage, approvals, and positions.
  2. The legacy MainnetController is completely untouched, so the upgrade is fully backwards compatible.
  3. The new controller can execute exactly seven value-moving operations — swap, mintPosition, increasePosition, decreasePosition (UniV4), transfer (CCTP), deposit, withdraw (DualPool). Every other call reverts.
  4. The new controller's rate limits are a separate instance, so it is i

Prime Agent Spells Reviewer Checklist

Spell: feat/sc-1573-spell-20260716 Reviewed at commit: 32d0504c18115873369eaf1028abc0ce90a9df3f Stage: Review Stage


Development Stage

Prime Agent Spells Reviewer Checklist

Spell: feat: Spell 2026-07-02 (SC-1557) Reviewed at commit: f4f79f45934fa0626aa984c3ed564d908876d982 Stage: Review Stage


Development Stage

coverage_report:
name: Generate coverage report
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Foundry
uses: onbjerg/foundry-toolchain@v1
with:
version: nightly
@lucas-manuel
lucas-manuel / style-guide.md
Created June 11, 2022 14:05
Solidity Style Guide

Top of File

All files should have a license and pragma defined in the top two lines of the file:

// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity 0.6.11;

Contract Imports

  1. All imports must be explicit, importing only what is necessary from each file.
@lucas-manuel
lucas-manuel / xMPL.sol
Created May 24, 2022 15:26
Flattened xMPL
// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity 0.8.7;
/// @title Interface of the ERC20 standard as defined in the EIP, including EIP-2612 permit functionality.
interface IERC20 {
/**************/
/*** Events ***/
/**************/