I'm currently facing an issue while trying to lock my share of the liquidity pool on the blockchain. Despite successful tests in a Hardhat environment, the transaction is reverted when executed on the mainnet. The error reported is ds-math-underflow, which usually indicates an issue with arithmetic operations resulting in an underflow. However, I am confident that there are no underflows in my transactions, as all the values passed to the createVault function are identical to those in other successful transactions.

For further insight, here are the details:

Development Environment: The transaction executes successfully in Hardhat without any reverts.

Mainnet Transaction: Fails with a ds-math-underflow error.

Verification: I have confirmed the transaction approval and checked the allowances.

I have provided the code snippet via the following link for review: Code Share Link.

Additionally, here are the transaction details for reference:

Successful Transaction on Mainnet: Successful Transaction Link

Failing Transaction on Mainnet: Failing Transaction Link

The parameters used in both transactions are comparable as evident from the input data of the successful and failing transactions.

I would greatly appreciate any insights or suggestions on potential causes and solutions to resolve this issue. Thank you in advance for your support.

Best regards, Yazan Ali


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.