Position Management
The Position Management component handles user collateral positions, deposits, and nUSD minting/burning operations.
Action
Description
Function
Deposit and Mint
Deposit collateral and mint nUSD
depositAssetToMint(uint256 assetAmount, uint256 mintAmount)
Withdraw
Withdraw collateral after repaying
withdraw(address onBehalfOf, uint256 amount)
Deposit Only
Deposit collateral without minting
depositAssetToMint(uint256 assetAmount, 0)
Mint Only
Mint nUSD against existing collateral
mint(address onBehalfOf, uint256 amount)
Repay
Burn nUSD without withdrawing
burn(address onBehalfOf, uint256 amount)
Example: Deposit and Mint
Example: Withdraw After Repaying
Last updated