Spending Authorization
What is a spending authorization?
A spending authorization is used in cases where you or a vendor need to move funds from a user's wallet at a future point in time. Because the wallet is self-custodied, you typically cannot move funds on behalf of a wallet holder without their involvement at the moment of the transaction.
However, for some assets and blockchains, they can authorize another wallet holder to move funds on their behalf in form of an "allowance transaction." Once the allowance is granted to another wallet holder, that wallet holder has authorization to move funds up to the amount specified.
This authorization happens per asset and can be reversed with a second authorization. Please note: Because this is a blockchain transaction, there is a fee associated with this.
Use Case Examples
Many vendors in defi require allowances to utilize their services. The most common example of this are exchanges. Since the exchange of one asset for another can only be complete when a match is found, exchanges utilize the allowance to move funds directly between sellers and buyers.
{wires for secondaries}
Allowances transactions may also be used for other purposes that require third party spending. Example: granting a peer spending authorization or setting a future purchase order based on some off-chain event.
{wires for price based purchase}
Because you are authorizing a third party to spend funds on behalf of a wallet holder, consideration should be given on...
how to inform the wallet holder of the consequences of that action
how to minimize the authorized amount
whether the addresses of authorized spenders should be restricted to avoid scams
how to give the capability to undo that action at the discretion of the wallet holder.
{wires for an authorization center}
How to grant a spending authorization
With our SDK, you can simply use the transfer function as described in Spending Authorization (Allowance) with the SDK to execute a transfer. Before doing so you should confirm that the encrypted seed is available in the expected storage location. If the keys are as expected, then the SDK will take care of auth, decryption, encryption/transport, and calling the transfer API for you.
Last updated