Unstaking in Aqua Patina
Unstaking Process Explained
Last updated
Unstaking Process Explained
Last updated
The un-staking process in Aqua Patina is a sequence of steps that ensures the user's ETH is withdrawn from the system in a secure and efficient manner. This process leverages the infrastructure of the Aqua Patina Daemon (APD), the apETH contract, Eigenpods, SSV Clusters, and the Ethereum network.
Step-by-Step Process:
User Initiates Withdrawal: The user initiates a withdrawal request through the AP Wallet by specifying the amount of ETH they want to withdraw.
Sufficient ETH in Pool: If there is enough liquidity to fulfill the withdrawal request, the apETH Contract burns the equivalent amount of apETH, based on the ratio ETH/apETH and sends the ETH directly to the user.
Insufficient ETH in Pool: In case the pool does not have enough ETH to fulfill the request, the request is placed in a withdrawal queue in the smart contract.
Issuance of the “AP Exit NFT”: The apETH Contract issues a unique NFT to the user, representing their withdrawal request. This NFT includes the exact exchange ratio between apETH and ETH at the time of the request, ensuring the user is locked in at the current value, and locks the users’ apETH in the queue. Next, the contract will start exiting one or more validators to unlock the required amount of ETH to reimburse the user.
Validator Exit Process: The APD that monitors the apETH smart contract initiates the unstaking process through the SSV network. This involves selecting the validator with the worst performance metrics from the associated SSV Cluster - since each validator will return the same fixed amount of 32 ETH. The cluster broadcasts an exit message to the Ethereum network, signaling the selected validator to stop participating in staking activities. The validator’s exit process can take up to 5 days, during which the validator is removed from the network.
Release of ETH to Eigenpod: After the validator exits, the staked ETH is returned to the corresponding Eigenpod, after it’s withdrawn from the Eigenpod back to the apETH pool. This process takes an additional 7 days.
ETH Available in Pool: Once the ETH is returned to the apETH Contract, the user can exchange their NFT for the requested ETH amount. This step finalizes the withdrawal process.
The whole process is designed to balance network security and user convenience, ensuring that user funds are secure and accessible while maintaining the integrity and performance of the validators. The ETH which was earmarked for withdrawal by the user will stay in the pool until the user decides wo withdraw. There can be no frontrunning the exit queue, without forcing the queue to handle exit requests on a first-in-first-out basis. The user is in control of when he wants to withdraw their funds after the waiting period.
Note that if a user wants to withdraw his funds faster, he can do so through a DEX, but will receive ETH at a less favorable rate than through the contract.