PathrockNetwork Gno Explorer
HomeBlocksTransactionsRealmsPackagesValidatorsAnalytics

PathrockNetwork Gno Explorer — an independent explorer for Gno.land Mainnet (gnoland-1), operated by PathrockNetwork. Not an official Gno.land service.

gnowebarchive RPC

gno.land/r/gnoswap/pool

Realm
Open in gnoweb ↗

Overview

Kind
Realm (renderable)
Name
pool
Namespace
gnoswap
Files
14 (README)(gnomod.toml)
Exported functions
90
Module
gno.land/r/gnoswap/pool
gno
0.9

Files (14)

  • README.mdmarkdown
  • gnomod.tomltoml
  • errors.gnogno
  • getter_utils.gnogno
  • getter.gnogno
  • oracle.gnogno
  • pool.gnogno
  • proxy.gnogno
  • render.gnogno
  • state.gnogno
  • store.gnogno
  • types.gnogno
  • upgrade.gnogno
  • utils.gnogno
README.mdPreviewRaw
# Pool

Concentrated liquidity AMM pools with tick-based pricing.

## Overview

Pool contracts implement Uniswap V3-style concentrated liquidity, allowing LPs to provide liquidity within custom price ranges for maximum capital efficiency.

## Gnoweb

The root `Render("")` delegates to the active implementation and shows realm identity, halt flags, stored pool count, creation and withdrawal fees, the four fee tiers and tick spacings, and separate token0/token1 protocol-fee denominators.

GNS creation fees use six-decimal base units; withdrawal fees use basis points and swap fee tiers use pips. Rendering reads stored counts and fixed configuration without traversing pools. Unsupported paths return `404`.

## Configuration

- **Pool Creation Fee**: 100 GNS (default)
- **Protocol Fee**: Disabled (0) or a denominator of 4-10, routing 1/4 to
  1/10 of swap fees to the protocol
- **Withdrawal Fee**: 1% on fee-bearing collection (configurable)
- **Fee Tiers**: 0.01%, 0.05%, 0.3%, 1%
- **Tick Spacing**: Auto-set by fee tier
- **Max Liquidity Per Tick**: Depends on tick spacing; use
  `GetMaxLiquidityPerTick` rather than `2^128 - 1`

## Core Concepts

### Concentrated Liquidity

Liquidity providers concentrate capital within custom price ranges instead of 0-∞. This allows LPs to allocate capital where it's most likely to generate fees - near the current price for volatile pairs, or within tight ranges for stable pairs. Capital efficiency can improve by orders of magnitude depending on range selection and pair volatility. For more details, check out [GnoSwap Docs](https://docs.gnoswap.io/core-concepts/amm/concentrated-liquidity).

### Tick System

- Price space divided into discrete ticks (0.01% apart)
- Each tick represents ~0.01% price change
- Positions defined by upper/lower tick boundaries
- Liquidity activated only when price in range

## Key Functions

### `CreatePool`

Deploys a new trading pair.

- Requires 100 GNS creation fee by default
- Valid fee tier required
- Accepts either token path order and canonicalizes token0/token1
- If paths are reversed, the initial square-root price is inverted
- Initial `sqrtPriceX96` must be in `[MIN_SQRT_RATIO, MAX_SQRT_RATIO)`
- Does not compare the initial price with an oracle or external market price

### `Mint`

Adds liquidity to position (called by Position contract).

- Calculates token amounts from liquidity
- Updates tick bitmap
- Transfers tokens from owner
- Returns actual amounts used

### `Burn`

Removes liquidity without collecting tokens.

- Pool-level operation: burn first, then collect owed tokens
- Calculates owed principal
- Updates position state

### `Collect`

Pays tokens owed by a pool position without a withdrawal fee. This fee-free
path is normally used for principal after `Burn`.

- Transfers the requested portion of `tokensOwed`
- Updates `tokensOwed`

### `CollectSwapFee`

Pays accrued swap fees through the fee-bearing collection path.

- Applies the configured withdrawal fee
- Returns gross collected amounts and the fee withheld
- `Position.DecreaseLiquidity` and `Position.CollectFee` invoke the appropriate
  pool paths internally

### `Swap`

Core swap execution (called by Router).

