Derify Protocol Documents
English
Search
K

# Other

## How are the system's net profit and net loss calculated?

The system net profit and loss are the difference between the sum of all users' margin balance and the balance of the system liquidity pool (all users' accumulated deposit - all kinds of fees - funds withdrawal). For example ((USDT as Margin Token), the sum of all users' margin balance is 1.1 million USDT, which means the total money users are supposed to have. If the liquidity pool has a balance of 1 million USDT, the system has a net loss of 100,000 USDT while users have a net profit. If the liquidity pool has a balance of 1.1 million USDT, the system has a net profit of 100,000 USDT while users have a net loss.
The system's net profit and net loss are mainly caused by the changes in naked positions and derivative prices.

## If the system has a net loss, how can 100% of the user's funds be redeemed?

When there is a net loss in the system, if the user withdraws money, it will calculate how much the user should share the net loss of the system, and the share of the system net loss will be paid by the insurance pool. If the insurance pool doesn't have enough balance, bToken will be issued for redemption.
For example (USDT as Margin Token), the system liquidity pool has a balance of 1 million USDT, and the sum of all users' margin balance is 1.1 million USDT. Obviously, the system has a net loss of 100,000 USDT. At the same time, Alice tried to withdraw 1100 USDT, then she would bear the system net loss of 1100 * (1 - 1,000,000/1,100,000) = 100 USDT. This allocation is paid by the insurance pool and bonds, and the rest is paid by the liquidity pool. The shared loss is paid by the insurance pool and bonds, and the rest is paid by the liquidity pool.