Borrowing xUSD
Last updated
Last updated
One of the most important aspects of the xUSD stable-coin ecosystem is users that borrow xUSD from CompX vaults. Without users borrowing xUSD there would be no xUSD economy.
After connecting the user wallet to the CompX dApp, the user can open the navigation pane by tapping or clicking on the button near the top right of the page that is made up of three horizontal lines. The pane will open up and the user can select the "Vaults" option.
When first opening the Vaults page, every type of collateral supported by CompX will be displayed. Each vault that hasn't been opened yet will be partially obscured by a button that says "Create Vault". The user can navigate to the appropriate collateral type and click on that button to begin the process of creating a CDP. When this button is clicked a window will pop up with configuration parameters for the CDP. Below is an example.
Having already selected the collateral type, the user can now choose how much of the token to use as collateral. In the example above, an Algo vault is being created, with 900 Algo being deposited. Up to the all of the tokens in the wallet can be deposited.
Under the "xUSD to Mint" section the amount of minted xUSD can be entered. The minimum that can be minted is 100 xUSD tokens. This is a safety precaution to prevent many tiny vaults from being created that could burden the protocol.
The maximum xUSD tokens that can be minted is determined by the collateral tokens initial collateral ratio (ICR). For Algorand backed loans, the ICR is 120%, so in the above example, the user wouldn't be able to mint more than around 200 xUSD as the ICR wouldn't be sufficient. There could also be a fringe case in which the number of xUSD tokens available in the vault have all been loaned out. In this case, the user wouldn't be able to borrow more until either additional xUSD has been added by CompX admins or one of the users with outstanding debts repays some of their debt back into the vault. In this example, 100 xUSD tokens will be minted. Note that the collateral amount, collateral ratio and liquidation price are calculated for the proposed CDP. This information allows the user to carefully decide their risk threshold when creating their vault.
To complete the CDP, click the Create vault button and sign the transactions. The collateral will leave the users wallet and the xUSD will be sent to the users wallet. The vault will now show up in the users "My Vault" section for easy access.