π Overview
Expand test coverage for the liquidity module by adding 3 new tests (Part 2 of 2).
β
Tasks
π§ͺ New Tests (3 total)
Test 1: Multiple LPs Fee Distribution
#[test]
fn test_multiple_lps_fee_distribution() {
// Multiple users add liquidity
// Swaps occur (fees collected)
// Verify fees are distributed proportionally to LP tokens
}
Test 2: Slippage Protection
#[test]
fn test_swap_slippage_protection() {
// Add liquidity
// Try swap with min_amount_out too high
// Should fail with slippage exceeded error
}
Test 3: Liquidity After Market Resolution
#[test]
fn test_liquidity_after_market_resolution() {
// Add liquidity
// Resolve market
// Verify LPs can still withdraw
// Verify no new swaps allowed
}
π Verification
π Overview
Expand test coverage for the liquidity module by adding 3 new tests (Part 2 of 2).
β Tasks
contract/tests/liquidity_tests.rsπ§ͺ New Tests (3 total)
Test 1: Multiple LPs Fee Distribution
Test 2: Slippage Protection
Test 3: Liquidity After Market Resolution
π Verification