Skip to content

feat(vibenet): v3 Validity UI — buy/sell exactly 100 VIBE (exact-in/out) - #149

Merged
BrianBland merged 1 commit into
mainfrom
brianbland/vibenet-validity-v3-exact-buy-sell
Sep 3, 2026
Merged

feat(vibenet): v3 Validity UI — buy/sell exactly 100 VIBE (exact-in/out)#149
BrianBland merged 1 commit into
mainfrom
brianbland/vibenet-validity-v3-exact-buy-sell

Conversation

@BrianBland

Copy link
Copy Markdown
Contributor

Companion to base/vibenet#42. Targets the fresh v3 0-fee pool and makes both sides of the demo trade exactly 100 VIBE.

What

  • placeOrder: sell = swapExactIn (put in 100 VIBE, take ≥ the limit USDV); buy = swapExactOut (take exactly 100 VIBE, spend ≤ the limit USDV, with a 0.1%+1wei cap headroom for rounding). The helper computes the variable leg on-chain, so neither side leaves a surplus in the pool.
  • Hardcode the deterministic v3 singleton addresses (factory/helper/minter). ABIs are minimal parseAbi fragments (swapExactIn + swapExactOut), so the client no longer bundles contract deploy bytecode. VIBE + the pair are still discovered from the factory.
  • Bump the localStorage key v6 → v7 so stale orders against the old pool don't linger after the swap.

Heads-up: supersedes #148

Only vibenet's v2 (#39) merged; the v2 UI PR (#148) never did, so main was still the v1 demo (v1 salt, exact-out, predictSingleton) while vibenet moved to v2 — a mismatch. This PR goes straight v1 → v3 and supersedes #148 (please close it). Merge this together with base/vibenet#42.

Verified

  • tsc 0, eslint 0 errors (pre-existing warnings only), 63/63 validity tests.
  • No client imports of the contract bytecode. SwapHelper.json is retained only as input to base/vibenet's manifest generator.

Pairs with base/vibenet#42 — the hardcoded addresses must match the v3 salt + helper bytecode there.

@cb-heimdall

cb-heimdall commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

✅ Heimdall Review Status

Requirement Status More Info
Reviews 1/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

@vercel

vercel Bot commented Sep 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
omni-ui Ready Ready Preview Sep 3, 2026 8:12pm UTC

Request Review

mbeutt-cb
mbeutt-cb previously approved these changes Sep 3, 2026
haardikk21
haardikk21 previously approved these changes Sep 3, 2026
…ct-in/out helper

Targets the fresh v3 0-fee pool and makes both sides trade exactly 100 VIBE:
- placeOrder: sell = swapExactIn (put in 100 VIBE, take >= the limit USDV);
  buy = swapExactOut (take exactly 100 VIBE, spend <= the limit USDV). The
  helper computes the variable leg on-chain, so neither donates to the pool.
- Hardcode the deterministic v3 singleton addresses (factory/helper/minter);
  ABIs are minimal parseAbi fragments (swapExactIn + swapExactOut), so the
  client no longer bundles contract deploy bytecode. VIBE + the pair are still
  discovered from the factory.
- Bump the localStorage key (v6 -> v7) so stale orders against the old pool
  don't linger after the swap.

Supersedes the unmerged base/ui v2 PR (#148) — goes straight from the v1 demo
to v3 (only vibenet's v2 landed, so main was mismatched). The SwapHelper.json
artifact is retained only as input to base/vibenet's bytecode-manifest
generator; the client no longer imports it.

Pairs with base/vibenet (addresses must match the v3 salt + helper bytecode).

Co-Authored-By: Claude <noreply@anthropic.com>
@BrianBland
BrianBland disabled auto-merge September 3, 2026 20:19
@BrianBland
BrianBland added this pull request to the merge queue Sep 3, 2026
Merged via the queue into main with commit 2323d39 Sep 3, 2026
13 checks passed
@BrianBland
BrianBland deleted the brianbland/vibenet-validity-v3-exact-buy-sell branch September 3, 2026 20:21
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.

4 participants