OasisDEX / eth2dai

Eth2Dai is a fully on-chain marketplace for Ether and Dai

Home Page:https://eth2dai.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"unlocking" WETH tries to do something with an unbelievably large number of WETH

mediocregopher opened this issue · comments

I'm not actually sure what "unlocking" does, except that the frontend tells me I must do it in order to trade. I have 0.5 WETH in my metamask wallet, and when I hit the "unlock" toggle I get a popup that looks like this:

shot
shot

Not totally sure where to go from here, am happy to provide any other debug info you need.

hey @mediocregopher . Glad to have you on board.
Locking/Unlocking is basically giving approval of the OTC smart contract to execute trades on your behalf. If you checkout the internal logic of the smart contract you will gain more insight how things work.

The big number that you see comes from the value that is provided to the approve method. The value is the biggest possible value. This is the way in which "binary" switch for approval is simulated. It simply means that you don't have to worry about the amount you granted the contract to use on your behalf ever again since the number is reeeeallly big.

If you continue with the transaction you will see that you will be charged only the gas fee and nothing else.

Feel free to ask more question!