fullWithdrawalRequest
is a part of an anti-censorship mechanism that allows the user to withdraw his funds. The user supplies the vaultId
and the starkKey
. Only the user to whom this starkKey
belongs may submit this request. When this function is called, the event LogFullWithdrawalRequest
(with the relevant starkKey, vaultId
) is emitted.FREEZE_GRACE_PERIOD
, the user is entitled to freeze the contract by calling freezeRequest
. (See the entire flow here and the conditions of a valid fullWithdrawal request here). The user supplies the vaultId
and the starkKey
and indicating the vaultId
for which the full withdrawal request has not been serviced. Once the contract is frozen, funds can be extracted using the escape operation, fully described in Escapes.verifyEscape
function on the EscapeVerifier
contract with the Merkle proof for the vault to be evicted. See Escape Verifier for more details on the proof structure. If the proof is valid, this results in the registration of the following fact - keccak256(starkKey, assetId, quantizedAmount, vaultRoot, height, vaultId)
escape
function with the same parameters as submitted to the EscapeVerifier
(starkKey
, assetId
, quantizedAmount
, vaultId
). If a proof was accepted for the same parameters by the EscapeVerifier
, and no prior escape call was made for the vault, the contract adds the vault balance to an on-chain pending withdrawals account under the starkKey
of the vault owner and the appropriate assetId
.