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 token 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.
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
Withdraw Collateral
The withdrawal process allows you to move tokens from the LogX Network back to your chosen blockchain.
Helper Functions
The withdrawal process requires authentication session data to sign the request.
1. Withdraw Collateral
The withdrawal process allows you to move tokens from the LogX Network back to your chosen blockchain.
- Action: Prepare and sign a withdrawal request that includes your destination address and amount.
- Consideration: Ensure you have the proper authentication data and API keys for your request.
2. Helper Functions
The withdrawal process requires authentication session data to sign the request properly.
- Action: Retrieve and use authentication session data to authorize your withdrawal.
- Consideration: Keep your API keys and secrets secure during this process.
- Implementation: The helper functions include methods to get authentication session data, retrieve the initial auth data, and fetch the current nonce from the API.