> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rondo.finance/llms.txt
> Use this file to discover all available pages before exploring further.

# Events & errors

> What an indexer can reconstruct, and the protocol-specific errors integrations should decode.

## Events

| Event                | Carries                                                                                |
| -------------------- | -------------------------------------------------------------------------------------- |
| `OrderCreated`       | Fixed orders. `buyAmount`, `feeBps`, and the **oracle answer at creation**             |
| `PeggedOrderCreated` | A separate event — `premiumBps`, `minRate`, the answer                                 |
| `OrderFilled`        | taker · **maker** · **sellToken** · amountOut · amountIn · fee · `sellRemaining` after |
| `OrderCloseSkipped`  | A batch close left an order open because its escrow could not be delivered             |
| `OrderCancelled`     | `by`, refunded amount and whether it was maker-initiated                               |
| `OrderExpiryClosed`  | Distinct from cancel: maker, sweeper, refund                                           |

## Errors

### Creation

| Error                                 | Cause                                                                        |
| ------------------------------------- | ---------------------------------------------------------------------------- |
| `InvalidTokenPair`                    | `buyToken` is not the counter-token, or equals `sellToken`                   |
| `UnsupportedToken`                    | Neither token in the selected base/USDT market                               |
| `BelowMinOrderAmount`                 | Under `minOrderAmount[sellToken]`                                            |
| `InvalidExpiry` · `DurationTooLong`   | Deadline already past, or beyond `maxOrderDuration`                          |
| `PriceOutOfBand`                      | Fixed order priced outside `±bandBps`                                        |
| `PremiumTooHigh`                      | Above `maxPremiumBps`                                                        |
| `ZeroMakerFloor` · `FloorAboveMarket` | Pegged floor missing, or set above the current rate                          |
| `FloorTooLoose`                       | Pegged floor is farther below the current settled rate than `bandBps` allows |

### Filling

| Error                           | Cause                                                                              |
| ------------------------------- | ---------------------------------------------------------------------------------- |
| `OrderNotOpen` · `OrderExpired` | Already closed, or past its deadline                                               |
| `ExceedsRemaining`              | Asked for more than the order holds                                                |
| `BelowMinFill`                  | A partial fill below the minimum, on an order still above it                       |
| `SlippageExceeded`              | `amountIn` exceeded the taker's `maxAmountIn`                                      |
| `BelowMakerFloor`               | The settled rate fell under the maker's `minRate`                                  |
| `TakerNotWhitelisted`           | The caller lacks `TAKER_ROLE` — reachable only while `takerWhitelistEnabled` is on |

### Oracle

| Error                                 | Cause                                                                         |
| ------------------------------------- | ----------------------------------------------------------------------------- |
| `InvalidOracleAnswer` · `StaleOracle` | Non-positive answer, or latest observation older than `maxOracleAge`          |
| `OracleTwapUnavailable`               | The five-minute average could not be produced with at least five observations |

### Safety

| Error                                          | Cause                                                             |
| ---------------------------------------------- | ----------------------------------------------------------------- |
| `UnexpectedTransferAmount`                     | A token delivered less than requested — the fee-on-transfer guard |
| `NotOrderMaker` · `ZeroAddress` · `ZeroAmount` | Caller or argument problems                                       |

<Note>
  OpenZeppelin access-control, pause and reentrancy guards can also revert, as can any selected base token or USDT during
  `transfer` / `transferFrom`. Those are dependency errors rather than Rondo-specific custom errors;
  do not treat this table as an exhaustive list of every byte sequence a transaction may return.
</Note>
