Operation - Deposit
Key Steps
Convert Collateral Amount:
Convert the desired amount of collateral into Wei using the
parseEther
function from theviem
library. This ensures that the amount is in the smallest denomination of ether, which is necessary for precise blockchain transactions.
Record the Deposit:
Once the transaction is confirmed, record the deposit within the protocol by calling the
doDeposit
function. This step updates the user's trove to reflect the added collateral, which could affect their minting capacity and collateral-to-debt ratio.
Usage
This function is typically used when a user wishes to:
Increase Minting Capacity: By adding more collateral, a user can safely mint more satUSD stablecoins while maintaining a healthy collateral-to-debt ratio.
Enhance Financial Security: More collateral in a trove provides a larger buffer against potential liquidation in case of market volatility.
Example
Last updated