Skip to main content
This page covers the smart contract implementation details. See Glossary.
External Access Control (EAC) is Railnet’s central permission system. Based on OpenZeppelin’s AccessControlDefaultAdminRules, it manages permissions across all vehicles and protocol components with granular, auditable control.

Role types

EAC supports three distinct types of roles to provide flexible permission management.

Global roles

Global roles are standard bytes32 identifiers that apply across the entire protocol. When you grant an account a global role, it holds that permission for all protocol components that check for it.

Scoped roles

Scoped roles are restricted to a specific contract address (the scope). This allows fine-grained permissions, such as granting an account the ability to manage a specific vehicle without giving it permissions over all vehicles. Internally, a scoped role is represented as keccak256(abi.encodePacked(role, scope)).

Public roles

Public roles are effectively granted to everyone. When you make a role public, hasRole and hasScopedRole checks for that role return true for any account.
The DEFAULT_ADMIN_ROLE cannot be made public.

Checking permissions

EAC provides three methods for checking access:

Admin management

EAC implements a secure, time-delayed mechanism for transferring the default admin role:
1

Initiate transfer

The current admin calls beginDefaultAdminTransfer(newAdmin) to start the transfer process.
2

Wait for delay

A configurable time delay must pass before the transfer can complete.
3

Accept transfer

The pending admin calls acceptDefaultAdminTransfer() to complete the transfer.
The delay period can be adjusted using changeDefaultAdminDelay(newDelay).

Role reference

Factory roles

Beacon and proxy roles

Vehicle roles

STEAM authorization is split across deposit and redeem so operators can gate each direction independently — for example, keeping deposits open while pausing redemptions during a strategy wind-down, or restricting deposits to KYC’d addresses while exits remain public.

FeeManager roles

Multi-Vehicle roles

ModulesManager roles

Keeper roles

FreezablePausableBeacon

The EAC also manages the implementation address for beacon proxies (vehicle clones) through the FreezablePausableBeacon. This component has two critical states:
A permanent and irreversible state. Once frozen, the implementation address can never be upgraded again. This provides a “trustless” guarantee that the contract logic is immutable.

Common permission patterns

Use scoped roles to restrict the operator to a single Multi-Vehicle:
Make the STEAM roles public for a specific vehicle so any user can interact. Deposits and redeems can be opened independently:
Grant the roles needed to manage and distribute fees: