Implement the swap logic.
You must calculate the output amount using curve math. If the user deposits amount_in of Token A, how much Token B do they get so that x * y = k is respected? (Hint: don't forget to subtract your protocol fee first!)
Use a standard CPI to transfer Token A from the user to vault_a.
Use CpiContext::new_with_signer to transfer Token B from vault_b back to the user. Because the vault is owned by the PDA, the PDA must "sign" the transaction.
let seeds = &[
b"amm".as_ref(),
// ... other seeds
&[bump],
];
let signer_seeds = &[&seeds[..]];
let cpi_ctx = CpiContext::new_with_signer(cpi_program, cpi_accounts, signer_seeds);
token::transfer(cpi_ctx, amount_out)?;