In the Curve StableSwap-NG implementation examined here, A_precise() returns the current amplification in precise units, while A() divides it by 100 and truncates. During a ramp, future_A stores the destination, which can differ from both current getters. Internal swap math uses current precise A, so reconstruct it with the ramp timestamps and the timestamp of the block being read.
A pool showing a target of 200 can still be operating around 125 on that public scale. Conversely, an integer display that stays at 125 does not establish that the precise value stopped changing. The missing information is the clock and the precision convention.
The examples follow Curve's plain-pool implementation at commit 3332cd4, checked on 28 October 2026. All pool states below are hypothetical. For the economic role of amplification, start with the constant-product versus StableSwap comparison; here, the task is to identify the parameter used at a particular moment.
Read the endpoints before interpreting the display
Curve's plain-pool API documentation describes six relevant reads. Four hold the schedule; two evaluate its current result.
| Read | Interpretation in this implementation |
|---|---|
initial_A | Starting endpoint in precise units |
future_A | Scheduled endpoint in precise units |
initial_A_time | Starting timestamp |
future_A_time | Ending timestamp |
A_precise() | Current interpolated precise value |
A() | Current precise value divided by 100, truncated |
The endpoints are not a history of every intermediate value. A ramp can leave them untouched while its evaluated current A changes as later block timestamps are used. Before the ending timestamp, the calculation advances proportionally through the scheduled interval. At or after the end, it returns the destination. The pinned pool source's amplification routine establishes that behavior.
One precise unit is 0.01 on the public scale. Keep the raw values beside any formatted display: calling both 12,518 and 125 “A” without recording the scale makes two consistent readings look contradictory. Dividing the stored target by 100 changes its units; it remains a target.
Follow a constructed 24-hour ramp
Consider a hypothetical two-coin pool whose earlier ramp was stopped at a precise value of 10,025. That corresponds to 100.25 on the untruncated public scale, although A() reports 100. Assume the required waiting period after that stop has passed.
At a new starting timestamp, t0, the authorized administrator schedules public target 200 for t0 plus 86,400 seconds. The argument to ramp_A is 200, not 20,000 or 200.25. The function stores 20,000 after multiplying the whole-unit input by 100.
This constructed schedule fits the pinned implementation's constraints: the target is positive and below one million, the duration is at least 86,400 seconds, and 20,000 is no more than ten times 10,025. Starting a new ramp also requires at least 86,400 seconds since the stored starting timestamp. These are reference-code checks, not evidence that an arbitrary deployed contract accepts a proposed change. Curve's documented ramp controls.
During this upward ramp, the total precise-unit difference is 9,975. Multiply that difference by elapsed seconds, divide by 86,400 using integer division, then add the result to 10,025.
| Elapsed since t0 | A_precise() | Precise value ÷ 100 | A() |
|---|---|---|---|
| Start | 10,025 | 100.25 | 100 |
| 1 hour | 10,440 | 104.40 | 104 |
| 6 hours | 12,518 | 125.18 | 125 |
| 12 hours | 15,012 | 150.12 | 150 |
| 18 hours | 17,506 | 175.06 | 175 |
| 23 hours, 59 minutes, 59 seconds | 19,999 | 199.99 | 199 |
| 24 hours | 20,000 | 200.00 | 200 |
These illustrative rows follow the stipulated endpoints. They describe the parameter schedule, not swap outputs.
At six hours, elapsed time is 21,600 seconds. The increment calculation is 9,975 × 21,600 / 86,400, which is 2,493.75 before truncation. Integer division produces 2,493, giving 12,518 precise units. Dividing that by 100 gives 125.18; applying the whole-number getter gives 125.
Three different labels now have clear meanings: current precise A is 12,518, current A() is 125, and the still-scheduled target is 20,000 precise units. Substituting the target would move this observation eighteen hours ahead of its own schedule.
The precise value changes in whole precise units. One second after t0, the integer increment is still zero in this example. Even the more detailed getter need not change every second. The larger one-unit steps seen in A() discard another layer of detail.
Check subtraction when amplification falls
A downward ramp floors the positive decrement before subtracting it from the starting endpoint, as the pinned interpolation branches show. Flooring a floating-point interpolation's final result can be off by one precise unit.
For a separate hypothetical example, start at 20,025 precise units and schedule public target 100, stored as 10,000, over 86,400 seconds. After six hours the real-number decrement would be 2,506.25. Subtracting the integer decrement of 2,506 gives 17,519 precise units.
A spreadsheet that instead computes the real-number endpoint 17,518.75 and rounds it down would produce 17,518. Both would display 175 through A(), so checking only the coarse getter would hide the mismatch. Preserve the operation order when validating precise readings.
Branch the timeline at an early stop
Return to the upward 10,025-to-20,000 schedule. In an alternative hypothetical branch, the administrator successfully calls stop_ramp_A() exactly six hours after t0.
The method captures current precise A, places that value in both endpoints and sets both timestamps to the stopping time. That leaves no remaining journey to the old destination. Curve documents the stop operation and its stored-state changes.
| Observation after the six-hour point | Original ramp continues | Ramp was stopped at six hours |
|---|---|---|
| Current precise A at 12 hours | 15,012 | 12,518 |
| Stored future A at 12 hours | 20,000 | 12,518 |
| Public getter at 24 hours | 200 | 125 |
In the stopped branch, the old 24-hour target is no longer pending. An interface that keeps displaying “target 200” from the earlier scheduling event would be stale even if it correctly retrieved the new current getter.
The frozen state can retain fractional public-scale precision indefinitely: 12,518 precise units means 125.18, while the getter remains 125. A fractional precise value therefore does not by itself prove that a ramp is active.
Because stopping rewrites initial_A_time, the next ramp must satisfy the wait measured from that new timestamp. The pinned administrative functions establish this interaction. In this branch, the earliest permitted restart is the stopping time plus 86,400 seconds, subject to the other checks. Reconstruct the final state after all successful administrative calls before projecting a future value.
The distinction resembles other stored-state questions, but the update mechanism matters. Uniswap v2 kLast versus current k follows event-written checkpoints; the running NG ramp evaluates a timestamp-dependent value between administrative writes.
Follow the actual quote path too
The pinned pool's internal swap path uses current precise A. Check the auxiliary quote implementation separately.
The Views contract at the same commit reconstructs amplification for get_dy using A() × 100. At the six-hour observation above, this reconstructs 12,500 rather than 12,518. Multiplication restores the scale but cannot restore the discarded remainder.
The pool delegates its public quote call to the factory's selected Views implementation. For a real investigation, identify that selected contract at the same block rather than assuming the repository's helper is installed everywhere. The official Views documentation also shows why this separate component belongs in the record.
This example checks an amplification-input difference only. It does not quantify an output difference or establish whether a particular trade would fail its minimum output. That would require the actual quote and execution paths, token amounts, fees and rounding.
Correct amplification is only one input. The raw balances versus normalized xp ledger explains the units supplied to invariant math. The last price versus price-oracle guide handles a different clock: averaging pool prices does not identify which A applies to a swap.
Keep the paper convention in a separate column
Do one notation check when comparing this ramp with a paper or simulator. The original StableSwap paper expresses its amplification coefficient using the coin count raised to that count. The code's precise input is not interchangeable with that paper parameter.
For the two-coin six-hour example, the corresponding continuous-equation coefficient is 2 × 12,518 / 100, or 250.36. Under the earlier article's convention C = 4 × paper A, paper A is 62.59. Those labels reconcile one coefficient. Keep that notation check separate from the exact integer ramp calculation.
Save one reproducible ramp record
Use a named block for the reads. Ethereum's JSON-RPC documentation specifies a block parameter for eth_call; obtain that block's timestamp instead of substituting your laptop's current time. Save its hash as well as its height. The one-block snapshot guide explains why grouping requests alone does not establish a consistent observation.
| Record | Validation |
|---|---|
| Chain, pool and implementation | Match the precise source behavior being reconstructed |
| Block number, hash and timestamp | Anchor the observation and the ramp clock |
| Both endpoint values and timestamps | Establish direction, interval and any completed or stopped state |
| Both current getters | Check exact interpolation, then the separate division by 100 |
| Latest successful ramp or stop calls | Explain the stored schedule and replace superseded targets |
| Selected Views implementation | Identify precision used by the quote path |
If the reconstruction disagrees, first check units, timestamp alignment, downward subtraction and intervening administrative calls. Leave the discrepancy visible until those inputs agree. A complete ramp record should let another reader reproduce the current precise value, its truncated display and the destination that remains scheduled.
