Protocol-Treasury App
Deflex charges fees on the output asset of market and limit orders that are collected in the protocol's treasury. The treasury is a smart contract that exposes an ABI (see below).
ABI
The protocol treasury is ARC-4 compliant and exposes an ABI (download here).
User_opt_into_assets
User_opt_into_assetsOpts the app account into the assets that are provided in the application call's foreign assets array.
The transaction must be preceded by a payment transaction that covers the minimum balance increase for the assets that are opted in (100'000 microALGO per asset). For instance, if the user wants to opt into five assets, there must be a payment transaction that sends 500'000 microALGO to the app account.
If the user provides assets that the app has already opted into previously, then the user is immediately sent back the locked ALGO for that. For instance, assume the app is opted into assets A1 and A2. Now the user calls User_opt_into_assets([A2,A3,A4,A1]) and provides a payment of 400'000 microALGO. Then the app sends back 200'000 microALGO since assets A1 and A2 are already opted in.
Parameters:
foreign_assets: This is a list of asset IDs that must be specified as the app call's foreign asset array.
Required network fees: 1000 * (1 + len(foreign_assets)) microALGO
The call fails if a provided asset does not exist.
Last updated