lib-ethers.populatedethersredemption

Home > @mosaic/lib-ethers > PopulatedEthersRedemption

PopulatedEthersRedemption class

A redemption transaction that has been prepared for sending.

Signature:

export declare class PopulatedEthersRedemption extends PopulatedEthersMosaicTransaction<RedemptionDetails> implements PopulatedRedemption<EthersPopulatedTransaction, EthersTransactionResponse, EthersTransactionReceipt> 

Extends: PopulatedEthersMosaicTransaction<RedemptionDetails>

Implements: PopulatedRedemption<EthersPopulatedTransaction, EthersTransactionResponse, EthersTransactionReceipt>

Remarks

The Mosaic protocol fulfills redemptions by repaying the debt of Troves in ascending order of their collateralization ratio, and taking a portion of their collateral in exchange. Due to the minimum debt requirement that Troves must fulfill, some MoUSD amounts are not possible to redeem exactly.

When redeemMoUSD() is called with an amount that can't be fully redeemed, the amount will be truncated (see the redeemableMoUSDAmount property). When this happens, the redeemer can either redeem the truncated amount by sending the transaction unchanged, or prepare a new transaction by increasing the amount to the next lowest possible value, which is the sum of the truncated amount and MoUSD_MINIMUM_NET_DEBT.

Properties

PropertyModifiersTypeDescription

Amount of MoUSD the redeemer is trying to redeem.

boolean

Whether redeemableMoUSDAmount is less than attemptedMoUSDAmount.

Maximum amount of MoUSD that is currently redeemable from attemptedMoUSDAmount.

Methods

MethodModifiersDescription

Prepare a new transaction by increasing the attempted amount to the next lowest redeemable value.

Last updated