The following contracts are in-scope for this audit:
Contract | SLOC | Purpose | Libraries Used |
---|---|---|---|
TokenGGP.sol | 8 | Fixed-supply, non-upgradeable ERC20 token | @solmate/ERC20 |
Storage.sol | 113 | Implements data separation pattern and maintains storage for all network contracts with generic getters/setters. Contracts are registered with storage to define their ability to interact with stored variables | |
Vault.sol | 129 | Stores AVAX/ERC20 tokens on behalf of network contracts, to maintain their upgradeability | @solmate/ERC20, ReentrancyGuard, SafeTransferLib |
Contract | SLOC | Purpose | Libraries Used |
---|---|---|---|
BaseAbstract.sol | 9 | Implementation of helper methods and storage method wrappers shared between contracts | |
Base.sol | 8 | Inherits BaseAbstract for network contracts | |
BaseUpgradeable.sol | 9 | Inherits BaseAbstract for proxy upgrade contracts | @openzeppelin/Initializable |
ClaimNodeOp.sol | 84 | Claim contract for Node Operator GGP rewards | @solmate/ERC4626, FixedPointMathLib |
ClaimProtocolDAO.sol | 25 | Claim contract for Protocol DAO GGP rewards | |
MinipoolManager.sol | 435 | Minipool functionality, e.g. creating, initiating staking | @solmate/ERC4626, FixedPointMathLib, ReentrancyGuard, SafeTransferLib |
Ocyticus.sol | 49 | Protocol pause functionality | |
Oracle.sol | 41 | Price oracle for GGP Token | |
ProtocolDAO.sol | 122 | Defines and allows for modifying protocol settings | |
RewardsPool.sol | 153 | Handles GGP reward cycles including inflation and distribution | @solmate/FixedPointMathLib |
Staking.sol | 256 | Maintains information on stakers (anyone staking GGP or AVAX) | @solmate/ERC20, FixedPointMathLib, SafeTransferLib |
Contract | SLOC | Purpose | Libraries Used |
---|---|---|---|
TokenggAVAX.sol | 174 | An upgradeable (via OpenZeppelin proxy) ERC4626 yield-bearing liquid staking token | @openzeppelin/Initializable, UUPSUpgradeable + @solmate/ERC20, FixedPointMathLib, SafeCastLib, SafeTransferLib |
TokenggAVAX is our liquid staking token that represents a claim on AVAX that is locked in our protocol and earning validation rewards. It is implemented as an ERC4626 that streams rewards to stakers continuously on a 14 day cycle. We chose 14 days because GoGoPool validators will be on a 14 day validation cycle (shortest allowed staking period on Avalanche) and will be receiving AVAX rewards from Avalanche every 14 day validation cycle.
We are using Fei protocol’s xERC4626 to implement the rewards streaming. Due to the novelty of the ERC4626 standard we felt is was important for the token to be upgradeable (via OpenZeppelin UUPSUpgradeable). To accomplish this with the Fei xERC4626, we modified Solmate’s ERC20 and ERC4626 to make them UUPS upgradeable.
Because of the amount of new code and the different upgrade pattern than the rest of our codebase, special attention to these contracts would be appreciated.
We’d like to call special attention to GGP rewards for exploits or ways to game the rewards system.