Deposit / Withdrawal Flow
The deposit and withdrawal processes on the LogX Network involve several key steps to ensure secure and efficient transactions. This guide will walk you through the process of depositing and withdrawing tokens on the platform.
Deposit Flow
Approve Token Spending
Before you can deposit tokens, you need to approve the platform’s smart contract to spend your tokens. This is done by interacting with the contract to grant the necessary permissions.
Execute Deposit
After token approval, you can proceed to deposit your tokens. This involves specifying the amount and confirming the transaction, which may include switching to the appropriate blockchain network if necessary.
Confirm Deposit Transaction
Once the deposit transaction is initiated, monitor the status to ensure it is successfully confirmed on the blockchain. In case of any errors, retry the process or seek support.
1. Approve Token Spending
To begin the deposit process, the platform’s smart contract must be authorized to spend your tokens. This ensures that the platform has the necessary permissions to transfer the tokens on your behalf.
- Action: Interact with the smart contract to approve the token transfer.
- Consideration: Ensure you have selected the correct token and network for the approval process.
2. Execute Deposit
Once the token spending is approved, you can proceed with depositing your tokens into the LogX platform.
- Action: Specify the amount of tokens to deposit and confirm the transaction.
- Consideration: The platform may prompt you to switch networks if the deposit needs to occur on a different blockchain.
3. Confirm Deposit Transaction
After initiating the deposit, monitor the transaction to ensure it is successfully confirmed on the blockchain.
- Action: Check the transaction status through your wallet or the platform’s interface.
Withdrawal Flow
Initialize Withdrawal
The withdrawal process begins by gathering the necessary authentication session data and preparing the message for the withdrawal request. This includes retrieving the session key, sub-account ID, and public key.
Sign Withdrawal Request
Next, you need to sign the withdrawal request using the EIP-712 standard. This involves creating a message containing details such as the sub-account ID, session key, and amount to withdraw. The message is then signed using the user’s session key.
Send Withdrawal Request
Once the message is signed, the final step is to send the withdrawal request to the LogX Network’s API. This includes sending the signed message along with other necessary headers such as the session key, LogX key, and LogX secret.
Step 1: Initialize Withdrawal
Action: Gather session data and prepare a message for the withdrawal request.
Consideration: This data includes key elements such as the session key, sub-account ID, and public key, which are necessary for creating a valid withdrawal request.
Step 2: Sign Withdrawal Request
Action: Sign the withdrawal request using the EIP-712 standard.
Consideration: Ensure that the signature is generated from the correct session key to prove that the withdrawal request is coming from the rightful owner of the account.
Step 3: Send Withdrawal Request
Action: Send the signed message along with the necessary headers to the LogX Network’s API to initiate the withdrawal.