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

"ExecutionError": "Smart contract panicked: panicked at 'attempt to subtract with overflow' #185

Open
guiltyangel opened this issue Jun 10, 2022 · 5 comments

Comments

@guiltyangel
Copy link

Hi, I need a technical support.
The bond (1 NEAR/ proposal) should be returned after they did vote approve/ reject, however, I am having 02 Vote Approve but I just received the reward (0.5 NEAR/ proposal) and not received the BOND yet.

My 02 Proposal IDs are 5205 and 5238:

Hope to hear your feedback.

@RasmusTheOnlyOne
Copy link

Have you received the bond for the proposals that has been rejected/expired and finalized?

@guiltyangel
Copy link
Author

Only 02 Proposal IDs 5205 and 5238 with Approve facing this issue.
My another Proposal IDs had executed yesterday that work well, event Approve/ Rejected / Finalized.

@AngelBlock
Copy link
Contributor

@ctindogaru any hints?

@starpause
Copy link
Contributor

starpause commented Jun 23, 2022

In https://t.me/astro_near Oleg Kalenik speculates: seems like the locked_amount is being calculated wrong

at the moment of this tx the locked amount was 99290000000000000000000. So trying to return bond 1000000000000000000000000 fails

It might’ve started happening after this fix - 2da4bc5. However I’m not sure whether the value was correct before.

@starpause
Copy link
Contributor

starpause commented Jun 23, 2022

Via Constantin:

I've experienced this error in the past (where locked_amount was computed wrong).

If u upgrade a v2 to v3 dao, how locked amount is computed has changed between the versions, which causes the locked amount to no longer be accurate. That is what causes this error for a few proposals.

A PR was introduced to compute it right (more context/discussion): #68

If you create your dao from scratch with the v3 code it works fine. Once a DAO is on v3 it will also work fine for new proposals.

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

4 participants