Full withdrawal reference
Function reference
fullWithdrawalRequest
Withdraws all funds from a vault to the onchain contract, whether the operator services the request or not.
This function ensures users maintain custody of their funds, regardless of the operator’s actions.
vaultId
|
The ID of the vault that holds the funds to withdraw. |
ownerKey
|
The public Stark key associated with the ID of the vault that holds the funds to withdraw and the Ethereum address that initiated the transaction. |
If ownerKey
does not match vaultId
, StarkEx proves the invalidity of the request and does not withdraw the funds.
If ownerKey
does not match the Ethereum address, the StarkEx smart contract rejects the request and the offchain application does not service the request.
freezeRequest
Freezes the exchange, preventing any further state updates. Withdrawals of onchain funds are still possible.
Any user can call this function if the freeze grace period has passed, and the forced operation is still in the pending forced operations area.
vaultId
|
Any vault ID. This vault ID does not need to be the same vault ID used to call the |
ownerKey
|
The public Stark key associated with |
verifyEscape
Verifies that the contents of a vault belong to a certain Merkle commitment.
For more information, see Escape verifier
escapeProof
|
The Merkle proof for the vault to be evicted. |
escape
Adds the vault balance to an onchain pending withdrawals account under the public Stark key of the vault’s owner and the appropriate asset ID,
If the Escape verifier accepted a proof with the same parameters, and no prior escape call was made for the same vault.
vaultId
|
The ID of the vault that holds the funds to withdraw. |
ownerKey
|
The public Stark key associated with |
assetId
|
The ID of the asset being withdrawn. |
quantizedAmount
|
The quantized amount of the asset being withdrawn. |
Constant reference
Event reference
LogFullWithdrawalRequest
Indicates that a user called the fullWithdrawalRequest
function.
vaultId |
The same ID used when calling |
ownerKey |
The same public Stark key used when calling |