Swaap safeguards could block v2 trades that breached configured pool limits
Swaap safeguards could reject a v2 trade when its proposed execution breached configured limits for oracle pricing, reserve imbalance, or performance against holding the same assets. A signed quote remained subject to applicable onchain checks before the pool allowed execution. The market-making product Swaap v2 later took the name Swaap Maker. In its November 6, 2024 operating-model announcement, Swaap announced plans to sunset Maker and Earn and focus on trading technology.
Updated onBottom line: The v2 performance threshold measured underperformance against holding assets, so it did not establish a maximum loss in dollars.
Signed Quotes and Settlement Conditions
An authorized quote signature established who supplied the proposed terms; it did not establish that the transaction had settled. Within v2 liquidity pools, quotation happened offchain while inventory and settlement stayed onchain. The settlement process assessed authenticity and performance before execution, including conditions that could change after quotation. Quote responses carried an expiration timestamp alongside execution data. That separation explained how a quote request could succeed while the associated trade later failed the pool's acceptance conditions.
Last Look and Oracle Underpricing
Last look addressed the delay between offchain pricing and onchain validation. It compared the proposed asset price with an oracle reference at settlement. A price below the pool's allowed floor could make the trade fail, even when the signer had produced an authentic quote before market conditions changed.
Price and Time Conditions
Oracle Price Floor
The price condition constrained how cheaply the pool could exchange an asset against its oracle reference. The permitted deviation belonged to the pool configuration. It limited underpricing at execution, so it should not be interpreted as a promised trading spread or a fixed fee.
Quote Expiration
Quote expiration imposed a separate time boundary. An unexpired quote could still fall below the oracle-price floor. Conversely, an acceptable price did not extend the expiration timestamp.
Oracle checks compared prices available at settlement. They could not establish the asset's future price or prevent a later market decline.
Drawdown Against the Holding Benchmark
The drawdown circuit breaker evaluated pool performance against holding assets over the applicable epoch. Its calculation compared oracle-valued reserves per pool token with the benchmark reserves for that epoch. HODL meant holding those assets outside the market-making strategy. A failed performance test caused the proposed trade to revert.
Underperformance against holding measured the strategy's relative result, so it did not establish a maximum loss in dollars. Both the pool and the held assets could decline in market value. A passing relative-performance check could coexist with an absolute loss because the test compared those positions using the same valuation basis.
Rebalancing trades had a specific exception in the v2 contract. It skipped the performance test when the post-trade output reserve per pool token remained at or above its holding reference and the input reserve remained at or below its reference. The oracle-price and output-reserve checks still applied.
The performance update interval governed updates to the pool's performance reference. Its duration belonged to the pool configuration. That epoch-based measurement differed from a universal rolling window and supplied no fixed delay after which a rejected trade would become acceptable.
Token Imbalance and Reserve Floors
Allowed token imbalance constrained how far a trade could move the pool away from its reserve reference. The v2 design measured the remaining reserves of the token that the trader bought against its fee-augmented initial reserves. The proposed post-trade reserve state determined whether the trade crossed the permitted deviation.
Pool-wide valuation and token-specific reserves could lead to different judgments about the same trade. A trade could leave aggregate value within the performance threshold while taking too much of the output token. Passing the oracle-price test did not establish that the pool retained enough of the token the trader would receive.
Initial Settings and Performance Intervals
The documented v2 initial settings applied to most pools, with actual parameters belonging to each pool's configuration. They described different quantities: a price deviation, a performance deviation, and a time interval. A shared percentage symbol did not make the price and performance tests interchangeable.
| Parameter | Initial Setting for Most v2 Pools | Measurement or Configuration Bound |
|---|---|---|
| Last look | 1% allowed price deviation | Quote price against the oracle reference at execution |
| Max drawdown circuit breaker | 4% permitted underperformance against HODL | Applicable performance epoch, subject to the rebalancing exception |
| Performance update interval | 1 day | Configurable between 0.5 and 1.5 days |
| Configuration scope | Initial settings only | Each pool's permitted configuration governed execution. |
The interval had explicit documented bounds; the other rows identified starting tolerances. Governance could adjust permitted settings within preset limits. A starting value therefore did not establish the value that governed a particular later transaction.
Parameter Authority and Protocol Pauses
The Swaap Labs multisig held parameter authority in the documented v2 configuration. Pool launch limits constrained that authority, and permissions to change individual parameters could be revoked permanently. Permanent revocation removed the relevant adjustment power; it did not remove the safeguard's execution condition. The governance design also covered authorization of quote providers and protocol pauses. An authentic signature depended on an allowed signer, while an executable trade depended on protocol state and applicable safeguards.
A protocol pause could stop trading while preserving the withdrawal permission described by the v2 design. That permission did not promise a particular conversion price.
Safeguards Within Joins and Exits
Swap validation also applied inside v2 liquidity operations that changed the reserve proportions. The contract used an internal swap calculation for uneven joins and exits, then checked that swap against the same price and balance controls. A liquidity operation could therefore encounter a safeguard without arriving through a standalone swap call.
Proportional exits followed a different calculation: they returned each reserve according to the pool tokens redeemed. They did not use that internal swap-validation path. For an exit, the relevant distinction was whether it returned proportional reserves or required conversion between pool assets.
Swaap safeguards: questions and answers
Could a Trader's RFQ Tolerance Override Last Look?
A trader's RFQ tolerance did not override the pool's last-look limit. The request expressed a price tolerance for quotation, while SafeguardPool enforced its own oracle-price boundary during settlement.
Which Oracle Feeds Supported v2 Settlement Safeguards?
Swaap v2 used Chainlink price feeds for some onchain safeguards. Those feeds supplied reference prices for the applicable checks, while quote providers supplied proposed trade terms. Signature authorization served a separate purpose: establishing whether the quote came from an allowed provider.
How Did Offchain Arbitrage-Bot Detection Relate to the Pool Checks?
Offchain arbitrage-bot detection supplemented the onchain safeguards in the v2 design. The additional detection did not replace the contract's oracle-price, performance, or reserve checks that constrained trades using liquidity-provider funds.
Could Governance Transfer Safeguard Permissions to Another Address?
The v2 governance design allowed its controller to transfer administrative permissions to another address. Those powers included authority over safeguard settings. The ability to change a parameter remained subject to its preset limits and any permanent revocation of the relevant adjustment permission.
What Did the Quote's Trade-Size Checks Measure?
The v2 trade-size checks measured the input amount for given-input swaps and the output amount for given-output swaps. The contract enforced a maximum carried by the quote and a minimum linked to that maximum. An acceptable oracle price did not remove those quantity limits.
Were SafeguardPool Management Fees a Charge for Rejected Trades?
SafeguardPool management fees accrued with time, so a rejected trade was not their charging event. The calculation depended on pool-token supply, elapsed time, and the configured annual fee. Collection minted pool tokens to the multisig, which diluted existing ownership when a nonzero management fee applied.