- Iterates through ticks
- Updates price and liquidity
- Calculates fees
- Maintains TWAP oracle

#### Swap Callback

The `Swap` function uses a callback pattern for token transfers, following the Uniswap V3 flash swap design.

**Callback Signature**:

```go
func swapCallback(cur realm, amount0Delta, amount1Delta int64, _ *pool.CallbackMarker) error
```

**Delta Convention**:
| Delta | Meaning |
|-------|---------|
| Positive (`> 0`) | Amount the pool must RECEIVE (input token) |
| Negative (`< 0`) | Amount the pool has SENT (output token) |

**Swap Direction Examples**:

For `zeroForOne = true` (token0 → token1):

- `amount0Delta > 0`: Pool receives token0 (input)
- `amount1Delta < 0`: Pool sends token1 (output)

For `zeroForOne = false` (token1 → token0):

- `amount0Delta < 0`: Pool sends token0 (output)
- `amount1Delta > 0`: Pool receives token1 (input)

**Callback Implementation Example**:

```go
func swapCallback(cur realm, amount0Delta, amount1Delta int64, _ *pool.CallbackMarker) error {
    caller := cur.Previous().Address()
    poolAddr := chain.PackageAddress("gno.land/r/gnoswap/pool")

    // Security check: ensure this callback is invoked by the legitimate pool
    if caller != poolAddr {
        return errors.New("unauthorized caller")
    }

    if amount0Delta > 0 {
        // Transfer token0 to pool
        common.SafeGRC20Transfer(0, cur, token0Path, poolAddr, amount0Delta)
    }
    if amount1Delta > 0 {
        // Transfer token1 to pool
        common.SafeGRC20Transfer(0, cur, token1Path, poolAddr, amount1Delta)
    }
    return nil
}
```

**Important Notes**:

- A custom callback should verify that the caller is the legitimate pool.
- In the router flow, the supplied closure performs that pool-origin check
  before calling `router.SwapCallback`; the Router implementation then checks
  that its caller is Router v1.
- The callback MUST transfer at least the positive delta amount to the pool.
- Return `nil` on success, or an error to revert the swap.
- Pool validates the balance increase after callback execution.

## Technical Details

### Price Math

**Q96 Format**: Prices stored as `sqrtPriceX96 = sqrt(price) * 2^96`

```
Price 1:1   → sqrtPriceX96 = 79228162514264337593543950336
Price 1:4   → sqrtPriceX96 = 39614081257132168796771975168
Price 100:1 → sqrtPriceX96 = 792281625142643375935439503360
```

**Tick to Price**: `price = 1.0001^tick`

```
tick 0     = price 1
tick 6932  = price ~2
tick -6932 = price ~0.5
```

**Range Liquidity**:

Liquidity is calculated from the token required by the current price:

- Below the range (`current < lower`): token0 only
- In the range (`lower <= current < upper`): both token0 and token1
- Above the range (`current >= upper`): token1 only

The integer formulas use the square-root prices and round in the direction
required by the mint or burn operation; there is no single `amount` formula
that applies to all three cases.

**Impermanent Loss**:

- Narrow range: Higher fees, higher IL
- Wide range: Lower fees, lower IL
- Stable pairs: ±0.1% ranges optimal
- Volatile pairs: ±10%+ ranges recommended

### Fee Mechanics

**Swap Fees**:

- Charged on input amount
- Accumulates as feeGrowthGlobal
- Distributed pro-rata to in-range liquidity

**Fee Calculation**:

```
fees = feeGrowthInside * liquidity
feeGrowthInside = feeGrowthGlobal - feeGrowthOutside
```

**Protocol fees**:

- `0` disables protocol fee collection
- `4` through `10` are denominators: `4` routes 25% and `10` routes 10% of
  swap fees to the protocol
- Governance-managed configuration applies to the pool set, not an independent
  percentage selected on each pool

## Security

### Reentrancy Protection

- The live guard is the pool-wide `Unlocked` key in the pool KV store, managed
  by `pool/v1/lock.gno`. `Slot0.unlocked` is a separate stored field and is not
  the guard; `GetSlot0Unlocked` reports that field, not the live lock.
