BLU Token Contract

1. Introduction

The BLU Token contract, also known as the Governance Token Contract, is the token contract for the BLU token. It's an ERC20 token that provides a standard ERC20 token interface and contains logic for burning and authorized minting of BLU.
​Contract Source​

2. Module Details

Key Functionalities

mint - Credit tokens to an address. Requires minter role only granted to system module to allow for deficit auction to repay system bad debts.
burn - Destroys token of the sender. Used by system module to destroy tokens bought in the surplus auction to distribute stability fees to all BLU holders.
upgradeTo - Upgrades the UUPS contract to a new implementation. Requires upgrader role only granted to timelock/governance contract for upgrading functionalities of the token.

Inherited Functionalities

​Standard ERC-20 Implementations - Allows for functions like transfer, transferFrom, approve, etc.

3. Key Mechanism & Concepts

The BLU token has 3 roles within the Bluejay Protocol:
    As a utility token: As the stability fee accrues within the Bluejay Protocol. The system can sell the surplus of the different stablecoins within the protocol for BLU. The system burns the BLU bought to reduce the overall supply of BLU.
    As a governance token: BLU is used by holders to signal support for executive decisions.
    As a recapitalization resource: BLU can be minted by the system to be sold for stablecoins to resolve system bad debts to restabilize the collateralization ratio of the stablecoins.

4. Gotchas (Potential sources of user error)

The BLU token is created using an upgradeable smart contract using the UUPS pattern. Users interacting with the smart contract will be interacting directly with the proxy contract which will delegate method calls to the implementation contract. Users should not be interacting with the implementation contract directly.
More info about the proxy pattern: https://blog.openzeppelin.com/proxy-patterns/

5. Known Risk

    1.
    Contract Upgrade Error - There are caveats to writing upgradable smart contracts, as well as tools to ensure safe upgrades, that the developers should be aware of. Failure to follow the safety protocol may result in corruption of stored states in the smart contract as well as rendering the contract impossible to upgrade.
​
​
Last modified 1mo ago