22 releases (5 breaking)

0.7.15 Mar 15, 2024
0.7.12 Jan 4, 2024
0.7.11 Dec 13, 2023
0.7.5 Nov 28, 2023

#254 in #instructions

Download history 52/week @ 2024-07-24 11/week @ 2024-09-18 19/week @ 2024-09-25

829 downloads per month

GPL-3.0 license

275KB
6K SLoC

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][fn@instruction::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][fn@instruction::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 represent locked ACCESS tokens sold by the ACCESS DAO. The lifecycle of a bond is as follow:

  • [create_bond][fn@instruction::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][fn@instruction::sign_bond]: This instruction allows DAO members to approve the sell.
  • [claim_bond][fn@instruction::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.

Dependencies

~36MB
~604K SLoC