Skip to main content

AkashicVault

The Akashic Vault is a smart contract that allow consolidated funds transfers requested from a wallet on the Akashic Chain to an external L1 address. A user making such a request will:

  • Have the rights to access their account balance;
  • Not necessarily have the funds in his matching L1 wallet - a consequence of the Akashic Chain optimising transfer fees and using a L2 ledger instead of initiating real transfers.

Image showing multiple accounts with some balances, and a withdrawal being requested to a L1 address, but with origin wallet not having enough funds.

The contract defines a fixed deposit point which receives any funds incoming into the Akashic System. The contract is controlled and triggered by Akashic Pay which holds the private key of L1 wallet where any deposits are made. By keeping a ledger of all transactions occurring in the system, the contract is capable of approving withdrawals from wallets with valid balances, while minimising the amount of L1 transfer that are actually executed.

Image showing how now, the smart contract is responsible for allocating the funds, and has full control over them. When withdrawal is requested money is pooled as sent out as a single transaction.

For such a withdrawal to be executed, Akashic Vault needs to be supplied with a OTK, which authorises the contract to perform a withdrawal. The contract will:

  • Check if the OTK matches the requested withdraw address;
  • Evaluate if the requested address has the required funds according to the ledger;
  • Initiate the optimal transfer from the common pool of all wallets where deposits have been made to (not just the withdrawal wallet).

How deposits are managed​

To maintain a finite set of wallets from which to issue withdrawals, the contract uses a deposit-address-rotation mechanism. Upon receiving a request to deposit funds, the smart contract will allocate a single deposit address that awaits 90 minutes for the funds to be transferred. Two things can occur:

  1. A successful deposit is made: the contract registers updates the ledger balance of the wallet receiving the deposit - these funds are available for withdraw as long as the wallet's OTK is supplied;
  2. The deposit is not made, after which the adderess is re-released following a 12 hour holdout period.

This 12 hour period safeguards the situation where the deposit is made after the allocated 90 minute period, allowing the Akashic System to still credit the original wallet with the deposit.

Image showing 3 flows: 1) Despoit requested, address given, deposit made, ledger balance updated. 2) Deposit requested, address given, deposit not made, after 12 hour address is released to another deposit; 3) Despoit requested, address given, after 1.5 hour address is invalid, deposit is still made, manual linking of deposit amount to the wallet that made original request.

Token transfers​

In much the same way, this smart contract allows for a wallet with no native coin (e.g. Ethereum), to transfer tokens it may have received in previous transaction to the requested L1 address. without the need for a native coin balance, providing a seamless token interaction experience.

Tapping into the liquidity pool following an authorised request, the token is sent and the transfer fee is paid with ETH and is charged from the withdrawal account in USDT.

Image showing wallet with USDT token but not ETH - the contract supplies the ETH on the withdrawers behalf.