# Hign gas fee like 180$'s solution when u stake $YFI

**URL:** <https://gov.yearn.fi/t/hign-gas-fee-like-180-s-solution-when-u-stake-yfi/90>\
**Category:** General Chat\
**Created:** [20 July 2020 11:08 UTC](https://gov.yearn.fi/t/hign-gas-fee-like-180-s-solution-when-u-stake-yfi/90 "2020-07-20T11:08:36Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![nakadaole](https://dub1.discourse-cdn.com/flex013/user_avatar/gov.yearn.fi/nakadaole/32/648_2.png) [@nakadaole](https://gov.yearn.fi/u/nakadaole)\
**Post date:** [20 July 2020 11:08 UTC](https://gov.yearn.fi/t/hign-gas-fee-like-180-s-solution-when-u-stake-yfi/90/1 "2020-07-20T11:08:36Z")

</div>

![2061595243102_.pic_hd](https://europe1.discourse-cdn.com/flex013/uploads/yearn/original/1X/f2c3b3103e44e43615d068b3827845989358da54.jpeg)

Just for notice, if this happened, means u need to # vote before staking #.

we spent the whole afternoon on this issue, found the answer is so simple,isn’t a friendly UX now.

Hope this can help u guys.

---

<div class="post-metadata">

**Author:** ![nakadaole](https://dub1.discourse-cdn.com/flex013/user_avatar/gov.yearn.fi/nakadaole/32/648_2.png) [@nakadaole](https://gov.yearn.fi/u/nakadaole)\
**Post date:** [20 July 2020 11:22 UTC](https://gov.yearn.fi/t/hign-gas-fee-like-180-s-solution-when-u-stake-yfi/90/2 "2020-07-20T11:22:57Z")

</div>

![image](https://europe1.discourse-cdn.com/flex013/uploads/yearn/original/1X/c4de99b17ea01329a89d2394631b4260404509cb.jpeg)

The UI just updated, great!

---

<div class="post-metadata">

**Author:** ![jmorris1](https://dub1.discourse-cdn.com/flex013/user_avatar/gov.yearn.fi/jmorris1/32/429_2.png) [@jmorris1](https://gov.yearn.fi/u/jmorris1)\
**Post date:** [20 July 2020 11:57 UTC](https://gov.yearn.fi/t/hign-gas-fee-like-180-s-solution-when-u-stake-yfi/90/3 "2020-07-20T11:57:35Z")

</div>

I’m on this incident right now on pool #3

I haven’t got at least 1000 BPT  
I have voted on proposal #0 and #1

I can’t unstake or exit, my balance appears as 0.

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/yearn/original/1X/b8ae7a214bcd7b848aa64575b2a1cb46eac22da4.png)

is there maybe a lock for some days (5) when voting?

---

<div class="post-metadata">

**Author:** ![nakadaole](https://dub1.discourse-cdn.com/flex013/user_avatar/gov.yearn.fi/nakadaole/32/648_2.png) [@nakadaole](https://gov.yearn.fi/u/nakadaole)\
**Post date:** [20 July 2020 12:03 UTC](https://gov.yearn.fi/t/hign-gas-fee-like-180-s-solution-when-u-stake-yfi/90/5 "2020-07-20T12:03:14Z")

</div>

no voting, no locking, don’t worry

---

<div class="post-metadata">

**Author:** ![jmorris1](https://dub1.discourse-cdn.com/flex013/user_avatar/gov.yearn.fi/jmorris1/32/429_2.png) [@jmorris1](https://gov.yearn.fi/u/jmorris1)\
**Post date:** [20 July 2020 12:22 UTC](https://gov.yearn.fi/t/hign-gas-fee-like-180-s-solution-when-u-stake-yfi/90/6 "2020-07-20T12:22:06Z")

</div>

I can’t unstake the BPT tokens. how to unstake or what’s stopping the unstake or exit?

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/yearn/original/1X/8e9d020f657098bb775bfdac54877c2e86970b1c.png)

---

<div class="post-metadata">

**Author:** ![nakadaole](https://dub1.discourse-cdn.com/flex013/user_avatar/gov.yearn.fi/nakadaole/32/648_2.png) [@nakadaole](https://gov.yearn.fi/u/nakadaole)\
**Post date:** [20 July 2020 13:20 UTC](https://gov.yearn.fi/t/hign-gas-fee-like-180-s-solution-when-u-stake-yfi/90/7 "2020-07-20T13:20:27Z")

</div>

u’ve already staked.

---

<div class="post-metadata">

**Author:** ![nakadaole](https://dub1.discourse-cdn.com/flex013/user_avatar/gov.yearn.fi/nakadaole/32/648_2.png) [@nakadaole](https://gov.yearn.fi/u/nakadaole)\
**Post date:** [20 July 2020 13:20 UTC](https://gov.yearn.fi/t/hign-gas-fee-like-180-s-solution-when-u-stake-yfi/90/8 "2020-07-20T13:20:59Z")

</div>

@jmorris1 @jmorris1 @jmorris1

---

<div class="post-metadata">

**Author:** ![milkyklim](https://avatars.discourse-cdn.com/v4/letter/m/3be4f8/32.png) [@milkyklim](https://gov.yearn.fi/u/milkyklim)\
**Post date:** [20 July 2020 16:39 UTC](https://gov.yearn.fi/t/hign-gas-fee-like-180-s-solution-when-u-stake-yfi/90/9 "2020-07-20T16:39:27Z")

</div>

Check my reply:

> [@How can I tell if I have already voted?](http://gov.yearn.fi/t/how-can-i-tell-if-i-have-already-voted/62/8):
>
> Check the require statement from governance contract. It ensures that tokens are not transferable for about 3 days. You stake tokens before you can vote. function withdraw(uint256 amount) public updateReward(msg.sender) { require(amount \> 0, "Cannot withdraw 0"); if (breaker == false) { require(voteLock[msg.sender] \< block.number,"!locked"); claimFees(); } super.withdraw(amount); emit Withdrawn(msg.sender, amount); } ref: [h…](https://etherscan.io/address/0x3A22dF48d84957F907e67F4313E3D43179040d6E#code)

You have to wait unlock period ~3 days after you’ve voted.

---

<div class="post-metadata">

**Author:** ![alexander](https://avatars.discourse-cdn.com/v4/letter/a/bc8723/32.png) [@alexander](https://gov.yearn.fi/u/alexander)\
**Post date:** [20 July 2020 16:40 UTC](https://gov.yearn.fi/t/hign-gas-fee-like-180-s-solution-when-u-stake-yfi/90/10 "2020-07-20T16:40:06Z")

</div>

There is a 3-day timelock when you vote.

`voteLock[msg.sender] = lock.add(block.number);`  
`uint public lock = 17280; // vote lock in blocks ~ 17280 3 days for 15s/block`

---

<div class="post-metadata">

**Author:** ![tianwen](https://avatars.discourse-cdn.com/v4/letter/t/ee59a6/32.png) [@tianwen](https://gov.yearn.fi/u/tianwen)\
**Post date:** [21 July 2020 03:51 UTC](https://gov.yearn.fi/t/hign-gas-fee-like-180-s-solution-when-u-stake-yfi/90/11 "2020-07-21T03:51:11Z")

</div>

what’s the mean of # vote before staking # ?

if vote first and then stake, the fee is not 0.8eth ?

I have staked and now I want to exit stake, the only way is to pay the 0.8eth fee ?

---

<div class="post-metadata">

**Author:** ![milkyklim](https://avatars.discourse-cdn.com/v4/letter/m/3be4f8/32.png) [@milkyklim](https://gov.yearn.fi/u/milkyklim)\
**Post date:** [21 July 2020 08:03 UTC](https://gov.yearn.fi/t/hign-gas-fee-like-180-s-solution-when-u-stake-yfi/90/12 "2020-07-21T08:03:59Z")

</div>

You have to wait 3 days after the voting. Once this period passes you can unstake your tokens.

If you try to unstake now you transaction will fail.

---

<div class="post-metadata">

**Author:** ![tonio09](https://avatars.discourse-cdn.com/v4/letter/t/bcef8e/32.png) [@tonio09](https://gov.yearn.fi/u/tonio09)\
**Post date:** [21 July 2020 15:32 UTC](https://gov.yearn.fi/t/hign-gas-fee-like-180-s-solution-when-u-stake-yfi/90/13 "2020-07-21T15:32:13Z")

</div>

what happens when you vote again on a different proposal or on the same proposal? Does the counter reset to 3 day lock period again? After the 3 day is over, can you unstake without paying 180$?

---

<div class="post-metadata">

**Author:** ![milkyklim](https://avatars.discourse-cdn.com/v4/letter/m/3be4f8/32.png) [@milkyklim](https://gov.yearn.fi/u/milkyklim)\
**Post date:** [21 July 2020 15:58 UTC](https://gov.yearn.fi/t/hign-gas-fee-like-180-s-solution-when-u-stake-yfi/90/14 "2020-07-21T15:58:34Z")

</div>

Every new vote starts new 3 day timer. When 3 days pass you can withdraw yes.

Note that showing 180$ price metamask indicates that transaction will fail. Solution: wait for 3 days.
