Skip to content

Conversation

@Neros0
Copy link
Member

@Neros0 Neros0 commented Oct 3, 2025

Description

This PR adds a fully documented swap external function to the TestAMMContract, implementing the classic constant product AMM formula (x * y = k). This enables token swapping within a selected market pool while providing slippage protection, reserve updates, and event hooks for off-chain monitoring.


✅ Key Features

  • New Swap Functionality
function swap(
    bytes32 _marketId,
    uint256 _amountIn,
    uint256 _amountOutMinimum,
    bool _zeroForOne
) external

@Neros0 Neros0 self-assigned this Oct 3, 2025
@Neros0 Neros0 added documentation Improvements or additions to documentation enhancement New feature or request labels Oct 3, 2025
@Neros0 Neros0 merged commit 1db4f75 into main Oct 3, 2025
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants