QLP
Protocol

Smart contract architecture

The program's accounts and instructions.

The program is written with Anchor. Its accounts are simple and public:

  • Vault — PDA at seeds ["vault"]: token mint, total shares, deposits flag.
  • Position — PDA derived from your first PQ key: current LMS key, next one-time key, sequence, balance. Holds its own SOL.
  • SignatureBuffer — temporary PDA that stages the 2.5 KB signature; closed (rent refunded) after use.

Instructions

An instruction is marked live only after its integration tests pass on a local validator against the real external programs. The Liquidity Vault instructions also need the LP vault to exist on the cluster you are connected to.

InstructionPurposeStatus
initializeCreates the vault config. Upgrade authority only; refuses mainnet.live
register_positionCreates a position controlled by an LMS (RFC 8554) public key.live
depositPermissionless SOL deposit into a position PDA (capped per position).live
signature bufferStages a 2.5 KB post-quantum signature across transactions.live
withdrawVerifies an LMS signature on-chain, consumes the key, pays the signed destination.live
transfer_to_positionPQ-authorized move into another position.live
rotate_keyReplaces the key; last leaf reserved for rotation.live
deposit_liquidityAtomic SOL zap into the Meteora DAMM v2 pool; shares = liquidity added.live
withdraw_liquidityLMS-authorized redemption of LP shares (wallet or Safe Vault).live
harvest_lp_feesPermissionless claim of actual DAMM trading fees.live
claim_lp_feesLMS-authorized fee claim; zeroed before payment.live
compound_lp_feesLMS-authorized reinvestment with a signed minimum.live
allocate_creator_feesPermissionless 80/20 split of SOL contributed to permanent liquidity.live
deploy_permanent_liquidityPermissionless deployment into a permanently locked DAMM position.live
harvest_permanent_feesRecycles locked-position fees into further permanent liquidity.live

On this page