Skip to content

Order Application

The Order Application is a stateful smart contract that contains the relevant pricing information for an individual order. A new Order Contract is created every time a user makes the Open Order app call to the Orderbook Contract.

General Behavior

All types of orders share the following behavior:

  • Can only be canceled by the Order Opener (original app caller)

  • Can be either partially or fully executed

    • Full: Execution asset MUST be sent to order opener
    • Partial: Execution asset can be sent to either order opener or order contract itself
  • Order Opener can “Claim” execution asset during partial executions where the execution asset was sent to order contract. Learn more about our reasoning for adding a claim functionality here

Order Types

Due to a design choice by the makers of the Algorand Protocol, an Algorand Address is required to Opt-In to an ASA before being able to interact with it. As of writing this, the minimum balance requirements for an ASA Opt-In is 100_000 microAlgo. Due to the added costs of Asset Opt-Ins, we have decided to differentiate Orders based on the amount and types of asset Opt-Ins required.

Algo -> ASA Order

  • Any Order Contract where Algo is the escrow asset within the Order contract.
  • Algo does not require an Opt-in so MBR requirements for this type of Order Contract is 100_000 microalgo less than ASA-> ASA orders
  • Order contract still needs to be opted into ASA for edge case when order opener is not opted into ASA at time of order execution

See the full fee breakdown here

ASA -> Algo Order

  • Any Order Contract where an ASA is the escrow asset but Algo is the target asset
  • Algo does not require an Opt-in so MBR requirements for this type of Order Contract is 100_000 microalgo less than ASA-> ASA orders See the full fee breakdown here

ASA -> ASA Order

  • Any Order Contract where an ASA is the escrow and target Asset
  • ASA -> ASA orders require the highest MBR since two asset Opt-ins are required See the full fee breakdown here