Envelope
Integration

Bridging in and out

Deposit USDC on Base for eUSD on Arc, and redeem it back.

Bridging is asynchronous. Your transaction records the request, and the other chain is settled a few confirmations later. There is no single atomic call, so poll the destination chain rather than expecting the funds in your own receipt.

Deposit: USDC on Base to eUSD on Arc

// 1. let the vault pull your USDC (Base)
IERC20(USDC).approve(vault, amount);

// 2. deposit (Base)
EnvelopeVault.deposit(uint256 amount, address recipient)
ParameterMeaning
amountUSDC, 6 decimals. Must sit between minDeposit() and maxDeposit().
recipientThe Arc address that receives the eUSD. It does not have to be the sender.

The entry fee is taken from amount inside the same transaction, so you receive amount - fee in eUSD. Read the current rate from feeBps() rather than hardcoding it, since it can change.

Watch for the event, where netAmount is exactly what gets minted on Arc:

event Deposited(
  address indexed sender,
  address indexed recipient,
  uint256 netAmount,
  uint256 feeAmount
)

Withdraw: eUSD on Arc to USDC on Base

// no approval needed, it burns from msg.sender (Arc)
EnvelopeBridgeArc.redeem(uint256 amount, address baseRecipient)
ParameterMeaning
amounteUSD, 6 decimals. Must be at least minRedeem().
baseRecipientThe Base address that receives the USDC.

Redemption is one for one. The USDC is released on Base once the burn is confirmed, and each release is tied to the burn transaction, so it cannot pay out twice.

Redeeming costs native Arc gas

An address that only ever received bridged eUSD has none, and cannot send the transaction. See Sponsored gas for how to fund it in the same flow.

Checking status

Both directions expose a read API keyed by an action id, which is keccak256(abi.encode(txHash, logIndex)) of the originating event:

GET https://api.envelope.trade/bridge-api/api/deposit/{actionId}
GET https://api.envelope.trade/bridge-api/api/burn/{actionId}

A response with action.status === "completed" means the other chain has settled.