- The lock is not swap-specific. `CreatePool`, `Mint`, `Burn`, `Collect`,
  `CollectSwapFee`, `CollectProtocol`, `SetFeeProtocol`, `SetWithdrawalFee`,
  `SetPoolCreationFee`, `IncreaseObservationCardinalityNext`,
  `SetSwapStartHook`, `SetSwapEndHook`, `SetTickCrossHook`, `Swap`, and the
  read-only `DrySwap` all assert that the pool is unlocked before doing any
  work.
- The unlocked assertion is read-only and runs before the access checks, so a
  call that aborts on authorization leaves no persisted lock behind.
- Settlement order is operation-specific rather than uniformly
  checks-effects-interactions. `Swap` settles optimistically through the
  callback and verifies the resulting balance increase afterwards, while `Mint`
  pulls tokens before its final pool save. Review the specific path rather than
  assuming every write precedes every external call.

### Price Manipulation

- TWAP oracle provides time-weighted observations for monitoring; it is not an
  automatic initial-price guard
- Large swaps limited by liquidity
- Slippage protection required

### Pool Creation Griefing

**Issue**: `CreatePool` validates the fee tier, token canonicalization, and
square-root price bounds, but does not compare the initial price with an
oracle or external market price. A pool can therefore be created at an
economically inappropriate extreme price.

**Impact**:

- Pool may be temporarily unusable
- No rational LP may provide liquidity at a distorted price
- Price cannot self-correct without liquidity

**Recovery Mechanism**:
Recovery requires coordinated liquidity provision and swaps to move the price
toward a desired market rate, followed by liquidity removal. The protocol does
not perform this correction automatically, and profitability depends on market
conditions, fees, and slippage.

**Example Recovery Sequence**:

This pseudocode assumes the integrating realm function has a current `cur` token.

```
// Illustrative sequence; the caller must compose and execute these operations
1. position.Mint(cross(cur), ..., fullRange, largeAmount, ...)  // Add liquidity
2. router.ExactInSwapRoute(cross(cur), ..., targetRoute, ...)    // Fix price via arbitrage
3. position.DecreaseLiquidity(cross(cur), positionId, ...)       // Remove liquidity and collect principal
4. position.CollectFee(cross(cur), positionId)                   // Collect any remaining fees
```

**Prevention**:

- 100 GNS creation fee provides deterrent
- Consider implementing price oracle validation for high-value pairs
- Monitor pool creation events for suspicious activity

### Rounding

- Integer math rounds directionally for the input/output invariant; not every
  division rounds down
- Minimum liquidity enforced
- Full precision for amounts

