diff --git a/projects/sdk/src/lib/silo/utils.ts b/projects/sdk/src/lib/silo/utils.ts index 05c8c8fc93..10b19372e1 100644 --- a/projects/sdk/src/lib/silo/utils.ts +++ b/projects/sdk/src/lib/silo/utils.ts @@ -181,7 +181,11 @@ export function calculateGrownStalkSeeds( * @param bdv The bdv of the deposit */ export function calculateGrownStalkStems(stemTip: ethers.BigNumber, stem: ethers.BigNumber, bdv: TokenValue) { - const deltaStem = stemTip.sub(stem); + let deltaStem = stemTip.sub(stem); + // If we have migrated stems, we need to divide by 10e6 + if (stem.gt(10 ** 6)) { + deltaStem = deltaStem.div(10 ** 6); + } if (deltaStem.lt(0)) return Silo.sdk.tokens.STALK.fromHuman("0"); // FIXME return Silo.sdk.tokens.STALK.fromBlockchain(bdv.toBigNumber().mul(deltaStem)); }