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

const lock_day = 15
const amount_input = 20000

const { amount_out, percent } = await sdk.XCetusModule.reverseRedeemNum(amount_input, lock_day)

Last updated