Operation - Withdraw
The Stability Pool in the Satoshi Protocol SDK offers critical functions for managing liquidity and stability within the decentralized finance environment. It allows users to deposit and withdraw SAT stablecoins, contributing to the pool's ability to offset bad debts and providing a mechanism for earning rewards.
Key Steps:
Convert Withdrawal Amount:
Similar to deposit, use
parseUnits
to specify the amount to withdraw in the proper unit.
Execute Withdrawal Transaction:
Use the
doWithdraw
method to retrieve SAT stablecoins from the Stability Pool. This updates the user's contribution and the overall balance of the pool.
Example
Last updated