Users

Users

  • Deposit X amount of LVC (deposit operation).

    1. The user clicks the “Place deposit order” button calling the api endpoint with params: user address, tokens to deposit, minimum MTK payout (slippage tolerance), and prices of the tokens.

    2. 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 tokens to be deposited in the porftolio, along with the fees charged to the user.

    3. The contract backend returns the unsigned transaction cbor to be signed by the user.

    4. The user signs the transaction.

    5. The signed transaction cbor is sent back to the backend, and it’s submitted to the blockchain.

  • Redeem X amount of MTK tokens (withdraw operation).

    1. The user clicks the “Place withdraw order” button, calling the api endpoints with params: number of MTK to redeem, minimum Lovelace equivalent payout (slippage tolerance), and user address.

    2. The contract backend builds the "Withdraw" transaction with the parameters mentioned above. This transaction creates an order holding the MTK tokens to be burned, which will be processed later on.

    3. The backend returns the unsigned transaction cbor to be signed by the user.

    4. The user signs the transaction.

    5. The signed transaction cbor is sent back to the backend, and it’s submitted to the blockchain.

  • Cancel Order.

    1. The user selects the order to cancel and clicks the “Cancel Order” button.

    2. The contract backend builds the "Cancel Order" transaction with the order UTxO reference. This transaction cancels the order, returning the tokens to the user.

    3. The backend returns the unsigned transaction cbor to be signed by the user.

    4. The user signs the transaction.

    5. The signed transaction cbor is sent back to the backend, and it’s submitted to the blockchain.

Last updated