Skip to content

🔧 base: setup tokenized stock markets - #827

Open
patitonar wants to merge 1 commit into
mainfrom
tokenized-stocks
Open

patitonar wants to merge 1 commit into
mainfrom
tokenized-stocks

Conversation

@patitonar

@patitonar patitonar commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features
    • Added support for five stock-linked tokens on Base, including their token details and associated price feeds.
    • Added market configurations for these assets, including supply limits and reserve settings.

@patitonar
patitonar requested a review from cruzdanilo as a code owner October 22, 2026 19:12
@changeset-bot

changeset-bot Bot commented Oct 22, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: a4a7be1

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-22T19:19:30.503179Z a4a7be1 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Walkthrough

The pull request adds Base deployment data for five tokenized-stock ERC-20 contracts and their price feeds. It also adds Base market parameters for those tokens in the Hardhat configuration.

Changes

Base tokenized-stock markets

Layer / File(s) Summary
Token deployment addresses and ABIs
deployments/base/AAPLc.json, deployments/base/AMZNc.json, deployments/base/GOOGLc.json, deployments/base/METAc.json, deployments/base/NVDAc.json
Adds contract addresses and ERC-20 ABI declarations, including token methods, events, and errors.
Price-feed deployment addresses
deployments/base/PriceFeedAAPLc.json, deployments/base/PriceFeedAMZNc.json, deployments/base/PriceFeedGOOGLc.json, deployments/base/PriceFeedMETAc.json, deployments/base/PriceFeedNVDAc.json
Adds a deployment address for each stock price feed.
Base market parameters
hardhat.config.ts
Adds Base-only market settings for the five tokens. Each entry sets an adjustment factor, reserve factor of 1, zero future pools, and a token-specific maximum supply.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Possibly related issues

  • exactly/exa issue 1407 requests Base support for tokenized stocks as collateral. This pull request adds Base token and price-feed deployment data, but does not establish the issue’s collateral-only and no-borrow constraints.
Merge Risk: 🟡 Moderate · up to a4a7b

Confirm the deployer holds enough of all five tokens before merging; otherwise Base market setup can stop before a market is enabled.

