user4663: I'm participating a Token sale and in order to participate the Token sale, I need to have an undelegated ADA(because the system will take a snapshot of undelegated ADA, only the undelegated ADA will be qualify) but all of my wallet are staked. The sale is coming within 2 days before the end of the current epoch. My question is Does deregister of the staking key take effect immediately? or I need to wait until the end of epoch for it to take an effect? What if I create a new undelegated wallet and transfer $ada from my staking wallet to the undelegated wallet? the transferred $ada in the new undelegated wallet will be count as undelegated immediately right?

user2600: If you un-delegate a wallet this will happen immediately and you will get your 2 Ada staking deposit refunded as well as the current rewards sitting in your rewards sub-account.
IMPORTANTLY:  You will however also miss out on pending payments of staking rewards which have already been accrued but not yet paid.  These rewards are due to be paid over the next 2 epochs.  This is because rewards are calculated each epoch but not paid until 2 epochs later.
In other words, it is not a good idea to un-delegate your wallet if you have a significant amount of Ada staked because you will miss out on some of your accrued rewards.
On the other hand, if you send some Ada to a newly created wallet, then this sent Ada will be un-delegated in the new wallet (until you choose to delegate it).  Any residual Ada in your original wallet will continue to earn staking rewards and you will also still get paid your accrued staking rewards that had been calculated in previous epochs, but not yet paid.
If you have a large amount of Ada sitting in a wallet and you want to send it all to a new wallet then you are better off to follow these steps:

Send most of your Ada to a new wallet but leave say 10 Ada in the old wallet.

Leave this 10 Ada in your old wallet staked for another 2-3 epochs so that your accrued staking rewards can continue to be paid.

Each epoch transfer the earned rewards to your new wallet but continue to leave the 10 Ada balance.

After 2-3 epochs, your rewards will drop to dust.

Finally un-delegate your old wallet to get your 2 Ada deposit back and send the residual 10 + 2 Ada + dust rewards to your new wallet.


This way you won't miss out on some of your staking rewards.
By the way, if you do just un-delegate a staked wallet without following the steps above, then your rewards don't disappear.  They just get sent to the treasury instead which is like a donation to benefit the ecosystem.

4663: <p>I'm participating a Token sale and in order to participate the Token sale, I need to have an undelegated ADA(because the system will take a snapshot of undelegated ADA, only the undelegated ADA will be qualify) but all of my wallet are staked. The sale is coming within 2 days before the end of the current epoch. My question is Does deregister of the staking key take effect immediately? or I need to wait until the end of epoch for it to take an effect? What if I create a new undelegated wallet and transfer $ada from my staking wallet to the undelegated wallet? the transferred $ada in the new undelegated wallet will be count as undelegated immediately right?</p>
 2600: <p>If you un-delegate a wallet this will happen immediately and you will get your 2 Ada staking deposit refunded as well as the current rewards sitting in your rewards sub-account.</p>
<p>IMPORTANTLY:  You will however also miss out on pending payments of staking rewards which have already been accrued but not yet paid.  These rewards are due to be paid over the next 2 epochs.  This is because rewards are calculated each epoch but not paid until 2 epochs later.</p>
<p>In other words, it is not a good idea to un-delegate your wallet if you have a significant amount of Ada staked because you will miss out on some of your accrued rewards.</p>
<p>On the other hand, if you send some Ada to a newly created wallet, then this sent Ada will be un-delegated in the new wallet (until you choose to delegate it).  Any residual Ada in your original wallet will continue to earn staking rewards and you will also still get paid your accrued staking rewards that had been calculated in previous epochs, but not yet paid.</p>
<p>If you have a large amount of Ada sitting in a wallet and you want to send it all to a new wallet then you are better off to follow these steps:</p>
<ol>
<li><p>Send most of your Ada to a new wallet but leave say 10 Ada in the old wallet.</p>
</li>
<li><p>Leave this 10 Ada in your old wallet staked for another 2-3 epochs so that your accrued staking rewards can continue to be paid.</p>
</li>
<li><p>Each epoch transfer the earned rewards to your new wallet but continue to leave the 10 Ada balance.</p>
</li>
<li><p>After 2-3 epochs, your rewards will drop to dust.</p>
</li>
<li><p>Finally un-delegate your old wallet to get your 2 Ada deposit back and send the residual 10 + 2 Ada + dust rewards to your new wallet.</p>
</li>
</ol>
<p>This way you won't miss out on some of your staking rewards.</p>
<p>By the way, if you do just un-delegate a staked wallet without following the steps above, then your rewards don't disappear.  They just get sent to the treasury instead which is like a donation to benefit the ecosystem.</p>
