Crate access_protocol

source ·
Expand description

Access protocol

§Overview

§Central state

The CentralState contains the information about:

  • ACCESS token mint
  • ACCESS token inflation

The inflation schedule can be modified by the authority key contained in the CentralState by using the change_inflation instruction.

The CentralState is the mint authority of the ACCESS token.

§Stake pool

Stake pools are created by content publishers. In order to get access to the publisher’s content users need to stake ACCESS tokens in the StakePool of the publisher.

A Stake pools is made of a header (StakePoolHeader) and circular buffer that contains the pool balances multiplied by the current inflation at each crank time.

The circular buffer is updated using a permissionless crank.

§Stake accounts

Stake accounts are used to deposit funds in a stake pool. Stake accounts allow users to access the content of the publisher and earn yield in ACCESS tokens at the same time.

§Bonds

[Bonds][state::Bonds] represent locked ACCESS tokens sold by the ACCESS DAO. The lifecycle of a bond is as follow:

  • create_bond: This instruction creates an inactive bond. The bond account contains the information about the price of the bond, the buyer, the unlock schedule and the sellers.
  • sign_bond: This instruction allows DAO members to approve the sell.
  • claim_bond: Once the bond has been signed by enough DAO members, the buyer can claim the bond.

Bond tokens can be staked like regular ACCESS tokens.

Modules§

  • Program instructions and their CPI-compatible bindings
  • Describes the different data structres that the program uses to encode state
  • Utils

Constants§

  • The const program ID.

Functions§

  • Returns true if given pubkey is the program ID.
  • Returns the program ID.