Smart Contract Accounts


Accounts are smart contracts created by a Manager. Each Account has an owner, which can perform the following actions:



Increase WETH balance


Decrease WETH balance


Increase USDB balance


Decrease USDB balance to pay off debt


Decrease USDB balance and transfer it to some recipient if Account has no debt


Decrease USDB balance by depositing into a Strategy


Increase USBD balance by withdrawing from a Strategy

When an Account has entered a Liquidation state, all future actions must go towards repayment. This means depositing and withdrawing collateral, borrowing, claiming, and depositing into strategies are disabled. Strategy withdrawals are also disabled and are instead performed via an automated liquidator contract that performs a Strategy withdrawal and immediately uses the funds to pay off the Account's debt.

Since the liquidation state is a multi-step process, the Account Owner can prevent their funds from being completely liquidated if they transfer USDB to their account and call the repay function to clear their debt. When an Account's debt is cleared, it is transitioned back into a Healthy state.

Last updated