Pre-merge checks: Passed 4
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly summarizes the main change: configuring tokenized stock markets on Base, including token deployments, price feeds, and market settings.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
✨ Simplify code
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a4a7be18a1

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread hardhat.config.ts
},
overrides: { base: { priceFeed: "inverse" } },
},
AAPLc: {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Configure eight-decimal mocks for the new stocks

When the default Hardhat fixture includes these markets, deploy/mocks/Assets.ts:28 does not recognize any of the five new symbols and therefore creates each mock with 18 decimals. The deployed B20 stocks are 8-decimal assets (for example, the AAPLc token contract), so local deployments use raw balances and maxSupply values scaled by an extra 1e10 and never exercise production's rounding behavior. Add AAPLc, GOOGLc, NVDAc, METAc, and AMZNc to the mock-decimals mapping.

Useful? React with 👍 / 👎.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 433dc8e5-4c70-4984-86f2-5e29abfc2394
📥 Commits

Reviewing files that changed from the base of the PR and between 13d9997 and a4a7be1.

📒 Files selected for processing: 11
  • deployments/base/AAPLc.json
  • deployments/base/AMZNc.json
  • deployments/base/GOOGLc.json
  • deployments/base/METAc.json
  • deployments/base/NVDAc.json
  • deployments/base/PriceFeedAAPLc.json
  • deployments/base/PriceFeedAMZNc.json
  • deployments/base/PriceFeedGOOGLc.json
  • deployments/base/PriceFeedMETAc.json
  • deployments/base/PriceFeedNVDAc.json
  • hardhat.config.ts

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Comment thread hardhat.config.ts
overrides: { base: { priceFeed: "inverse" } },
},
AAPLc: {
networks: ["base"],

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

🔎 Supported by static analysis

🏁 Script executed:

set -eu
echo '--- revisions ---'
git rev-parse --verify 13d99979c08697becaf7a593209d46bdd9dace00
git rev-parse --verify a4a7be18a18622ffd584c00b36f975fb7db202df
echo '--- diff name-status ---'
git diff --name-status 13d99979c08697becaf7a593209d46bdd9dace00 a4a7be18a18622ffd584c00b36f975fb7db202df
echo '--- hardhat diff/context ---'
git diff --unified=35 13d99979c08697becaf7a593209d46bdd9dace00 a4a7be18a18622ffd584c00b36f975fb7db202df -- hardhat.config.ts
echo '--- Markets.ts symbols and relevant operations ---'
rg -n -F --glob 'deploy/Markets.ts' -e 'asset.approve' -e 'deposit' -e 'getContract' -e 'getNamedAccounts' -e 'deployer' -e 'parseUnits' -e 'symbol' -e 'markets' deploy/Markets.ts || test "$?" -eq 1
echo '--- complete Markets.ts ---'
nl -ba deploy/Markets.ts
echo '--- token configuration references ---'
rg -n -F --glob '*.{ts,sol,json,md,yml,yaml}' -e 'AAPLc' -e 'GOOGLc' -e 'NVDAc' -e 'METAc' -e 'AMZNc' -e 'fund' -e 'mint' -e 'balanceOf' -e 'approve' -e 'seed' deploy scripts hardhat.config.ts package.json README.md 2>/dev/null || test "$?" -eq 1

Repository: exactly/protocol

Length of output: 26351


🏁 Script executed:

set -eu
echo '--- Market deposit implementation ---'
rg -n -F --glob 'contracts/**/*.sol' -e 'function deposit' -e 'transferFrom' -e 'contract Market' -e 'abstract contract' contracts || test "$?" -eq 1
echo '--- relevant Market and token source ---'
for f in $(rg -l -F --glob 'contracts/**/*.sol' -e 'function deposit' -e 'contract Market' contracts | head -20); do
  echo "--- $f"
  nl -ba "$f" | sed -n '1,240p'
done
echo '--- asset deployment sources ---'
rg -n -F --glob 'deploy/*.ts' -e 'AAPLc' -e 'getContract<ERC20>' -e 'deploy(' -e 'Assets' deploy || test "$?" -eq 1
if test -f deploy/Assets.ts; then nl -ba deploy/Assets.ts; fi
if test -f deploy/mocks/Assets.ts; then nl -ba deploy/mocks/Assets.ts; fi
echo '--- Base deployment records ---'
for f in deployments/base/AAPLc.json deployments/base/GOOGLc.json deployments/base/NVDAc.json deployments/base/METAc.json deployments/base/AMZNc.json; do
  echo "--- $f"
  cat "$f"
done
echo '--- funding/deployment documentation ---'
rg -n -i -F --glob '*.{md,ts,json,yml,yaml}' -e 'fund' -e 'deployer.*balance' -e 'stock token' -e 'tokenized' -e 'Base' README.md docs deploy scripts hardhat.config.ts 2>/dev/null || test "$?" -eq 1

Repository: exactly/protocol

Length of output: 42020


🏁 Script executed:

set -eu
echo '--- ERC4626 source candidates ---'
rg --files | rg '(^|/)(ERC4626|solmate).*(\\.sol)$|ERC4626\\.sol$' || true
echo '--- Market inheritance and deposit declarations ---'
nl -ba contracts/Market.sol | sed -n '1,80p'
rg -n -F --glob '*.sol' -e 'function deposit(uint256 assets' -e 'safeTransferFrom(msg.sender' -e 'transferFrom(msg.sender' contracts lib node_modules 2>/dev/null || true
echo '--- asset deployment source ---'
nl -ba deploy/Assets.ts | sed -n '1,180p'
echo '--- mock asset source ---'
nl -ba deploy/mocks/Assets.ts | sed -n '1,150p'
echo '--- Base accounts and network settings ---'
nl -ba hardhat.config.ts | sed -n '1,125p'
echo '--- exact asset deployment record headers ---'
for f in deployments/base/AAPLc.json deployments/base/GOOGLc.json deployments/base/NVDAc.json deployments/base/METAc.json deployments/base/AMZNc.json; do
  printf '%s: ' "$f"
  python3 - "$f" <<'PY'
import json, sys
with open(sys.argv[1]) as fh:
    x=json.load(fh)
print({"address": x.get("address"), "abi_names": sorted({i.get("name") for i in x.get("abi", []) if i.get("name")})})
PY
done

Repository: exactly/protocol

Length of output: 16319


🏁 Script executed:

set -eu
echo '--- solmate dependency binding ---'
rg -n -F --glob 'package.json' --glob 'package-lock.json' --glob 'npm-shrinkwrap.json' --glob 'yarn.lock' --glob 'pnpm-lock.yaml' --glob 'foundry.toml' --glob 'remappings.txt' --glob 'lib/**' -e 'solmate' -e 'ERC4626' . || test "$?" -eq 1
echo '--- repository manifests ---'
for f in package.json foundry.toml remappings.txt; do
  if test -f "$f"; then echo "--- $f"; nl -ba "$f" | sed -n '1,220p'; fi
done
echo '--- Market deposit declarations ---'
rg -n -F --glob 'contracts/Market*.sol' -e 'function deposit(' -e 'function mint(' -e 'function withdraw(' -e 'function redeem(' contracts || test "$?" -eq 1

Repository: exactly/protocol

Length of output: 7894


🌐 Web query:

transmissions11 solmate v7 ERC4626.sol deposit safeTransferFrom implementation

💡 Result:

<source_evidence>
<source kind="open_page">
<title></title>
<location>https://raw.githubusercontent.com/transmissions11/solmate/v7/src/utils/SafeTransferLib.sol</location>
<excerpt>citeturn1view1 [wordlim: 200] Crawled: today; Content type: text/plain; Source: open({&quot;ref_id&quot;:&quot;https://raw.githubusercontent.com/transmissions11/solmate/v7/src/utils/SafeTransferLib.sol&quot;,&quot;lineno&quot;:null}); Total lines: 117
L0: // SPDX-License-Identifier: MIT
L1: pragma solidity &gt;=0.8.0;
L2: 
L3: import {ERC20} from &quot;../tokens/ERC20.sol&quot;;
L4: /// @notice Safe ETH and ERC20 transfer library that gracefully handles missing return values.
L5: /// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/SafeTransferLib.sol)
L6: /// @dev Caution! This library won&#39;t check that a token has code, responsibility is delegated to the caller.
L7: library SafeTransferLib {
L8:     /*//////////////////////////////////////////////////////////////
L9:                              ETH OPERATIONS
L10:     //////////////////////////////////////////////////////////////*/
L11:     function safeTransferETH(address to, uint256 amount) internal {
L12:         bool success;
L13: 
L14:         assembly {
L15:             // Transfer the ETH and store if it succeeded or not.
L16:             success := call(gas(), to, amount, 0, 0, 0, 0)
L17:         }
L18: 
L19:         require(success, &quot;ETH_TRANSFER_FAILED&quot;);
L20:     }
L21: 
L22:     /*//////////////////////////////////////////////////////////////
L23:                             ERC20 OPERATIONS
L24:     //////////////////////////////////////////////////////////////*/
L25:     function safeTransferFrom(
L26:         ERC20 token,
L27:         address from,
L28:         address to,
L29:         uint256 amount
L30:     ) internal {
L31:         bool success;
L32: 
L33:         assembly {
L34:             // We&#39;ll write our calldata to this slot below, but restore it later.
L35:             let memPointer := mload(0x40)
L36:             // Write the abi-encoded calldata into memory, beginning with the function selector.
L37:             mstore(0, 0x23b872dd00000000000000000000000000000000000000000000000000000000)
L38:             mstore(4, and(from, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the &quot;from&quot; argument.
L39:             mstore(36, and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the &quot;to&quot; argument.
L40:             mstore(68, amount) // Append the &quot;amount&quot; argument. Masking not required as it&#39;s a full 32 byte type.
L41:             success := and(
L42:                 // Set success to whether the call reverted, if not we check it either
L43:                 // returned exactly 1 (can&#39;t just be non-zero data), or had no return data.
L44:                 or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())),
L45:                 // We use 100 because that&#39;s the total length of our calldata (4 + 32 * 3)
L46:                 // Counterintuitively, this call() must be positioned after the or() in the
L47:                 // surrounding and() because and() evaluates its arguments from right to left.
L48:                 call(gas(), token, 0, 0, 100, 0, 32)
L49:             )
L50:             mstore(0x60, 0) // Restore the zero slot to zero.
L51:             mstore(0x40, memPointer) // Restore the memPointer.
L52:         }
L53: 
L54:         require(success, &quot;TRANSFER_FROM_FAILED&quot;);
L55:     }
L56: 
L57:     function safeTransfer(
L58:         ERC20 token,
L59:         address to,
L60:         uint256 amount
L61:     ) internal {
L62:         bool success;
L63: 
L64:         assembly {
L65:             // We&#39;ll write our calldata to this slot below, but restore it later.
L66:             let memPointer := mload(0x40)
L67:             // Write the abi-encoded calldata into memory, beginning with the function selector.
L68:             mstore(0, 0xa9059cbb00000000000000000000000000000000000000000000000000000000)
L69:             mstore(4, and(to, 0xffffffffffffffffffffffffffffffffffffffff)…[truncated]</excerpt>
</source>
<source kind="search">
<title>solmate/src/tokens/ERC4626.sol at main · transmissions11/solmate · GitHub</title>
<location>https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC4626.sol</location>
<excerpt>citeturn0search0 [wordlim: 200] Crawled: 2 months ago; Copy raw file ... /// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC4626.sol)

transmissions11 / solmate Public

  * Notifications You must be signed in to change notification settings
  * Fork 706
  * Star

  * Code
  * Issues 71

# ERC4626.sol

Copy path

[Input: Go to file]

183 lines (130 loc) · 6.37 KB

Raw

Copy raw file

Download raw file


// SPDX-License-Identifier: AGPL-3.0-only

pragma solidity &gt;=0.8.0;

import {ERC20} from &quot;../tokens/ERC20.sol&quot;;

import {SafeTransferLib} from &quot;../utils/SafeTransferLib.sol&quot;;

import {FixedPointMathLib} from &quot;../utils/FixedPointMathLib.sol&quot;;

/// @notice Minimal ERC4626 tokenized Vault implementation.

/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC4626.sol)

abstract contract ERC4626 is ERC20 {

using SafeTransferLib for ERC20;

using FixedPointMathLib for uint256;

/*//////////////////////////////////////////////////////////////

EVENTS

//////////////////////////////////////////////////////////////*/

event Deposit(address indexed caller, address indexed owner, uint256 assets, uint256 shares);

event Withdraw(

address indexed caller,

address indexed receiver,

address indexed owner,

uint256 assets,

uint256 shares

);

/*//////////////////////////////////////////////////////////////

IMMUTABLES

//////////////////////////////////////////////////////////////*/

ERC20 public immutable asset;

constructor(

ERC20 _asset,

string memory _name,

string memory _symbol

) ERC20(_name, _symbol, _asset.decimals()) {

asset = _asset;

}

/*//////////////////////////////////////////////////////////////

DEPOSIT/WITHDRAWAL LOGIC

//////////////////////////////////////////////////////////////*/

function deposit(uint256 assets, address receiver) public virtual returns (uint256 shares) {

// Check for rounding error since we round down in previewDeposit.

require((shares = previewDeposit(assets)) != 0, &quot;ZERO_SHARES&quot;);

// Need to transfer before minting or ERC777s could reenter.

asset.safeTransferFrom(msg.sender, address(this), assets);

_mint(receiver, shares);

emit Deposit(msg.sender, receiver, assets, shares);

afterDeposit(assets, shares);

}

function mint(uint256 shares, address receiver) public virtual returns (uint256 assets) {

assets = previewMint(shares); // No need to check for rounding error, previewMint rounds up.

// Need to transfer before minting or ERC777s could reenter.

asset.safeTransferFrom(msg.sender, address(this), assets);

_mint(receiver, shares);

emit Deposit(msg.sender, receiver, assets, shares);

afterDeposit(assets, shares);

}

function withdraw(

uint256 assets,

address receiver,

address owner

) public virtual returns (uint256 shares) {

shares = previewWithdraw(assets); // No need to check for rounding error, previewWithdraw rounds up.

if (msg.sender != owner) {

uint256 allowed = allowance[owner][msg.sender]; // Saves gas for limited approvals.

if (allowed != type(uint256).max) allowance[owner][msg.sender] = allowed - shares;

}

beforeWithdraw(assets, shares);

_burn(owner, shares);

emit Withdraw(msg.sender, receiver, owner, assets, shares);

asset.safeTransfer(receiver, assets);
</excerpt>
</source>
<source kind="search">
<title>solmate/src/tokens/ERC4626.sol at main · transmissions11/solmate · GitHub</title>
<location>https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC4626.sol</location>
<excerpt>citeturn2search0 [wordlim: 200] Crawled: 2 months ago; /// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC4626.sol) ... ) ERC20(_name, _symbol, _asset.decimals()) { ... function deposit(uint256 assets, address receiver) public virtual returns (uint256 shares) {

transmissions11 / solmate Public

  * Notifications You must be signed in to change notification settings
  * Fork 706
  * Star

  * Code
  * Issues 71

# ERC4626.sol

Copy path

[Input: Go to file]

183 lines (130 loc) · 6.37 KB

Raw

Copy raw file

Download raw file


// SPDX-License-Identifier: AGPL-3.0-only

pragma solidity &gt;=0.8.0;

import {ERC20} from &quot;../tokens/ERC20.sol&quot;;

import {SafeTransferLib} from &quot;../utils/SafeTransferLib.sol&quot;;

import {FixedPointMathLib} from &quot;../utils/FixedPointMathLib.sol&quot;;

/// @notice Minimal ERC4626 tokenized Vault implementation.

/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC4626.sol)

abstract contract ERC4626 is ERC20 {

using SafeTransferLib for ERC20;

using FixedPointMathLib for uint256;

/*//////////////////////////////////////////////////////////////

EVENTS

//////////////////////////////////////////////////////////////*/

event Deposit(address indexed caller, address indexed owner, uint256 assets, uint256 shares);

event Withdraw(

address indexed caller,

address indexed receiver,

address indexed owner,

uint256 assets,

uint256 shares

);

/*//////////////////////////////////////////////////////////////

IMMUTABLES

//////////////////////////////////////////////////////////////*/

ERC20 public immutable asset;

constructor(

ERC20 _asset,

string memory _name,

string memory _symbol

) ERC20(_name, _symbol, _asset.decimals()) {

asset = _asset;

}

/*//////////////////////////////////////////////////////////////

DEPOSIT/WITHDRAWAL LOGIC

//////////////////////////////////////////////////////////////*/

function deposit(uint256 assets, address receiver) public virtual returns (uint256 shares) {

// Check for rounding error since we round down in previewDeposit.

require((shares = previewDeposit(assets)) != 0, &quot;ZERO_SHARES&quot;);

// Need to transfer before minting or ERC777s could reenter.

asset.safeTransferFrom(msg.sender, address(this), assets);

_mint(receiver, shares);

emit Deposit(msg.sender, receiver, assets, shares);

afterDeposit(assets, shares);

}

function mint(uint256 shares, address receiver) public virtual returns (uint256 assets) {

assets = previewMint(shares); // No need to check for rounding error, previewMint rounds up.

// Need to transfer before minting or ERC777s could reenter.

asset.safeTransferFrom(msg.sender, address(this), assets);

_mint(receiver, shares);

emit Deposit(msg.sender, receiver, assets, shares);

afterDeposit(assets, shares);

}

function withdraw(

uint256 assets,

address receiver,

address owner

) public virtual returns (uint256 shares) {

shares = previewWithdraw(assets); // No need to check for rounding error, previewWithdraw rounds up.

if (msg.sender != owner) {

uint256 allowed = allowance[owner][msg.sender]; // Saves gas for limited approvals.

if (allowed != type(uint256).max) allowance[owner][msg.sender] = allowed - shares;

}

beforeWithdraw(assets, shares);

_burn(owner, shares);

emit Withdraw(msg.sender, receiver, owner, assets, shares);

asset.safeTransfer(receiver, assets);

}

function redeem(

uint256 shares,

address receiver,

address owner

) public virtual returns (uint256 assets) {

if (msg.sender != owner) {

uint256 allowed = allowance[owner][msg.sender]; // Saves gas for limited approvals.

if (allowed != type(uint256).max) allowance[owner][msg.sender] = allowed - shares;

}

// Check for rounding error since we round down in previewRedeem.

require((assets = previewRedeem(shares)) != 0, &quot;ZERO_ASSETS&quot;);

beforeWithdraw(assets, shares);

_burn(owner, shares);

emit Withdraw(msg.sender, receiver, owner, assets,…[truncated]</excerpt>
</source>
<source kind="search">
<title>solmate/src/utils/SafeTransferLib.sol at main · transmissions11/solmate · GitHub</title>
<location>https://github.com/transmissions11/solmate/blob/main/src/utils/SafeTransferLib.sol</location>
<excerpt>citeturn0search1 [wordlim: 200] Crawled: 2 months ago; transmissions11 / solmate Public ... ## Files Expand file tree ... import {ERC20} from &quot;../tokens/ERC20.sol&quot;; ... /// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/SafeTransferLib.sol) ... // returned exactly 1 (can&#39;t just be non-zero data), or had no return data and token has code.
</excerpt>
</source>
<source kind="search">
<title>GitHub - transmissions11/solmate: Modern, opinionated, and gas optimized building blocks for smart contract development. · GitHub</title>
<location>https://github.com/transmissions11/solmate</location>
<excerpt>citeturn0search2 [wordlim: 200] Crawled: 2 months ago;     ├─ WETH — &quot;Minimalist and modern Wrapped Ether implementation&quot; ...     ├─ ERC4626 — &quot;Minimal ERC4626 tokenized Vault implementation&quot; ...     ├─ SafeTransferLib — &quot;Safe ERC20/ETH transfer lib that handles missing return values&quot; ...     forge install transmissions11/solmate ...   * Dappsys V2
</excerpt>
</source>
<omitted_sources count="39">Additional source records were omitted from this bounded result.</omitted_sources>
</source_evidence>

Citations:

- 1: https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC4626.sol?utm_source=openai
- 2: https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC4626.sol?utm_source=openai

Verify deployer funding before enabling the five markets.

When live is true and a new market has zero supply, a Base deployer balance below the computed seed amount can make market.deposit fail. Deployment then stops before that market is enabled. Confirm that the deployer holds enough of each token, or add a funding step to the deployment procedure.

@codecov

codecov Bot commented Oct 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.82%. Comparing base (13d9997) to head (a4a7be1).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #827   +/-   ##
=======================================
  Coverage   94.82%   94.82%           
=======================================
  Files          32       32           
  Lines        2742     2742           
  Branches      366      366           
=======================================
  Hits         2600     2600           
  Misses        141      141           
  Partials        1        1           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant