<p>PoolDeposit (500 ADA on mainnet) is returned automatically upon pool deregistration at corresponding epoch to your stake address, as long as your stake account is not deregistered, while keyDeposit (2 ADA) is returned upon key deregistration.</p>
<p>You already have them on your stake account (see <a href="https://cardanoscan.io/stakeKey/084cf0adf9fe75b3e479e6c837676bb85016ae891c624cf59004a009?tab=stakekeyhistory" rel="nofollow noreferrer">here</a> )</p>
<p>PS: There are preprod and preview networks to learn, dont need to test on mainnet chain</p>

CC BY-SA 4.0
2022-11-12T01:39:09.060Z
Thank you for your response, but I don't see anything about how to deregister my stack account. Do we have a link for this or a command line?
Raphaël Etang-Salé
CC BY-SA 4.0
2022-11-12T02:00:41.860Z
Pretty much the [same as you registered](https://developers.cardano.org/docs/stake-pool-course/handbook/register-stake-keys/#create-a-registration-certificate), except you will now use `deregistration-certificate` instead of `registration-certificate`
RdLrT
CC BY-SA 4.0
2022-11-12T03:06:44.840Z
Thanks for your help, I just edited the post because I'm block with the transaction now
Raphaël Etang-Salé
CC BY-SA 4.0
2022-11-12T04:01:13.350Z
IMO - it's best to revert the post to original and maybe raise a seperate thread for tx creation assistance, your new issue is that you dont have any funds on tx in that you're using, you need to specify valid transaction input that isn't empty
RdLrT
CC BY-SA 4.0
2022-11-12T04:07:59.083Z
You're right, thank you for everything
Raphaël Etang-Salé
CC BY-SA 4.0
2022-11-12T00:58:19.737Z
2022-11-12T01:36:25.043Z
2022-11-12T01:36:25.043Z
RdLrT
<p>after creating my pool for 2 weeks on Cardano, I would like to take the funds back to finish my tests.
But after the deregistration, I still don't see my funds in my payment address.
I was wondering if I have another command line to type to get this back.</p>
<p>These were the command lines that I typed for the deregistration:</p>
<pre><code>cardano-cli transaction build \
    --mainnet \
    --witness-override 2 \
    --tx-in 738b285d278eb2b0df231b1376d41991508c85a2b76407209a0b6cdc493f1847#0 \
    --change-address addr1q8lyynej6uprzj2ty7fpk4azfp07fc5n4emtwcszzecrl8zag54tt8pagr3nnk3verl9k47jsqmrahw4z53hftwye53ssztqtp \
    --certificate-file pool-deregistration.cert \
    --out-file tx.raw

cardano-cli transaction sign \
    --tx-body-file tx.raw \
    --signing-key-file payment.skey \
    --signing-key-file cold.skey \
    --mainnet \
    --out-file tx.signed

cardano-cli transaction submit \
    --tx-file tx.signed \
    --mainnet
</code></pre>
<p>After getting a successful message about this, I waited until epoch 374.
Now I can see <a href="https://cardanoscan.io/pool/e9c55b1910e7fdcacf2db1be6f20fadff0e5d68d6566b223698031ab?tab=poolupdatehistory" rel="nofollow noreferrer">here</a>, my pool is expired but I have not received my 500 ADA.</p>
<p>I didn't find any documentation about it, how can I get this fund back? Do we have a command line for this?</p>
<p>Thank you to anyone who can help me.</p>
<p><strong>NEW EDIT</strong></p>
<p>Actually, I can't see exactly the same thing on the Cardano doc maybe it could help somebody else here. So I have to deregistrate my stack account too.</p>
<p>We have to generate the file here:</p>
<pre><code>cardano-cli stake-address deregistration-certificate \
--stake-verification-key-file stake.vkey \
--out-file stake-deregistration.cert
</code></pre>
<p>And I'm trying to proceed to the transaction here:</p>
<pre><code>cardano-cli transaction build \
    --tx-in 75e262eb49ba1237b1ee00a4854935d67bd05988baed5472a7ff97b49551d386#0 \
    --tx-out $(cat stake.addr)+500000000 \
    --change-address $(cat stake.addr) \
    --mainnet  \
    --out-file tx.raw \
    --certificate-file stake-deregistration.cert \
    --witness-override 2

cardano-cli transaction sign \
    --tx-body-file tx.raw \
    --signing-key-file payment.skey \
    --signing-key-file stake.skey \
    --mainnet \
    --out-file tx.signed

cardano-cli transaction submit \
    --tx-file tx.signed \
    --mainnet
</code></pre>
<p>As you can see <a href="https://cardanoscan.io/stakekey/084cf0adf9fe75b3e479e6c837676bb85016ae891c624cf59004a009" rel="nofollow noreferrer">here</a> my reward is available but I have this message after to submit my transaction :</p>
<pre><code>Command failed: transaction submit  Error: Error while submitting tx: ShelleyTxValidationError ShelleyBasedEraBabbage (ApplyTxError [DelegsFailure (DelplFailure (DelegFailure (StakeKeyNonZeroAccountBalanceDELEG (Just (Coin 500000000)))))])
</code></pre>

<cardano-cli><stake-pool><ada>
How to get my stacking funds after to deregistrate on Ada
# How to get my stacking funds after to deregistrate on Ada

(Asked by: username_0 on 2022-11-11)

after creating my pool for 2 weeks on Cardano, I would like to take the funds back to finish my tests.
But after the deregistration, I still don't see my funds in my payment address.
I was wondering if I have another command line to type to get this back.
These were the command lines that I typed for the deregistration:
cardano-cli transaction build \
    --mainnet \
    --witness-override 2 \
    --tx-in 738b285d278eb2b0df231b1376d41991508c85a2b76407209a0b6cdc493f1847#0 \
    --change-address addr1q8lyynej6uprzj2ty7fpk4azfp07fc5n4emtwcszzecrl8zag54tt8pagr3nnk3verl9k47jsqmrahw4z53hftwye53ssztqtp \
    --certificate-file pool-deregistration.cert \
    --out-file tx.raw

cardano-cli transaction sign \
    --tx-body-file tx.raw \
    --signing-key-file payment.skey \
    --signing-key-file cold.skey \
    --mainnet \
    --out-file tx.signed

cardano-cli transaction submit \
    --tx-file tx.signed \
    --mainnet

After getting a successful message about this, I waited until epoch 374.
Now I can see here, my pool is expired but I have not received my 500 ADA.
I didn't find any documentation about it, how can I get this fund back? Do we have a command line for this?
Thank you to anyone who can help me.
NEW EDIT
Actually, I can't see exactly the same thing on the Cardano doc maybe it could help somebody else here. So I have to deregistrate my stack account too.
We have to generate the file here:
cardano-cli stake-address deregistration-certificate \
--stake-verification-key-file stake.vkey \
--out-file stake-deregistration.cert

And I'm trying to proceed to the transaction here:
cardano-cli transaction build \
    --tx-in 75e262eb49ba1237b1ee00a4854935d67bd05988baed5472a7ff97b49551d386#0 \
    --tx-out $(cat stake.addr)+500000000 \
    --change-address $(cat stake.addr) \
    --mainnet  \
    --out-file tx.raw \
    --certificate-file stake-deregistration.cert \
    --witness-override 2

cardano-cli transaction sign \
    --tx-body-file tx.raw \
    --signing-key-file payment.skey \
    --signing-key-file stake.skey \
    --mainnet \
    --out-file tx.signed

cardano-cli transaction submit \
    --tx-file tx.signed \
    --mainnet

As you can see here my reward is available but I have this message after to submit my transaction :
Command failed: transaction submit  Error: Error while submitting tx: ShelleyTxValidationError ShelleyBasedEraBabbage (ApplyTxError [DelegsFailure (DelplFailure (DelegFailure (StakeKeyNonZeroAccountBalanceDELEG (Just (Coin 500000000)))))])

**Tags:** cardano-cli, stake-pool, ada

---

## 1 answers

### Answer by username_1 on 2022-11-12. Score: 1 | Accepted answer

PoolDeposit (500 ADA on mainnet) is returned automatically upon pool deregistration at corresponding epoch to your stake address, as long as your stake account is not deregistered, while keyDeposit (2 ADA) is returned upon key deregistration.

You already have them on your stake account (see [here](https://cardanoscan.io/stakeKey/084cf0adf9fe75b3e479e6c837676bb85016ae891c624cf59004a009?tab=stakekeyhistory) )

PS: There are preprod and preview networks to learn, dont need to test on mainnet chain

> **Comments:**
> **username_0**: Thank you for your response, but I don't see anything about how to deregister my stack account. Do we have a link for this or a command line?  
> **username_1**: Pretty much the [same as you registered](https://developers.cardano.org/docs/stake-pool-course/handbook/register-stake-keys/#create-a-registration-certificate), except you will now use `deregistration-certificate` instead of `registration-certificate`  
> **username_0**: Thanks for your help, I just edited the post because I'm block with the transaction now  
> **username_1**: IMO - it's best to revert the post to original and maybe raise a seperate thread for tx creation assistance, your new issue is that you dont have any funds on tx in that you're using, you need to specify valid transaction input that isn't empty  
> **username_0**: You're right, thank you for everything  

---

