Users
In here, you can find a description of what the Users of the Metera Platform can do.
Buy MTKs
The user places a "Deposit" order calling the API endpoint with params: user address, assets to deposit, and their prices.
The contract backend builds the "Deposit" transaction with the parameters mentioned above. This transaction creates an order that will be processed later on, which holds the assets to be deposited in the MTK, along with the fees charged to the user.
The contract backend returns the unsigned transaction cbor to be signed by the user.
The user signs the transaction.
The signed transaction cbor is sent back to the backend, and it’s submitted to the blockchain.
Sell MTKs
The user places a "Withdraw" order, calling the API endpoints with params: number of MTK to redeem, and user address.
The contract backend builds the "Withdraw" transaction with the parameters mentioned above. This transaction creates an order holding the MTK assets to be burned, which will be processed later on.
The backend returns the unsigned transaction cbor to be signed by the user.
The user signs the transaction.
The signed transaction cbor is sent back to the backend, and it’s submitted to the blockchain.
Cancel Order
The user selects the order to cancel and clicks the “Cancel Order” button.
The contract backend builds the "Cancel Order" transaction with the order UTxO reference. This transaction cancels the order, returning the assets to the user.
The backend returns the unsigned transaction cbor to be signed by the user.
The user signs the transaction.
The signed transaction cbor is sent back to the backend, and it’s submitted to the blockchain.
Last updated