const moveLusdGainToStabilityPoolRecipe = (dsa, frontendTagAddress) => { const spells = dsa.Spell() const lusdGainId = 1; // ID reference to the LUSD amount that is claimed const claimStakingGainsSpell = { connector: "LIQUITY-A", method: "claimStakingGains", args: [0, lusdGainId] } const depositLusdIntoStabilityPoolSpell = { connector: "LIQUITY-A", method: "stabilityDeposit", args: [ 0, // Amount to deposit. We don't specify an amount here, instead we use the reference to the LUSD gained from the previous spell frontendTagAddress, lusdGainId, // The reference to the LUSD gained in the previous spell 0, 0 ] } spells.add(claimStakingGainsSpell) spells.add(depositLusdIntoStabilityPoolSpell) await spells.cast() // Executes the recipe of spells on the user's DSA account }