π Overview
Expand test coverage for the liquidity module by adding 3 new tests (Part 1 of 2).
β
Tasks
π§ͺ New Tests (3 total)
Test 1: Add Liquidity Creates Pool
#[test]
fn test_add_liquidity_creates_pool() {
// Create market
// Add liquidity (first provider)
// Verify pool is created with correct reserves
// Verify LP tokens are minted
}
Test 2: Remove Liquidity Burns Tokens
#[test]
fn test_remove_liquidity_burns_tokens() {
// Add liquidity
// Remove liquidity
// Verify LP tokens are burned
// Verify funds are returned
}
Test 3: Swap Updates Reserves
#[test]
fn test_swap_updates_reserves_correctly() {
// Add liquidity
// Perform swap
// Verify reserves are updated according to constant product formula
}
π Verification
π Overview
Expand test coverage for the liquidity module by adding 3 new tests (Part 1 of 2).
β Tasks
contract/tests/liquidity_tests.rsπ§ͺ New Tests (3 total)
Test 1: Add Liquidity Creates Pool
Test 2: Remove Liquidity Burns Tokens
Test 3: Swap Updates Reserves
π Verification