The transfer flow
Last updated
Last updated
User enters a request to transfer funds using tanX.
TransferRequest
transaction to Starkware.tanX sends out a transfer request transaction to the Starkware gateway, using the add_transaction
API with the TransferRequest
transaction type.
The request includes the following information:
| The quantized amount of the asset to transfer. |
| The sender’s public Stark key. |
| The sender’s vault id. |
| The receiver’s public Stark key. |
| The receiver’s vault id. |
| The token to be transferred. |
| The maximum fee that the sender is willing to pay for the transaction. |
| The time after which the request is no longer valid, in hours since the Unix epoch. |
| A nonce issued by tanX, to prevent replay attacks. |
| The sender’s signature. |
Starkware checks the following to validate the transfer request:
The balance in the sender’s vault is sufficient to fulfill the transaction.
The maximum fee that the party is willing to pay for the transaction is not less than the actual fee.
The transaction request has not expired.
According to the orders tree, the order has not already been fulfilled.
If the transfer request is valid, the transfer is included in a batch to be submitted on-chain along with a validity proof.