Order Creation

The Hourglass Marketplace allows makers to create limit buy and sell orders for TBTs. This process is 100% free as orders are stored in an off-chain repository.

Amount & Price

For both buys and sells, you will specify two quantities:

  • amount signifies the amount of TBT to be bought or sold.

  • price signifies the amount of the quote asset to be bought or sold.

These quantities can either be specified directly or computed after specifying a discount where the following relationship is true: price = amount x discount.

The discount would be the incentive for another user to purchase a time-locked asset.

Order Allowances

When creating orders on Hourglass, the order data and its associated digital signature are posted to an off-chain orderbook. Hourglass will only let you create an order in this way if you have the sufficient balance and approvals (for either ERC20 or ERC1155 tokens). Sufficient means that the amount of the asset being offered in the order to be created plus the sum of all amounts of this same token offered across all your outstanding orders must be less than or equal to both

  1. The balance of this token held in the users wallet.

  2. The allowance of this token set by the user with the operator being the .

If either of these conditions are not met, your outstanding set of orders will be "soft" cancelled, meaning that these orders will no longer be returned from the API. The reason for this is that if another user were to try and fill an order within this set, there is a good chance the transaction would revert due to insufficient balance / approval. However, the signature for this order will remain valid up until the point of expiration that the order maker set when creating the order. This means that if someone reading data from the API were to store the response data, and the issue of insufficient balance / approval were rectified by the user, then the order is still technically fillable. For this reason, it is recommended that users use short expiration windows so the intents do not stay active for long. Order creation is free so this will not result users having to spend more money.

Create Limit Sell Order

A limit sell order is when you are offering a TBT in exchange for at least some minimum amount of a quote asset (ERC20).

For example: I would like to sell 0.2 frxETH/ETH Curve LP Tokens locked until December 2023 in exchange for at least 0.196 frxETH (2% discount).

In order to express the above intent, you could:

  1. Click on the Ask tab of the order creation modal.

  2. Select the TBT to offer using the dropdown.

  3. Input the amount of the TBT you would like to sell (0.2).

  4. Input the desired price you would like to sell the TBT for. This can be done in two ways

    1. Input 0.196 into the Limit Price field.

    2. Input 2 into the Discount field.

  5. Specify the order expiration date.

  6. Click the Create Limit Order button.

  7. You will now see a confirmation screen summarizing the order details. If everything looks good to you, click the confirmation button.

  8. If you don't have sufficient approvals in place for the offerred asset (the TBT), then you will be prompted to execute a transaction that remedies this. If you already have these approvals then this step will be skipped.

  9. The order is submitted to the API and will now be fillable by other users!

Create Limit Buy Order

A limit buy order is when you are offering a quote asset (ERC20) in exchange for at least some minimum amount of a TBT maturing within some temporal window.

For example: I would like to buy at least 0.2 frxETH/ETH Curve LP Tokens locked for at most 160 days in exchange for 0.196 frxETH (2% discount).

In order to express the above intent, one could

  1. Click on the Bid tab of the order creation modal.

  2. Use the slider to specify the rolling limit window, which is the maximum lock time, measured relative to the timestamp of order fill, for a TBT that can be used to fill this order.

  3. Input the amount of the TBT you would like to buy (0.2).

  4. Input the desired price you would like to buy the TBT for. This can be done in two ways

    1. Input 0.196 into the Limit Price field.

    2. Input 2 into the Discount field.

  5. Specify the order expiration date.

  6. Click the Create Limit Order button.

  7. You will now see a confirmation screen summarizing the order details. If everything looks good to you, click the confirmation button.

  8. If you don't have sufficient approvals in place for the offerred asset (the quote asset), then you will be prompted to execute a transaction that remedies this. If you already have these approvals then this step will be skipped.

  9. The order is submitted to the API and will now be fillable by other users!

Last updated