# Troubleshooting

Common issues and solutions when using XOXNO platform features.

## Lending & Borrowing

### Transaction Failed: "Insufficient balance"

**Problem:** Transaction fails when trying to supply or borrow.

**Solutions:**

* Ensure you have enough EGLD for gas fees (\~0.01 EGLD minimum)
* Check you're not trying to supply more than you have
* For withdrawals, verify you're not withdrawing collateral used for loans

### Health Factor Declining

**Problem:** Your health factor is dropping toward 1.0.

**Immediate actions:**

1. **Add collateral** - Supply more assets to increase health factor
2. **Repay debt** - Reduce borrowed amount
3. **Close position** - Fully repay and withdraw if necessary

**Prevention:**

* Keep health factor above 2.0 for safety
* Set up price alerts for your borrowed assets
* Monitor positions daily when using leverage

### Cannot Withdraw Supplied Assets

**Problem:** Withdraw button disabled or transaction fails.

**Causes:**

* Assets are being used as collateral for a loan
* Insufficient liquidity in the pool (rare)
* You're trying to withdraw more than supplied

**Solutions:**

* Repay loans first, then withdraw
* Withdraw only unused portion (not backing loans)
* If liquidity issue, wait for pool to rebalance (usually minutes)

### Liquidation Occurred

**Problem:** You were liquidated and lost some collateral.

**What happened:**

* Health factor dropped below 1.0
* Liquidators repaid part of your debt
* Liquidation penalty (\~5-10%) was charged
* Remaining collateral is still yours

**Next steps:**

* Withdraw remaining collateral
* Review what caused liquidation (price movement, rate changes)
* Use higher health factor buffers (>2.0) in future
* Consider less leverage

### Borrow APY Increased Unexpectedly

**Problem:** Your borrow rate went up suddenly.

**Why this happens:**

* Borrow rates are dynamic based on utilization
* High demand for asset increases rates
* Normal market behavior

**What to do:**

* Monitor if rates stay elevated
* Consider repaying if rates too high
* Switch to different borrowed asset if needed
* Check if E-Mode offers better rates

***

## NFT Marketplace

### NFT Not Showing After Purchase

**Problem:** Bought NFT but don't see it in wallet.

**Solutions:**