Functions

  • Burn(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, token0Path string, token1Path string, fee uint32, tickLower int32, tickUpper int32, liquidityAmount string, positionCaller string) (string, string)

  • Collect(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, token0Path string, token1Path string, fee uint32, recipient string, tickLower int32, tickUpper int32, amount0Requested string, amount1Requested string) (string, string)

  • CollectProtocol(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, token0Path string, token1Path string, fee uint32, recipient string, amount0Requested string, amount1Requested string) (string, string)

  • CollectSwapFee(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, token0Path string, token1Path string, fee uint32, recipient string, tickLower int32, tickUpper int32, amount0Requested string, amount1Requested string) (amount0 string, amount1 string, fee0 string, fee1 string)

  • CreatePool(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, token0Path string, token1Path string, fee uint32, sqrtPriceX96 string)

  • DecodeTickKey(key string) int32

  • DefaultObservation() struct{blockTimestamp int64; tickCumulative int64; secondsPerLiquidityCumulativeX128 string; initialized bool}

  • DrySwap(token0Path string, token1Path string, fee uint32, zeroForOne bool, amountSpecified string, sqrtPriceLimitX96 string) (string, string, interface {Error func() string})

  • EncodePositionKey(tickLower int32, tickUpper int32) string

  • EncodeTickKey(tick int32) string

  • ExistsPoolPath(poolPath string) bool

  • GetBalances(poolPath string) (int64, int64, interface {Error func() string})

  • GetBalanceToken0(poolPath string) (int64, interface {Error func() string})

  • GetBalanceToken1(poolPath string) (int64, interface {Error func() string})

  • GetFee(poolPath string) (uint32, interface {Error func() string})

  • GetFeeAmountTickSpacing(fee uint32) (spacing int32, err interface {Error func() string})

  • GetFeeAmountTickSpacings() map[uint32]int32

  • GetFeeGrowthGlobal0X128(poolPath string) (string, interface {Error func() string})

  • GetFeeGrowthGlobal1X128(poolPath string) (string, interface {Error func() string})

  • GetFeeGrowthGlobalX128(poolPath string) (string, string, interface {Error func() string})

  • GetImplementationPackagePath() string

  • GetInitializedTicksInRange(poolPath string, tickLower int32, tickUpper int32) ([]int32, interface {Error func() string})

  • GetLiquidity(poolPath string) (string, interface {Error func() string})

  • GetObservationAt(poolPath string, index uint16) (struct{blockTimestamp int64; tickCumulative int64; secondsPerLiquidityCumulativeX128 string; initialized bool}, interface {Error func() string})

  • GetPendingProtocolFees() map[string]int64

  • GetPoolCreationFee() int64

  • GetPoolPath(token0Path string, token1Path string, fee uint32) string

  • GetPoolPositions(poolPath string) *gno.land/p/nt/bptree/rotree/v0.ReadOnlyTree

  • GetPools() *gno.land/p/nt/bptree/rotree/v0.ReadOnlyTree

  • GetPositionFeeGrowthInside0LastX128(poolPath string, key string) (string, interface {Error func() string})

  • GetPositionFeeGrowthInside1LastX128(poolPath string, key string) (string, interface {Error func() string})

  • GetPositionFeeGrowthInsideLastX128(poolPath string, key string) (string, string, interface {Error func() string})

  • GetPositionLiquidity(poolPath string, key string) (string, interface {Error func() string})

  • GetPositionTokensOwed(poolPath string, key string) (int64, int64, interface {Error func() string})

  • GetPositionTokensOwed0(poolPath string, key string) (int64, interface {Error func() string})

  • GetPositionTokensOwed1(poolPath string, key string) (int64, interface {Error func() string})

  • GetProtocolFeesToken0(poolPath string) (int64, interface {Error func() string})

  • GetProtocolFeesToken1(poolPath string) (int64, interface {Error func() string})

  • GetProtocolFeesTokens(poolPath string) (int64, int64, interface {Error func() string})

  • GetSlot0(poolPath string) struct{sqrtPriceX96 *gno.land/p/gnoswap/uint256/v1.Uint; tick int32; feeProtocol uint8; unlocked bool; observationIndex uint16; observationCardinality uint16; observationCardinalityNext uint16}

  • GetSlot0FeeProtocol(poolPath string) (uint8, interface {Error func() string})

  • GetSlot0SqrtPriceX96(poolPath string) (string, interface {Error func() string})

  • GetSlot0Tick(poolPath string) (int32, interface {Error func() string})

  • GetSlot0Unlocked(poolPath string) (bool, interface {Error func() string})

  • GetTickBitmaps(poolPath string, wordPos int16) (string, interface {Error func() string})

  • GetTickCumulativeOutside(poolPath string, tick int32) (int64, interface {Error func() string})

  • GetTickFeeGrowthOutside0X128(poolPath string, tick int32) (string, interface {Error func() string})

  • GetTickFeeGrowthOutside1X128(poolPath string, tick int32) (string, interface {Error func() string})

  • GetTickFeeGrowthOutsideX128(poolPath string, tick int32) (string, string, interface {Error func() string})

  • GetTickInfo(poolPath string, tick int32) (struct{liquidityGross string; liquidityNet string; feeGrowthOutside0X128 string; feeGrowthOutside1X128 string; tickCumulativeOutside int64; secondsPerLiquidityOutsideX128 string; secondsOutside uint32; initialized bool}, interface {Error func() string})

  • GetTickInitialized(poolPath string, tick int32) (bool, interface {Error func() string})

  • GetTickLiquidityGross(poolPath string, tick int32) (string, interface {Error func() string})

  • GetTickLiquidityNet(poolPath string, tick int32) (string, interface {Error func() string})

  • GetTickSecondsOutside(poolPath string, tick int32) (uint32, interface {Error func() string})

  • GetTickSecondsPerLiquidityOutsideX128(poolPath string, tick int32) (string, interface {Error func() string})

  • GetTickSpacing(poolPath string) (int32, interface {Error func() string})

  • GetToken0Path(poolPath string) (string, interface {Error func() string})

  • GetToken1Path(poolPath string) (string, interface {Error func() string})

  • GetWithdrawalFee() uint64

  • IncreaseObservationCardinalityNext(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, token0Path string, token1Path string, fee uint32, cardinalityNext uint16)

  • MakeObservation(blockTimestamp int64, tickCumulative int64, secondsPerLiquidityCumulativeX128 string, initialized bool) struct{blockTimestamp int64; tickCumulative int64; secondsPerLiquidityCumulativeX128 string; initialized bool}

  • Mint(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, token0Path string, token1Path string, fee uint32, tickLower int32, tickUpper int32, liquidityAmount string, positionCaller string) (string, string)

  • NewCallbackMarker() *gno.land/r/gnoswap/pool.CallbackMarker

  • NewDefaultFeeAmountTickSpacing() map[uint32]int32

  • NewDefaultPositionInfo() struct{liquidity string; feeGrowthInside0LastX128 string; feeGrowthInside1LastX128 string; tokensOwed0 int64; tokensOwed1 int64}

  • NewObservationsTree() *gno.land/p/nt/bptree/v0.BPTree

  • NewObservationTree() *gno.land/r/gnoswap/pool.ObservationTree

  • NewPool(token0Path string, token1Path string, fee uint32, sqrtPriceX96 *gno.land/p/gnoswap/uint256/v1.Uint, tickSpacing int32, tick int32, slot0FeeProtocol uint8) *gno.land/r/gnoswap/pool.Pool

  • NewPoolObservationsTree(currentTime int64) *gno.land/r/gnoswap/pool.ObservationTree

  • NewPoolPositionsTree() *gno.land/p/nt/bptree/v0.BPTree

  • NewPoolStore(kvStore interface {AddAuthorizedCaller func(int, .uverse.realm, .uverse.address, gno.land/p/gnoswap/store/v1.Permission) .uverse.error; Delete func(int, .uverse.realm, string) .uverse.error; Get func(string) (interface {}, .uverse.error); GetAddress func(string) (.uverse.address, .uverse.error); GetAllKeys func() ([]string, .uverse.error); GetAuthorizedCallers func() (map[.uverse.address]gno.land/p/gnoswap/store/v1.Permission, .uverse.error); GetBPTree func(string) (*gno.land/p/nt/bptree/v0.BPTree, .uverse.error); GetBool func(string) (bool, .uverse.error); GetDomainAddress func() .uverse.address; GetInt64 func(string) (int64, .uverse.error); GetString func(string) (string, .uverse.error); GetUint64 func(string) (uint64, .uverse.error); Has func(string) bool; IsWriteAuthorized func(.uverse.address) bool; RemoveAuthorizedCaller func(int, .uverse.realm, .uverse.address) .uverse.error; Set func(int, .uverse.realm, string, interface {}) .uverse.error; UpdateAuthorizedCaller func(int, .uverse.realm, .uverse.address, gno.land/p/gnoswap/store/v1.Permission) .uverse.error}) interface {GetFeeAmountTickSpacing func() map[uint32]int32; GetObservations func() *gno.land/p/nt/bptree/v0.BPTree; GetPendingProtocolFee func(string) int64; GetPendingProtocolFees func() map[string]int64; GetPoolCreationFee func() int64; GetPools func() *gno.land/p/nt/bptree/v0.BPTree; GetSlot0FeeProtocol func() uint8; GetSwapEndHook func() func(.uverse.realm, string) .uverse.error; GetSwapStartHook func() func(.uverse.realm, string, int64); GetTickCrossHook func() func(.uverse.realm, string, int32, bool, int64); GetUnlocked func() bool; GetWithdrawalFeeBPS func() uint64; HasFeeAmountTickSpacing func() bool; HasObservations func() bool; HasPendingProtocolFees func() bool; HasPoolCreationFee func() bool; HasPools func() bool; HasSlot0FeeProtocol func() bool; HasSwapEndHook func() bool; HasSwapStartHook func() bool; HasTickCrossHook func() bool; HasUnlocked func() bool; HasWithdrawalFeeBPS func() bool; RemovePendingProtocolFee func(int, .uverse.realm, string) .uverse.error; SetFeeAmountTickSpacing func(int, .uverse.realm, map[uint32]int32) .uverse.error; SetObservations func(int, .uverse.realm, *gno.land/p/nt/bptree/v0.BPTree) .uverse.error; SetPendingProtocolFee func(int, .uverse.realm, string, int64) .uverse.error; SetPendingProtocolFees func(int, .uverse.realm, map[string]int64) .uverse.error; SetPoolCreationFee func(int, .uverse.realm, int64) .uverse.error; SetPools func(int, .uverse.realm, *gno.land/p/nt/bptree/v0.BPTree) .uverse.error; SetSlot0FeeProtocol func(int, .uverse.realm, uint8) .uverse.error; SetSwapEndHook func(int, .uverse.realm, func(.uverse.realm, string) .uverse.error) .uverse.error; SetSwapStartHook func(int, .uverse.realm, func(.uverse.realm, string, int64)) .uverse.error; SetTickCrossHook func(int, .uverse.realm, func(.uverse.realm, string, int32, bool, int64)) .uverse.error; SetUnlocked func(int, .uverse.realm, bool) .uverse.error; SetWithdrawalFeeBPS func(int, .uverse.realm, uint64) .uverse.error}

  • NewPoolsTree() *gno.land/p/nt/bptree/v0.BPTree

  • NewPoolTicksTree() *gno.land/p/nt/bptree/v0.BPTree

  • NewPositionInfo() struct{liquidity string; feeGrowthInside0LastX128 string; feeGrowthInside1LastX128 string; tokensOwed0 int64; tokensOwed1 int64}

  • NewSlot0(sqrtPriceX96 *gno.land/p/gnoswap/uint256/v1.Uint, tick int32, feeProtocol uint8, unlocked bool) struct{sqrtPriceX96 *gno.land/p/gnoswap/uint256/v1.Uint; tick int32; feeProtocol uint8; unlocked bool; observationIndex uint16; observationCardinality uint16; observationCardinalityNext uint16}

  • NewTickInfo() struct{liquidityGross string; liquidityNet string; feeGrowthOutside0X128 string; feeGrowthOutside1X128 string; tickCumulativeOutside int64; secondsPerLiquidityOutsideX128 string; secondsOutside uint32; initialized bool}

  • NewTokenPair() struct{token0 int64; token1 int64}

  • Observe(poolPath string, secondsAgos []uint32) ([]int64, []string, interface {Error func() string})

  • OracleConsult(poolPath string, secondsAgo uint32) (int32, string, interface {Error func() string})

  • RegisterInitializer(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, initializer func(int, .uverse.realm, gno.land/r/gnoswap/pool.IPoolStore) gno.land/r/gnoswap/pool.IPool)

  • Render(path string) string

  • SetFeeProtocol(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, feeProtocol0 uint8, feeProtocol1 uint8)

  • SetPoolCreationFee(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, fee int64)

  • SetSwapEndHook(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, hook func(.uverse.realm, string) .uverse.error)

  • SetSwapStartHook(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, hook func(.uverse.realm, string, int64))

  • SetTickCrossHook(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, hook func(.uverse.realm, string, int32, bool, int64))

  • SetWithdrawalFee(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, fee uint64)

  • SnapshotCumulativesInside(poolPath string, tickLower int32, tickUpper int32) (int64, string, uint32, interface {Error func() string})

  • Swap(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, token0Path string, token1Path string, fee uint32, recipient string, zeroForOne bool, amountSpecified string, sqrtPriceLimitX96 string, swapCallback func(.uverse.realm, int64, int64, *gno.land/r/gnoswap/pool.CallbackMarker) .uverse.error) (string, string)

  • UpgradeImpl(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, packagePath string)

Signatures reconstructed verbatim from vm/qfuncs — interface params keep their inline definitions.

Rendered

RenderedRawgnoweb ↗

vm/qrender output, sanitized (docs/render-security.md) and displayed in an empty-sandbox iframe — scripts, forms and popups cannot run. Links stay inert in-preview; right-click to open.