antoncoding / antoncoding/monarch

Clarify UX for auto-detected ERC4626 vaults when the mint path is blocked

Open
#470 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
22
Forks
4
Avg merge
1h 36m
Merged PRs (30d)
11

Description

Summary

Users trying to loop the sUSDF/USDF market can hit an opaque estimateGas failure because the UI auto-detects the vault as ERC4626 and defaults to ERC4626 mode, even when that flow is effectively unusable for this vault.

In practice, users need to switch to swap mode manually, but the current UI does not make that obvious.

User impact

  • User sees a raw estimateGas / custom error revert instead of actionable guidance
  • UI appears broken even though another valid path exists
  • This is especially confusing for auto-detected 4626 vaults that are permissioned / blocked / otherwise not mintable through the expected ERC4626 flow

Example report

  • Market: https://www.monarchlend.xyz/market/1/0xe8c9d076ee7e6fcadd34165c44c08fe61533e7ab4accbed76d7e7f7d5a011708
  • Wallet: 0x8467241838Bc761D9Ef4F8ae6790Ede292fbA2F9
  • Symptom: transaction fails during gas estimation with an unknown custom error while trying to loop sUSDF/USDF

Suspected cause

The frontend auto-selects ERC4626 mode after detecting the vault standard, but this particular asset appears to require using swap mode instead (for example because minting is restricted / whitelist-gated / otherwise blocked in the ERC4626 path).

Expected behavior

When Monarch detects an ERC4626 vault whose mint/deposit path is not actually usable, the UI should not silently default users into a failing route.

Proposed improvements

  • Detect when the ERC4626 path is unavailable / reverting and avoid auto-selecting it
  • Or show a clear inline warning / fallback message telling users to use swap mode
  • Replace raw estimateGas errors with a human-readable explanation
  • Consider disabling or annotating auto-detected 4626 vault modes when they are blocked in practice

Acceptance criteria

  • Users no longer see an unexplained estimateGas error for this flow
  • The interface makes it clear when swap mode is required
  • Auto-detected vault modes do not look supported when they are not actually usable

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the reported flow using the linked market URL and inspect the frontend entry points for ERC4626 auto-detection, mode selection, and gas-estimation errors. Determine how the sUSDF/USDF flow behaves when the ERC4626 mint path is blocked. Done means the UI avoids presenting an unusable ERC4626 route, clearly directs users to swap mode, and replaces the unexplained error with actionable guidance.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.