1. Wait 6 seconds for block confirmation
2. Refresh wallet/page
3. Check transaction on [MultiversX Explorer](https://explorer.multiversx.com)
4. Verify correct wallet address

### Cannot List NFT for Sale

**Problem:** NFT doesn't appear in your sellable items.

**Causes:**

* NFT is staked elsewhere
* NFT is listed on another marketplace
* Collection not verified on XOXNO

**Solutions:**

* Unstake NFT from other protocols
* Delist from other marketplaces first
* Contact support if collection should be listed

### Offer Rejected Automatically

**Problem:** Your offer was auto-rejected.

**Reasons:**

* Offer below minimum threshold (usually 50% of floor)
* Insufficient funds in wallet when offer accepted
* Owner set minimum offer price

**Solutions:**

* Make competitive offers (80%+ of floor price)
* Keep EGLD in wallet for full offer duration
* Check collection floor price before offering

***

## Leverage & Multiply

### Position Underwater

**Problem:** Leverage position is losing money.

**Understanding:**

* Leverage amplifies losses, not just gains
* Market moved against your position (long and price fell, or short and price rose)

**Options:**

1. **Hold if you believe in recovery** - But watch health factor!
2. **Add collateral** - Prevents liquidation while waiting
3. **Close position** - Accept loss and move on
4. **Partial close** - Reduce leverage, keep smaller position

### Can't Close Leverage Position

**Problem:** Unable to exit leveraged trade.

**Common causes:**

* Insufficient liquidity for swap
* Health factor too low (near liquidation)
* Transaction timing issues

**Solutions:**

* Try closing 50% at a time (smaller trades)
* Increase slippage tolerance slightly
* Wait for better liquidity (minutes to hours)
* Add collateral first to improve health factor

### Multiply Strategy Not Profitable

**Problem:** Expected returns aren't materializing.

**Check these factors:**

* **Interest rates changed** - Borrow APR may have increased
* **Yield sources decreased** - LP fees or staking APY dropped
* **Position too small** - Gas fees eating into returns
* **Timing** - Some strategies need weeks to show profit

**Solutions:**

* Recalculate with current rates
* Exit if no longer profitable
* Increase position size (if strategy still viable)
* Switch to different strategy

***

## API Integration Issues

### Quote Request Fails: "Unknown token"

**Problem:** Aggregator returns unknown token error.

**Solutions:**

* Verify token identifier format: `TOKEN-hexcode` (e.g., `WEGLD-bd4d79`)
* Check token exists on MultiversX
* Use pair-config endpoint to verify support:

```bash
curl "https://swap.xoxno.com/api/v1/pair-config?from=TOKEN1&to=TOKEN2"
```

### WebSocket Connection Drops

**Problem:** WebSocket disconnects frequently.

**Causes:**

* Network issues
* Exceeded message rate limit (100/second)
* Exceeded topic limit (100 topics)
* Connection timeout (no ping/pong)

**Solutions:**

* Implement reconnection logic with exponential backoff
* Reduce message frequency
* Unsubscribe from unused topics
* Respond to ping frames

### Transaction Broadcasting Failed

**Problem:** Relayer rejects transaction.

**Common errors:**

| Error                  | Cause                                           | Solution                                    |
| ---------------------- | ----------------------------------------------- | ------------------------------------------- |
| `invalid signature`    | Wrong signature format or signed different data | Re-sign transaction correctly               |
| `nonce too low`        | Already used this nonce                         | Get fresh nonce from account                |
| `wrong relayer`        | Used relayer from different shard               | Calculate sender shard, use correct relayer |
| `insufficient balance` | Not enough funds for value + gas                | Reduce value or add funds                   |

### Rate Limit Exceeded

**Problem:** API returns 429 or WebSocket closes.

**Limits:**

* Aggregator API: 100 requests/second
* WebSocket: 100 messages/second
* Topics: 100 per connection

**Solutions:**

* Implement request queuing
* Cache quote responses (1-5 seconds)
* Use multiple connections for different topics
* Reduce polling frequency

***

## Transaction Errors

### Transaction Pending Forever

**Problem:** Transaction stuck in pending state.

**Causes:**

* Very low gas price (transaction not competitive)
* Network congestion
* Transaction already processed (check explorer)

**Solutions:**

1. Check status on [MultiversX Explorer](https://explorer.multiversx.com)
2. If truly pending > 5 minutes, likely an issue
3. Try new transaction with higher gas price
4. Check nonce hasn't advanced (might be already processed)

### "Smart Contract Error" on Execute

**Problem:** Transaction fails with SC error.

**Common causes:**

| Context  | Likely Cause            | Solution                      |
| -------- | ----------------------- | ----------------------------- |
| Swap     | Slippage exceeded       | Increase slippage tolerance   |
| Borrow   | Collateral insufficient | Supply more collateral        |
| Withdraw | Used as collateral      | Repay loans first             |
| Leverage | Health factor too low   | Add collateral or reduce debt |

**General solution:**

* Read error message carefully
* Check all requirements met
* Try smaller amount
* Contact support with transaction hash if unclear

### Out of Gas

**Problem:** Transaction failed due to insufficient gas.

**Solutions:**

* Increase gas limit:
  * Simple transfers: 50,000-100,000
  * Smart contract calls: 10,000,000-50,000,000
  * Complex operations: 50,000,000-100,000,000
* Check aggregator's `estimatedBuiltinCalls` for gas estimation
* Add 20% buffer to estimated gas

***

## Getting Help

### Before Contacting Support

Gather this information:

* [ ] Transaction hash (if applicable)
* [ ] Wallet address
* [ ] What you were trying to do
* [ ] Error message screenshot
* [ ] Browser/wallet type

### Support Channels

**Community Support (Fast):**

* Discord: [discord.gg/xoxno](https://discord.gg/xoxno)
* Telegram: General questions and community help

**Technical Support:**

* Email: <support@xoxno.com>
* Include transaction hash and detailed description

**Developer Support:**

* GitHub Issues: API and integration questions
* Discord #dev channel: Technical discussions

### Response Times

| Channel  | Typical Response |
| -------- | ---------------- |
| Discord  | Minutes to hours |
| Telegram | Hours            |
| Email    | 24-48 hours      |
| GitHub   | 1-3 days         |

***

## Status & Monitoring

### Check Platform Status

* **API Status**: <https://status.xoxno.com> (if available)
* **Network Status**: <https://explorer.multiversx.com>
* **Gas Prices**: Use WebSocket gasStats subscription

### Monitor Your Positions

**Daily checks:**

* Health factor
* Accrued interest
* Rate changes

**Weekly checks:**

* Overall profitability
* Alternative strategies
* Risk exposure

**Set alerts for:**

* Health factor < 1.5
* Unusual rate changes
* Large price movements

{% hint style="info" %}
Most issues resolve themselves with patience. If stuck, our community is very helpful and responsive!
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.xoxno.com/troubleshooting.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
