Stakedllc / robo-advisor-yield

The Robo-Advisor for Yield
https://staking.staked.us/ray
Other
45 stars 15 forks source link

Transaction failing when attempting to deposit to RAY #4

Closed AdvocateOne closed 4 years ago

AdvocateOne commented 4 years ago

Withdrawals working fine. Deposit to RAY results in failed transaction:

https://etherscan.io/tx/0xc13d4c1b446f8587258634765cbb9d0a5a17d689af82f16d70882343e4425ef6

dpurhar27 commented 4 years ago

Hey @AdvocateOne , it appears the deposit action is failing for you when the RAY contract attempts to take 100 Sai (old Dai) from your address.

Off the top of my head I can think of two reasons this is failing.

  1. You don't have a balance of at least 100 Sai (at the time of these attempted deposits). I believe the address of deposit only had 99.996100458765930092 Sai at the time of this noted deposit.

  2. You haven't given the RAY contract allowance to take 100 Sai. If you're interacting with RAY through the RAY GUI, then this shouldn't be an issue. I've checked the allowance for your address, and this is not** the issue, so I believe it's 1.

Let me know if 1. is the cause, thanks!

AdvocateOne commented 4 years ago

I don't think that is the problem. It appears that the contract only accepts DAI now (not SAI). But when I attempt to deposit 100 DAI (and I have 105 DAI available), the transaction fails.

Edit: I think I understand the problem now. The RAY deposit interface currently shows you available DAI (not SAI) for deposit. But the RAY contract only accepts SAI.

dpurhar27 commented 4 years ago

Ah ok. The transactions were failing because there wasn't enough Sai available in the address (just under 100 Sai), but the source of confusion issue is the RAY GUI detects an addresses Dai balance, not Sai, when on a Sai RAY token view.

Sorry for the inconvenience, and thanks for raising this issue. I'll circle this back to the team and have it fixed.

AdvocateOne commented 4 years ago

Yep, that's it. Thanks.