Problem
Similar to the deposit method, the withdraw method constructs and submits a transaction immediately without utilizing Soroban's simulation endpoint first to check for execution failures.
Expected behavior
The withdraw method simulates the transaction. If it fails (e.g., due to an insufficient ysToken balance), it throws a descriptive error protecting the user from paying a failed gas fee.
Files to update
Project relevance
Ensures capital efficiency for Keepers and LPs by providing immediate, off-chain feedback before on-chain submission occurs.
Acceptance criteria
Problem
Similar to the deposit method, the
withdrawmethod constructs and submits a transaction immediately without utilizing Soroban's simulation endpoint first to check for execution failures.Expected behavior
The
withdrawmethod simulates the transaction. If it fails (e.g., due to an insufficient ysToken balance), it throws a descriptive error protecting the user from paying a failed gas fee.Files to update
src/modules/vault.tsProject relevance
Ensures capital efficiency for Keepers and LPs by providing immediate, off-chain feedback before on-chain submission occurs.
Acceptance criteria
buildAndSubmitis invoked