Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

frob Transaction failed in mcd-seth-01.md #69

Closed
nsouch opened this issue Jul 29, 2020 · 8 comments
Closed

frob Transaction failed in mcd-seth-01.md #69

nsouch opened this issue Jul 29, 2020 · 8 comments

Comments

@nsouch
Copy link

nsouch commented Jul 29, 2020

The frob() call failed while running the example of drawing DAI from BAT (mcd-seth-01.md).

The transactionHash is :

0x145283dbfc249b2c2c36b466d4362446f233f30e527e08effdcdf652fabac946

since it is mentionned that

This guide works under the Kovan 1.0.2 Release of the system.

could it be a compatibility issue ?
shall I send more information ?

@liberuum
Copy link
Collaborator

Hi,
Seeing from your txhash, you should frob with at least 20 Dai. As 20 Dai is the minimum amount you could draw from the system. I'd recommend you draw 25 Dai.

@nsouch
Copy link
Author

nsouch commented Jul 30, 2020

Hi, thx for your help.

new attempt failed for 25 Dai. TxHash :

0x7a749ea7bfa1663c20da5275518f3c694ee7dd9d8876aa1017ce96231fa649fb

@liberuum
Copy link
Collaborator

Hmm, try to use that on the latest kovan deployment:
https://changelog.makerdao.com/releases/kovan/1.0.9/contracts.json

@nsouch
Copy link
Author

nsouch commented Jul 30, 2020

But the addresses involded in the guide are not different between 1.0.2 and 1.0.9.

There's maybe the MCD_FLIP_BAT_A (not called by the guide but is related to BAT).
ILK_REGISTRY is new, otherwise many new collaterals are introduced and SAI is removed.

@liberuum
Copy link
Collaborator

Make sure that your $dink and $dart values are set correct. Due to seth being updated, the conversion might be a different one than in the guide.
You can set dink=$(seth --to-uint256 $(seth --to-wei 150 eth))
and dart=$(seth --to-uint256 $(seth --to-wei 25 eth))
For me it worked fine doing above.
My tx: https://kovan.etherscan.io/tx/0x72c244fd38a64b48313017311c073cfbe09eb4fb3b2919b37b1897f615ec731b

@nsouch
Copy link
Author

nsouch commented Jul 30, 2020

the frob() call succeeded with your dart calculation but the DAI balance seems incorrect :)

$ seth --to-fix 45 $(seth --to-dec $(seth call $MCD_VAT 'dai(address)(uint256)' $urn))

57280581651.654777643580824758089718844654393534456004608

Note that the rate was curious too : 327388.476393033923681366870037784
Did I miss something ? What's your rate ?

@liberuum
Copy link
Collaborator

Try removing the `$(seth --to-dec ) command. latest version of seth converts straight to a decimal number now. That's why :D

So the full list of commands without the seth --to-dec would look like this:

art=$(seth --from-wei $(seth call $MCD_VAT 'urns(bytes32,address)(uint256,uint256)' $ilk $urn | sed -n 2p))
rate=$(seth --to-fix 27 $(seth call $MCD_VAT 'ilks(bytes32)(uint256,uint256,uint256,uint256,uint256)' $ilk | sed -n 2p))
debt=$(bc<<<"$art*$rate")
debtWadRound=$(seth --to-uint256 $(bc<<<"$art*$rate*10^18/1+1"))

@nsouch
Copy link
Author

nsouch commented Jul 30, 2020

--to-dec was the problem and drawing 25 instead of 20.
rate is rather 1.024393872125548319941739518

thx a lot

@nsouch nsouch closed this as completed Jul 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants