Accounts and PDA seeds
Current Anchor account identities and the limits of the initial storage model.
Source inspected: programs/grapl-amm/src/state/{mod,ticks}.rs, instructions/pool/initialize.rs, instructions/positions/lifecycle.rs, and hooks/abi/wire.rs. These are implementation details under development, not a stable deployed ABI.
Current addresses
Seeds are listed in order. Numeric identifiers use little-endian bytes; pubkeys use their raw 32 bytes. Derive the bump with the program ID from your deployment configuration.
| Account | Seeds | Deriving program |
|---|---|---|
| Factory mint | b"mint", creator, token_id: u64 LE | Core |
| Initial issuance token account | b"issuance", mint | Core |
| Graduation position | b"graduation", pool | Core |
| ProtocolTreasury | b"protocol_treasury" | Core |
| Pool | b"pool", creator, pool_id: u64 LE | Core |
| Vault A/B | b"vault", pool, mint | Core |
| TickDirectory | b"ticks", pool | Core |
| Tick array | b"tick_array", pool, array_index: i32 LE | Core |
| Position | b"position", pool, owner, position_id: u64 LE | Core |
| Hook callback authority | b"hook", pool | Core |
Hook policy account at index i | b"policy", pool, one-byte index | Configured hook |
The current pool seed does not include the token pair. The implementation identifies it by creator and pool ID; the architectural pair/salt identity is not the current seed scheme.
State responsibilities
| Account | Selected fields |
|---|---|
Pool | Mints, vaults, creator, configuration, hook program, Q64.64 price, tick, active liquidity, fee growth, beneficiary debts, protocol owed amounts and per-mint fractional carry, sequence, entry flag, curve state; Pool version 6 reserves 1160 bytes |
ProtocolTreasury | Bump and immutable claim recipient; 41 bytes including discriminator |
Position | Pool, owner, ID, ticks, liquidity, inside-growth checkpoints, fees owed |
TickDirectory | Pool, spacing, bump, two-level bitmap; 1816 bytes, borrowed through AccountLoader |
| Tick array | Canonical page header plus fixed or compact boundary records |
TickBoundary | Signed index, gross/net liquidity, outside fee growth for A/B |
Each page represents 64 aligned ticks. Only initialized boundaries occupy compact records; fixed pages reserve all slots. The directory covers the entire supported price domain. A swap accepts at most 16 page accounts, and transaction bytes/CUs can impose a smaller practical budget. See tick arrays and full range.
Authority and token accounts
The treasury initializer authenticates the deployed program's upgrade authority through ProgramData. Protocol collection requires the configured recipient's signature and recipient-owned token accounts. Fees accrue per pool; the treasury record does not become a shared writable account on each swap. See Fees and revenue.
Vaults use the pool PDA as token authority. The callback PDA owns no vault. It is the only core signer forwarded to the hook; the pool is read-only. Extra accounts need explicit HookAccountAccess descriptors and configured per-phase permissions. Defaults allow four read-only hook-owned extras; configured maxima are 16 extras and eight writable extras per callback.
PolicyPda indices 0–3 use the table above. HookState has hook-defined address/discriminator relationships. ExternalState owners and ExternalProgram IDs must be declared; external programs remain read-only. Signer extras, duplicates, core-owned extras, and aliases of protected market/actor/settlement accounts reject. See permissions.
The initial core uses classic SPL Token accounts. Initialization permits issuer freeze authority; frozen token accounts cannot settle transfers. See token compatibility.
Program identity
Obtain the core program ID from the deployment configuration used by your application and verify the account owner against it. These docs do not publish a mainnet address registry.