Skip to main content

Access Controls and Permissions

This section gives an overview of smart contract access controls for the full Astroport protocol. Many of the contracts on Astroport are both upgradeable (can have their code ID changed) and have an owner that can change certain parameters.

Upgradeable Contracts

The following is a list of Astroport smart contracts that can have their code upgraded:

  • XYK/Constant product pools
  • Stableswap pools
  • Maker contract that swaps fees for ASTRO
  • Lockdrop contract
  • Router contract
  • Factory contract
  • Vesting contract (contract that decreases amount of ASTRO to give to LPs each year via generator)
  • Staking contract for ASTRO → xASTRO
  • Generator contract
  • Treasury contract
  • Assembly contract

The ASTRO token and the xASTRO token cannot be upgraded.

Pool Upgradeability

A specific pair (e.g ASTRO/axlUSDC) cannot have both a stableswap and a xyk pool at the same time. If someone creates a xyk for a specific token pair, Astroport governance will have to deregister the pool if the intent was to use stableswap instead. Same thing if someone creates an invalid stableswap and liquidity should go to a xyk instead. In short, a xyk pool should not be upgraded to a stableswap or vice-versa.

Ownable Contracts

The following is a list of contracts that have an owner who can change specific parameters.

Factory

  • Can change general parameters such as the owner, token_code_id, fee_address, generator_address and whitelist_code_id
  • Can update a pair type's configuration which includes its code_id, pair_type (stableswap, XYK or custom), total_fee_bps, maker_fee_bps and whether the pool is_disabled
  • Can deregister a pool
  • Can create a brand new pool type

Stableswap Pool

  • Can update the pool amplification (with next_amp) and specify the timestamp until which the current amplification scales to the new one (next_amp_time)
  • The owner can change their own address
  • For Terra Classic, the bLUNA specific stableswap can also have its bluna_rewarder changed (the contract distributing bLUNA rewards)

Generator

  • Can set the alloc_points for a generator as well as mention whether a generator has dual rewards (and attach a proxy contract for 3rd party rewards)
  • Can add a new generator, specifying its initial alloc_points , whether it gets dual rewards or not and the proxy contract used for 3rd party rewards
  • Can update the address of the generator vesting contract
  • The owner can change their own address

Maker

  • Can update the factory address, xASTRO staking address, vxASTRO fee distributor address, the percentage of fees going to vxASTRO stakers and the max_spread used to swap fee tokens to ASTRO
  • Can update bridge tokens used to swap fee tokens to ASTRO
  • The owner can change their own address

Vesting

  • Can add new vesting schedules targeted at different addresses
  • The owner can change their own address

Treasury

  • Current treasury admins can change the list of admins

Assembly

  • Can change the proposal voting period, the delay between marking a proposal as successful and it being available for execution and the proposal expiration period
  • Can change the amount of xASTRO needed to lock in order to create a proposal, the required voting power quorum needed to pass a vote, the required majority of votes that a proposal needs to have to be successful and the list of whitelisted domains used to sanitize the main link submitted in a proposal

Governance Delays

The Astral Assembly enforces a delay between the moment when a proposal is marked as successful and the moment when that proposal can be executed. You can check out the Assembly parameters here.

Pausing the Protocol

Although governance can propose and implement a pause functionality in the protocol, at the moment there are no pause functions per se in any contract. This design decision stems from the fact that Astroport was initially envisioned as an unstoppable protocol which is as close as possible to a public good for the whole Cosmos ecosystem.

There are though ways to deregister pools from the Astroport Factory as well as completely stop ASTRO emissions from the Generator contract.