Skip to main content

Outcome

A single user signature kicks off a Crosschain Delta order: source token on chain A is swapped to USDC on chain B, then immediately deposited into Aave v3 on chain B. The user pays no gas on either side.

Prompt

You are building a React component that runs a Velora Crosschain Delta flow with a post-fill action hook into Aave v3.

Requirements:
- The user holds (say) USDC on Polygon. They want to end up with aUSDC supplied to Aave v3 on Base. One signature.
- Use Velora's Crosschain Delta V2 API. Endpoints: `GET /v2/quote` (with `mode=DELTA` and `destChainId` per [Crosschain Delta docs]), `POST /v2/delta/orders/build`, `POST /v2/delta/orders`.
- Always set `partner` to the host app's partner identifier on every quote call (`my-app-name` is only a placeholder).
- The winning fill resolves on Base; you provide a post-fill calldata hook that calls `aavePool.supply(USDC, amount, user, 0)` against Aave v3's Base pool address.
- Read the Aave v3 pool address from a constants file (do NOT hardcode in component code).
- Surface clear status: "Quoting" → "Signing" → "Filling on Base" → "Depositing into Aave" → "Done".
- On failure at any stage, return the user to a recoverable state. Cancel the Delta order if it hasn't filled.

Reference these docs and follow them exactly:
- https://velora.xyz/docs/delta/overview
- https://velora.xyz/docs/delta/crosschain-delta
- https://velora.xyz/docs/api-reference/delta/quote
- https://velora.xyz/docs/api-reference/delta/orders-build
- https://velora.xyz/docs/api-reference/delta/orders-submit

Do NOT chain the Aave deposit as a separate signed transaction; it must be part of the Delta fill. Do NOT skip the order-status poll between fill and deposit.

End-state check

  • One signature from the user. No gas paid on either chain.
  • Aave on Base shows the supplied position under the user’s address.
Last modified on June 14, 2026