Frax Share (FXS)
Modified ERC-20 Contract representing the FXS token, which is used for staking and governance actions surrounding the FRAX stablecoin.

Deployments

Chain
Address
Arbitrum
0x9d2F299715D94d8A7E6F5eaa8E654E8c74a988A7
Avalanche
0x214DB107654fF987AD859F34125307783fC8e387
Boba
0xae8871A949F255B12704A98c00C2293354a36013
BSC
0xe48A3d7d0Bc88d552f730B62c006bC925eadB9eE
Ethereum
0x3432B6A60D23Ca0dFCa7761B7ab56459D9C964D0
Fantom
0x7d016eec9c25232b01F23EF992D98ca97fc2AF5a
Harmony
0x0767D8E1b05eFA8d6A301a65b324B6b66A1CC14c
Moonriver
0x6f1D1Ee50846Fcbc3de91723E61cb68CFa6D0E98
Polygon
0x1a3acf6D19267E2d3e7f898f42803e90C9219062
Solana
6LX8BhMQ4Sy2otmAWj7Y5sKd9YTVVUgfMsBzT6B9W7ct

State Variables

ERC-20 (Inherited)

AccessControl (Inherited)

FXS-Specific

1
address public FRAXStablecoinAdd
Copied!
Address of the FRAX contract.
1
uint256 genesis_supply
Copied!
Genesis supply of FXS.
1
uint256 public maximum_supply
Copied!
Maximum supply of FXS.
1
uint256 public FXS_DAO_min
Copied!
Minimum FXS required to join DAO groups.
1
address public owner_address
Copied!
Address of the contract owner.
1
address public oracle_address
Copied!
Address of the oracle.
1
address public timelock_address
Copied!
Address of the timelock.
1
FRAXStablecoin private FRAX
Copied!
The FRAX contract instance.
1
struct Checkpoint {
2
uint32 fromBlock;
3
uint96 votes;
4
}
Copied!
From Compound Finance. Used for governance voting.
1
mapping (address => mapping (uint32 => Checkpoint)) public checkpoints
Copied!
List of voting power for a given address, at a given block.
1
mapping (address => uint32) public numCheckpoints
Copied!
Checkpoint count for an address.

Restricted Functions

setOracle
1
setOracle(address new_oracle) external onlyByOracle
Copied!
Change the address of the price oracle.
setFRAXAddress
1
setFRAXAddress(address frax_contract_address) external onlyByOracle
Copied!
Set the address of the FRAX contract.
setFXSMinDAO
1
setFXSMinDAO(uint256 min_FXS) external onlyByOracle
Copied!
Set minimum FXS required to join DAO groups.
mint
1
mint(address to, uint256 amount) public onlyPools
Copied!
Mint new FXS tokens.
pool_mint
1
pool_mint(address m_address, uint256 m_amount) external onlyPools
Copied!
This function is what other FRAX pools will call to mint new FXS (similar to the FRAX mint).
pool_burn_from
1
pool_burn_from(address b_address, uint256 b_amount) external onlyPools
Copied!
This function is what other FRAX pools will call to burn FXS.

Overridden Public Functions

transfer
1
transfer(address recipient, uint256 amount) public virtual override returns (bool)
Copied!
Transfer FXS tokens.
transferFrom
1
transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool)
Copied!
Transfer FXS tokens from another account. Must have an allowance set beforehand.

Public Functions

getCurrentVotes
1
getCurrentVotes(address account) external view returns (uint96)
Copied!
Gets the current votes balance for account.
getPriorVotes
1
getPriorVotes(address account, uint blockNumber) public view returns (uint96)
Copied!
Determine the prior number of votes for an account as of a block number. Block number must be a finalized block or else this function will revert to prevent misinformation.

Internal Functions

_moveDelegates
1
_moveDelegates(address srcRep, address dstRep, uint96 amount) internal
Copied!
Misnomer, from Compound Finance's _moveDelegates. Helps keep track of available voting power for FXS holders.
_writeCheckpoint
1
_writeCheckpoint(address voter, uint32 nCheckpoints, uint96 oldVotes, uint96 newVotes) internal
Copied!
From Compound Finance's governance scheme. Helps keep track of available voting power for FXS holders at a specific block. Called when a FXS token transfer, mint, or burn occurs.
safe32
1
safe32(uint n, string memory errorMessage) internal pure returns (uint32)
Copied!
Make sure the provided int is 32 bits or less, and convert it to a uint32.
safe96
1
safe96(uint n, string memory errorMessage) internal pure returns (uint96)
Copied!
Make sure the provided int is 96 bits or less, and convert it to a uint96.
add96
1
add96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96)
Copied!
Add two uint96 integers safely.
sub96
1
sub96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96)
Copied!
Subtract two uint96 integers safely.
getChainId
1
getChainId() internal pure returns (uint)
Copied!
Return the Ethereum chain ID the contract is deployed on

Events

VoterVotesChanged
1
VoterVotesChanged(address indexed voter, uint previousBalance, uint newBalance)
Copied!
Emitted when a voters account's vote balance changes
FXSBurned
1
FXSBurned(address indexed from, address indexed to, uint256 amount)
Copied!
Emitted when FXS is burned, usually from a redemption by the pool

Modifiers

onlyPools
1
onlyPools()
Copied!
Restrict actions to pool contracts, e.g. minting new FXS.
onlyByOracle
1
onlyByOracle()
Copied!
Restrict actions to the oracle, such as setting the FRAX and oracle addresses
Last modified 6d ago