# Calculates the reverse redemption

`reverseRedeemNum` calculates the reverse redemption amount and percentage based on the input amount and lock day.

It uses a mathematical model to determine the redemption percentage, and then calculates the amount out based on this percentage.

#### Function Parameters

* amount\_input: the amount to redeem
* lock\_day: the number of days to lock the amount for

**Output Result**

* amount\_out: The redemption amount
* percent:  the final redemption percentage

<pre class="language-typescript"><code class="lang-typescript"><strong>const lock_day = 15
</strong>const amount_input = 20000

const { amount_out, percent } = await sdk.XCetusModule.reverseRedeemNum(amount_input, lock_day)
</code></pre>
