Skip to content

V2 factory cannot compile: anti-snipe interface is missing from bonding curve #10

Description

@koriyoshi2041

Summary

The V2 launch factory on current main does not compile independently of the known Ponstaking/Pausable dependency problem in #7 / #8.

PonsV2LaunchFactory calls PonsV2BondingCurve.exemptFromSnipeTax(...) in three places, but the checked-in bonding curve has no such function or corresponding exemption state. The deployment struct/deployer also does not pass the factory's snipeTaxStartBps or snipeTaxSeconds values into newly created curves.

Reproduction

Tested at f2e069c1bf26bde0760446ecce3cf2501cf50846 with Foundry 1.4.4 and solc 0.8.30.

Using a minimal contractsV2/foundry.toml with src = "src", libs = ["lib"], and the vendored OpenZeppelin / Uniswap remappings, compile only the factory so the unrelated Ponstaking source is excluded:

cd contractsV2
forge build src/v2/PonsV2LaunchFactory.sol --sizes

Result:

Error (9582): Member "exemptFromSnipeTax" not found or not visible after argument-dependent lookup in contract PonsV2BondingCurve.
   --> src/v2/PonsV2LaunchFactory.sol:749:13:
    |
749 |             PonsV2BondingCurve(curve).exemptFromSnipeTax(snipeTaxExemptions[i]);

The same missing member is called at the automatic creator exemptions around lines 844 and 846.

Source mismatch

The factory currently contains the configuration and launch entry points for opening-window protection:

  • snipeTaxStartBps and snipeTaxSeconds
  • setters and events
  • overloads accepting exemption lists
  • creator / creator-fee-recipient exemptions

But the checked-in PonsV2BondingCurve.sol contains none of:

  • exemptFromSnipeTax
  • currentSnipeTaxBps
  • snapshotted snipe-tax terms
  • opening-tax accounting in buy

LaunchDeployment and PonsV2LaunchDeployer.deployLaunch also omit the two tax terms, so removing only the failing calls would compile but would leave the public factory configuration inert.

Suggested resolution

Treat this as one atomic integration decision rather than adding a no-op method:

  1. Rebase the implementation in feat(v2): opening-window anti-snipe protection #1 onto current main, including its curve state/accounting and tests requested in the review; or
  2. Remove the incomplete anti-snipe surface from the factory until the curve implementation and tests are ready.

After either path, add a repository-level Foundry configuration and CI compile check. A targeted factory build would have caught this even while the experimental Ponstaking directory remained broken.

The public V2 documentation currently describes currentSnipeTaxBps(recipient) and a five-second decay as live integration behavior, while current factory source defaults to 15 seconds and current curve source exposes no such view. The docs should be reconciled with the deployed bytecode/config as part of the same fix.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions