diff --git a/utils/mango.tsx b/utils/mango.tsx index a36ebac0..e5a879db 100644 --- a/utils/mango.tsx +++ b/utils/mango.tsx @@ -523,7 +523,9 @@ export async function borrowAndWithdraw( Math.ceil( borrowQuantity * Math.pow(10, mangoGroup.mintDecimals[tokenIndex]) ) - ) + ).add(new BN(1)) + // add a lamport to make sure that we don't run into rounding issues + // between borrow & withdraw const borrowInstruction = makeBorrowInstruction( programId,