Transaction Flow
When depositing USDC into an Orion vault, you'll complete a 2-step transaction process. This guide explains each step and why it's necessary.
Why Two Steps?
Orion uses the standard ERC-20 token approval pattern:
- Step 1: Approve - Grant the vault permission to transfer your USDC
- Step 2: Deposit - Submit your deposit intent to the vault
This two-step process ensures you maintain control over your tokens and explicitly authorize each interaction.
Step 1: ERC-20 Token Approval
Before you can deposit USDC into a vault, you must first approve the vault contract to spend your USDC tokens.
What is Token Approval?
ERC-20 tokens (like USDC) require explicit permission before a smart contract can transfer them from your wallet. This is a security feature that prevents unauthorized access to your tokens.
The Approval Transaction
When you click "Approve" in the Orion app:
- Your wallet opens - MetaMask or your connected wallet prompts you to sign
- Review the approval - You'll see:
- Token: USDC
- Spender: The vault contract address
- Amount: The amount you're approving
- Sign the transaction - Confirm in your wallet
- Approval recorded - The approval is recorded onchain
Understanding Approval Amounts
You'll approve a specific amount of USDC that matches the amount you want to deposit. This gives the vault permission to transfer that amount from your wallet.
Step 2: Deposit Intent Submission
After approval, you can submit your deposit intent to the vault.
The Deposit Transaction
When you click "Deposit" in the Orion app:
- Your wallet opens - You'll be prompted to sign the deposit transaction
- Review the deposit - You'll see:
- Vault: The vault you're depositing into
- Amount: The USDC amount you're depositing
- Gas fee: The estimated gas cost
- Sign the transaction - Confirm in your wallet
- Intent queued - Your deposit intent is submitted and queued for the next rebalancing cycle
After Submission
Your deposit intent is now:
- Queued - Waiting for the next rebalancing cycle
- Recorded - Recorded immutably on the blockchain
- Secure - Your USDC is held by the protocol until execution
During the next rebalancing cycle, your deposit will be executed and vault shares will be created (minted) to your address.
Security Benefits of the 2-Step Process
1. Explicit Authorization
- You must explicitly approve each token contract
- No contract can access your tokens without your permission
- You maintain full control over your approvals
2. Granular Control
- You approve specific amounts for each deposit
- You can revoke or modify approvals at any time
- Each approval is a separate, auditable transaction
3. Protection Against Unauthorized Access
- Approval transactions are visible onchain for transparency
- You can review and revoke approvals through your wallet or block explorer
First-Time vs. Subsequent Deposits
First Deposit
If this is your first deposit to a vault:
- Approve USDC (Step 1) - Required
- Submit deposit (Step 2) - Required
Subsequent Deposits
If you've already approved USDC:
- Approve USDC (Step 1) - May be skipped if you have sufficient approval
- Submit deposit (Step 2) - Required
The app will automatically detect if you need to approve or if you can proceed directly to deposit.
Checking Your Approvals
You can check your USDC approvals at any time:
- In your wallet - Some wallets show token approvals
- On block explorers - View approvals on Etherscan/Sepolia Etherscan
- Revoke approvals - Use tools like revoke.cash to manage approvals
Best Practices
- Review approvals - Always review the spender address before approving
- Verify vault addresses - Ensure you're approving the correct Orion vault contract
- Monitor approvals - Periodically review and clean up unused approvals
Troubleshooting
Approval Transaction Failed
Common reasons:
- Insufficient ETH for gas fees
- Network congestion (try again later)
- Wrong network (ensure you're on the correct network)
Deposit Transaction Failed
Common reasons:
- Insufficient USDC approval (complete Step 1 first)
- Insufficient USDC balance
- Vault deposit limits reached
- Network issues