Smart Contract Accounts

Accounts

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

ActionOutcome

Deposit

Increase WETH balance

Withdraw

Decrease WETH balance

Borrow

Increase USDB balance

Repay

Decrease USDB balance to pay off debt

Claim

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

StrategyDeposit

Decrease USDB balance by depositing into a Strategy

StrategyWithdraw

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