Limit Order
A limit order is a trading instruction where a user can specify the maximum interest rate they are willing to pay for borrowing or the minimum interest rate they are willing to accept for lending. An order is only executed at the specified interest rate.
Tenor's interest rate AMM (IR AMM) natively supports limit orders. Unlike liquidity, which can be traded in both directions, limit orders can only be traded in one direction. For example, a lend limit order to swap Loan Tokens for Fixed Tokens (e.g., 100 USDC for 108 Fixed-USDC) at 8% can only be executed as a one-way trade from Loan Tokens to Fixed Tokens. The execution of a limit order is conditional to a swapper swapping against it.
The protocol accepts limit orders as collateral for borrowing.
Restrictions
Lend and borrow limit orders are subject to the following restrictions:
- When adding a lend limit order (Loan Tokens) to a tick, the AMM ensures that users do not add them below the pool's highest tick with Fixed Tokens.
- When adding a borrow limit order (Fixed Tokens) to a tick, the AMM ensures that users do not add them above the pool's lowest tick with Loan Tokens.
Lend and borrow limit orders can be placed concurrently at the spot tick.
Order of Execution
When users swap in a pool, the protocol executes swaps against pool liquidity in the following order:
- Partially filled limit orders
- Pending limit orders
- LP liquidity
This means that limit orders have precedence over liquidity.
Fees
In the absence of curator fees, limit orders will receive the fees paid by swappers when they execute their trade. This means that limit order users effectively lend or borrow at improved rates compared to the tick's interest rate.