Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion contracts/risk-pool/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ impl RiskPool {
};

let available_liquidity = total_deposited.saturating_sub(total_locked);
if available_liquidity <= 0 { panic_with_error!(&env, Error::Undercollateralized); }
if available_liquidity <= 0 { panic_with_error!(&env, Error::PoolDrained); }
// Issue #621: shares * total_deposited / total_shares truncates
// toward zero; if the pool has absorbed losses total_deposited
// may be tiny relative to total_shares and a small redemption
Expand Down