Skip to content

Everyield — chain-abstracted savings on Lattice diamonds (UXMAXX) - #1

Merged
dadadave80 merged 43 commits into
mainfrom
feat/everyield-build
Jul 20, 2026
Merged

Everyield — chain-abstracted savings on Lattice diamonds (UXMAXX)#1
dadadave80 merged 43 commits into
mainfrom
feat/everyield-build

Conversation

@dadadave80

Copy link
Copy Markdown
Owner

Full build: three Lattice v0.2.0 diamonds live on Arbitrum One (vault 0x4aE34A2fA9efD143C0330c306dDF8808eE34815D), Particle UA SDK 2.0.3 in EIP-7702 mode, Next 16 app (prod: https://everyield.vercel.app, pitch at /pitch), keeper Makefile, CI green (contracts + frontend), docs (README/DEMO/SUBMISSION/SECURITY).

Live-proven with real funds on 2026-07-20: cross-chain USDC deposits Base→Arbitrum, 80/20 Aave crank, recall, partial withdrawals — every number verifiable against the vault address.

Any commits landing on the branch after this PR opens (in-flight: deposit fee-headroom + insufficient-fee messaging fix) flow into it automatically.

- Pin the partial-redeem amount (step 4) to the exact idle-only price
  (2e6 +/-1) so a future change to lattice's share math trips the test
  instead of a bare assertGt(got, 0).
- Tighten the final-exit floor to assertGe(balance, 100e6): no
  principal loss allowed, not "loss capped at 1e6".
- Drop the unused convertToAssets member from the local IERC4626Like
  interface.
Add buildAdapterCuts(admin, vault, asset, provider) and an internal
_deployAll(admin, asset, provider) so the recipe can target a testnet
USDC/Aave-provider pair via the new runCustom entry point, while
deployAll(admin)/run and the 2-arg buildAdapterCuts overload keep
delegating to the mainnet constants unchanged.
…and assembly

- Bump lib/lattice submodule v0.1.0 -> v0.2.0 (nested diamond-lib -> v0.3.0)
- foundry.lock: pin lib/lattice to v0.2.0 via 'forge update dadadave80/lattice@v0.2.0'
- EveryieldAaveInit: drop ReentrancyGuardLib.__ReentrancyGuard_init() + import
  (v0.2.0 transient ReentrancyGuard is init-free — Solady logic, mixin modifiers)
- test/DeployEveryield.t.sol + test/EveryieldFork.t.sol: assemble via LatticeDiamond
  (@lattice/LatticeDiamond.sol) instead of @diamond/Diamond.sol, matching BaseDeploy._assemble
- EveryieldCrank + DeployEveryield script recompile unchanged (import paths intact)
Add app/lib/everyield.ts (createDepositTx/createWithdrawTx via the UA SDK's
createUniversalTransaction, readPosition/readApy for full-NAV on-chain reads)
and app/lib/addresses.ts with the live Arbitrum mainnet deployment addresses.

Also: widen the missing-keys gate in app/app/layout.tsx to require all five
NEXT_PUBLIC_* env vars (Privy + Particle), not just the two Privy ones, so a
partially-configured env can no longer reach the unguarded `!` reads in
page.tsx's UniversalAccount init; and fix two latent tsconfig issues that
this task's code newly exercises: bump target to ES2020 (BigInt literals need
it) and swap the SDK's `paths` alias from a raw .d.ts (broke bun's runtime
resolution) to a small re-export shim (types for tsc/next build, real module
for bun test).
React 19.1.0 -> 19.2.7, lucide-react 0.x -> 1.25.0, eslint 9 -> 10.7.0,
@types/node aligned to the Node 24 runtime in use. TypeScript 7.0.2 was
attempted and reverted: it hangs next build's TypeScript setup step
under Next 16.2.10, so typescript stays pinned to ^5.9.3.

@particle-network/universal-account-sdk and @privy-io/react-auth are
left untouched per prior decisions (2.x SDK drops a field page.tsx
relies on; the Privy major is unverified against the 7702 hooks this
app depends on).
Max on SaveCard now reserves FEE_HEADROOM_USD ($0.50, ~3x the observed
$0.14 fee) so depositing everything never leaves zero runway for the
next transaction's own network fee. Preview/confirm failures across
SaveCard and PositionCard are classified via classifyQuoteError — the
SDK's "insufficient balance for gas fees" rejection now surfaces
honest, specific copy instead of the generic "adjust the amount" text,
which was misleading since the amount was never the problem.
@dadadave80
dadadave80 merged commit 512a7fc into main Jul 20, 2026
3 checks passed
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