Overview
Record and verify a user deposit to the Strike Protocol. This endpoint validates on-chain transactions and updates your account balance accordingly.This endpoint does NOT require authentication as it verifies transactions on-chain. The transaction itself provides proof of ownership and authenticity.
How Deposits Work
Process Flow
- On-chain Transaction: You send USDC to Strike Protocol smart contract
- Record Deposit: Call this endpoint with transaction details
- Verification: API verifies the transaction on-chain
- Balance Update: Your Strike Protocol balance is credited
Supported Assets
- USDC: Primary trading asset on Strike Protocol
- Other stablecoins: May be supported in the future
Request Body
Ethereum wallet address that made the deposit.Format: 42-character hex string starting with “0x”
Example: “0x742d35cc6C6C7532B1140Da4C8A2f6C8ECfC9B46”
Example: “0x742d35cc6C6C7532B1140Da4C8A2f6C8ECfC9B46”
Deposit amount in USD.Format: Decimal string
Example: “500.0”
Example: “500.0”
Ethereum transaction hash for the deposit.Format: 66-character hex string starting with “0x”
Example: “0x1234567890abcdef1234567890abcdef12345678901234567890abcdef123456”
Example: “0x1234567890abcdef1234567890abcdef12345678901234567890abcdef123456”
ISO timestamp when the transaction was submitted.Format: ISO 8601 with UTC timezone
Example: “2024-01-15T14:30:00Z”
Example: “2024-01-15T14:30:00Z”
Response Fields
Indicates if the deposit was verified and recorded successfully
Descriptive message about the operation result
Confirmed deposit amount that was verified on-chain
Transaction hash that was successfully verified
Confirmation that on-chain verification succeeded
Block number in which the transaction was included
Verification Process
On-Chain Validation
The API performs comprehensive verification:- Transaction Existence: Confirms transaction exists on-chain
- Contract Interaction: Verifies transaction interacted with Strike Protocol contract
- Amount Matching: Confirms deposited amount matches request
- Wallet Verification: Ensures transaction originated from specified wallet
- Duplicate Prevention: Prevents double-counting of the same transaction
Verification Criteria
- Block Confirmations: Minimum confirmations required for security
- Contract Address: Must interact with official Strike Protocol contract
- Asset Type: Must be supported asset (USDC)
- Gas Payment: Transaction must have succeeded (not reverted)
Deposit Mechanics
Balance Updates
After successful verification:- Account Balance: Increased by deposit amount
- Withdrawable Balance: Immediately available for withdrawal
- Trading Balance: Available for opening positions
Transaction Fees
- Network fees: Standard Ethereum gas fees (paid by user)
- Protocol fees: No fees charged for deposits
- Processing fees: No additional fees
Processing Time
- Verification: Usually instant if transaction is confirmed
- Balance Update: Immediate after verification
- Trading Availability: Funds available for trading immediately
Error Responses
Invalid request parameters or transaction verification failedCommon causes:
- Invalid wallet address format
- Transaction hash not found
- Amount doesn’t match on-chain transaction
- Transaction failed or was reverted
Transaction already recorded (duplicate submission)
Blockchain RPC issues or temporary verification problems
Usage Examples
Standard USDC Deposit
Small Deposit
Large Deposit
Making a Deposit
Step 1: Send On-Chain Transaction
Step 2: Get Transaction Hash
After sending the transaction, get the transaction hash from your wallet or block explorer.Step 3: Record Deposit
Call this endpoint with the transaction details to update your Strike Protocol balance.Step 4: Verify Balance
Use Account Info to confirm your balance was updated.Integration Examples
Web3.js Integration
Ethers.js Integration
Best Practices
Transaction Handling
- Wait for confirmations: Ensure transaction has sufficient confirmations
- Check transaction status: Verify transaction succeeded before recording
- Handle reorgs: Be prepared for blockchain reorganizations
- Gas estimation: Use proper gas limits to avoid failed transactions
Error Handling
- Retry logic: Implement retries for temporary verification failures
- Duplicate detection: Handle cases where deposit was already recorded
- User feedback: Provide clear error messages to users
- Monitoring: Track failed deposits for manual review
Security Considerations
- Amount validation: Double-check amounts match transaction
- Contract verification: Ensure interaction with correct contract
- Wallet ownership: Verify user owns the depositing wallet
- Replay protection: Prevent duplicate transaction submissions
Troubleshooting
Common Issues
-
“Transaction verification failed”
- Check if transaction hash is correct
- Ensure transaction succeeded on-chain
- Verify amount matches transaction value
-
“Transaction already recorded”
- Deposit was already processed
- Check account balance for credit
- Don’t resubmit the same transaction
-
“Unable to verify transaction on-chain”
- Blockchain RPC may be experiencing issues
- Wait a few minutes and retry
- Check if transaction has sufficient confirmations
Verification Steps
- Check Transaction: View transaction on block explorer
- Confirm Success: Ensure transaction status is “Success”
- Verify Contract: Confirm interaction with Strike Protocol contract
- Match Amount: Ensure deposit amount matches transaction value
Next Steps
After recording a deposit:- Verify Balance - Check Account Info for updated balance
- Start Trading - Use funds for Long or Short positions
- Monitor Account - Track activity in Dashboard
Always verify your deposit was successful by checking your account balance after recording the transaction.
Only submit each transaction hash once. Duplicate submissions will be rejected to prevent double-counting.
Body
application/json