# FRAX ABI & Token Addresses

## Deployments

<table><thead><tr><th width="274.57142857142856">Chain</th><th>Address</th></tr></thead><tbody><tr><td>Arbitrum</td><td>0x17FC002b466eEc40DaE837Fc4bE5c67993ddBd6F</td></tr><tr><td>Aurora</td><td>0xE4B9e004389d91e4134a28F19BD833cBA1d994B6</td></tr><tr><td>Avalanche</td><td>0xD24C2Ad096400B6FBcd2ad8B24E7acBc21A1da64</td></tr><tr><td>Base (LayerZero)</td><td>0x909DBdE1eBE906Af95660033e478D59EFe831fED</td></tr><tr><td>Blast (LayerZero)</td><td>0x909DBdE1eBE906Af95660033e478D59EFe831fED</td></tr><tr><td>Boba</td><td>0x7562F525106F5d54E891e005867Bf489B5988CD9</td></tr><tr><td>BSC</td><td>0x90C97F71E18723b0Cf0dfa30ee176Ab653E89F40</td></tr><tr><td>Ethereum (native)</td><td><a href="https://etherscan.io/address/0x853d955aCEf822Db058eb8505911ED77F175b99e">0x853d955aCEf822Db058eb8505911ED77F175b99e</a></td></tr><tr><td>Ethereum (LayerZero)</td><td>0x909DBdE1eBE906Af95660033e478D59EFe831fED</td></tr><tr><td>Evmos</td><td>0xE03494D0033687543a80c9B1ca7D6237F2EA8BD8</td></tr><tr><td>Fantom</td><td>0xdc301622e621166BD8E82f2cA0A26c13Ad0BE355</td></tr><tr><td>Fraxtal (Native)</td><td><a href="https://fraxscan.com/token/0xFc00000000000000000000000000000000000001">0xFc00000000000000000000000000000000000001</a></td></tr><tr><td>Fraxtal (LayerZero)</td><td>0x80eede496655fb9047dd39d9f418d5483ed600df</td></tr><tr><td>Harmony</td><td>0xFa7191D292d5633f702B0bd7E3E3BcCC0e633200</td></tr><tr><td>Linea (Axelar)</td><td>0x406cde76a3fd20e48bc1e0f60651e60ae204b040</td></tr><tr><td>Mantle (Axelar)</td><td>0x406Cde76a3fD20e48bc1E0F60651e60Ae204B040</td></tr><tr><td>Metis (LayerZero)</td><td>0x909DBdE1eBE906Af95660033e478D59EFe831fED</td></tr><tr><td>Mode (LayerZero)</td><td>0x80eede496655fb9047dd39d9f418d5483ed600df</td></tr><tr><td>Moonbeam</td><td>0x322E86852e492a7Ee17f28a78c663da38FB33bfb</td></tr><tr><td>Moonriver</td><td>0x1A93B23281CC1CDE4C4741353F3064709A16197d</td></tr><tr><td>Optimism</td><td>0x2E3D870790dC77A83DD1d18184Acc7439A53f475</td></tr><tr><td>Polygon</td><td>0x45c32fA6DF82ead1e2EF74d17b76547EDdFaFF89</td></tr><tr><td>Sei (LayerZero)</td><td>0x80eede496655fb9047dd39d9f418d5483ed600df</td></tr><tr><td>Scroll (Axelar)</td><td>0x406cde76a3fd20e48bc1e0f60651e60ae204b040</td></tr><tr><td>Solana</td><td>FR87nWEUxVgerFGhZM8Y4AggKGLnaXswr1Pd8wZ4kZcp</td></tr><tr><td>TRON</td><td>TBD</td></tr><tr><td>X-Layer (LayerZero)</td><td>0x80eede496655fb9047dd39d9f418d5483ed600df</td></tr></tbody></table>

## State Variables

#### ERC-20 (Inherited)

<https://docs.openzeppelin.com/contracts/2.x/api/token/erc20#ERC20>

#### AccessControl (Inherited)

<https://docs.openzeppelin.com/contracts/3.x/api/access#AccessControl>\
\
**NOTE: FRAX & FXS contracts have no pause or blacklist controls in any way (including system contracts).**&#x20;

#### FRAX-Specific

```
enum PriceChoice { FRAX, FXS }
```

An enum declaring FRAX and FXS. Used with oracles.

```
ChainlinkETHUSDPriceConsumer eth_usd_pricer
```

Instance for the Chainlink ETH / USD trading. Combined with FRAX / WETH,  FXS /  WETH, collateral / FRAX, and collateral / FXS trading pairs, can be used to calculate FRAX/FXS/Collateral prices in USD.

```
uint8 eth_usd_pricer_decimals
```

Decimals for the Chainlink ETH / USD trading pair price.

```
UniswapPairOracle fraxEthOracle
```

Instance for the FRAX / WETH Uniswap pair price oracle.

```
UniswapPairOracle fxsEthOracle
```

Instance for the FXS / WETH Uniswap pair price oracle.

```
address[] public owners
```

Array of owner address, who have privileged actions.

```
address governance_address
```

Address of the governance contract.

```
address public creator_address
```

Address of the contract creator.&#x20;

```
address public timelock_address
```

Address of the timelock contract.

```
address public fxs_address
```

Address of the FXS contract

```
address public frax_eth_oracle_address
```

Address for the `fraxEthOracle` .

```
address public fxs_eth_oracle_address
```

Address for the `fxsEthOracle` .

```
address public weth_address
```

Address for the canonical wrapped-Ethereum (WETH) contract. Should be `0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2` for the mainnet.&#x20;

```
address public eth_usd_consumer_address
```

Address for the `ChainlinkETHUSDPriceConsumer` .

```
uint256 public genesis_supply
```

Genesis supply of FRAX. Should be a small nonzero amount. Most of the FRAX supply will come from minting, but a small amount is needed initially to prevent divide-by-zero errors in various functions.

```
address[] frax_pools_array
```

Array of all the `FraxPool` contract addresses.

```
mapping(address => bool) public frax_pools
```

Essentially the same as `frax_pools_array` , but in mapping form. Useful for gas savings in various functions like `globalCollateralValue()` .

```
uint256 public global_collateral_ratio
```

The current ratio of FRAX to collateral, over all `FraxPool` s.

```
uint256 public redemption_fee
```

The fee for redeeming FRAX for FXS and/or collateral. Also the fee for buying back excess collateral with FXS. See the `FraxPool` contract for usage.

```
uint256 public minting_fee
```

The fee for minting FRAX from FXS and/or collateral. See the `FraxPool` contract for usage.

```
address public DEFAULT_ADMIN_ADDRESS
```

Set in the constructor. Used in `AccessControl` .

```
bytes32 public constant COLLATERAL_RATIO_PAUSER
```

A constant used in the pausing of the collateral ratio.

```
bool public collateral_ratio_paused
```

Whether or not the collateral ratio is paused.

## View Functions

**oracle\_price**

```
oracle_price(PriceChoice choice) internal view returns (uint256)
```

Get the FRAX or FXS price, in USD.

**frax\_price**

```
frax_price() public view returns (uint256)
```

Returns the price for FRAX from the FRAX-ETH Chainlink price oracle.

**fxs\_price**

```
fxs_price() public view returns (uint256)
```

Returns the price for FXS from the FXS-ETH Chainlink price oracle.

**frax\_info**

```
frax_info() public view returns (uint256, uint256, uint256, uint256, uint256, uint256, uint256)
```

Returns some commonly-used state variables and computed values. This is needed to avoid costly repeat calls to different getter functions. It is cheaper gas-wise to just dump everything and only use some of the info.

**globalCollateralValue**

```
globalCollateralValue() public view returns (uint256)
```

Iterate through all FRAX pools and calculate all value of collateral in all pools globally. This uses the oracle price of each collateral.&#x20;

## Public Functions

**refreshCollateralRatio**

```
refreshCollateralRatio() public
```

This function checks the price of FRAX and refreshes the collateral ratio if the price is not $1. If the price is above $1, then the ratio is lowered by .5%. If the price is below $1, then the ratio is increased by .5%. Anyone can poke this function to change the ratio. This function can only be called once every hour.&#x20;

## Restricted Functions

**mint**

```
mint(uint256 amount) public virtual onlyByOwnerOrGovernance
```

Public implementation of internal \_mint().

**pool\_burn\_from**

```
pool_burn_from(address b_address, uint256 b_amount) public onlyPools
```

Used by pools when user redeems.

**pool\_mint**

```
pool_mint(address m_address, uint256 m_amount) public onlyPools
```

This function is what other frax pools will call to mint new FRAX.

**addPool**

```
addPool(address pool_address) public onlyByOwnerOrGovernance
```

Adds collateral addresses supported, such as tether and busd, must be ERC20.

**removePool**

```
removePool(address pool_address) public onlyByOwnerOrGovernance
```

Remove a pool.

**setOwner**

```
setOwner(address owner_address) public onlyByOwnerOrGovernance
```

Sets the admin of the contract

**setFraxStep**

```
setFraxStep(uint256 _new_step) public onlyByOwnerOrGovernance
```

Sets the amount that the collateral ratio will change by upon an execution of refreshCollateralRatio(),

**setPriceTarget**

```
setPriceTarget(uint256 _new_price_target) public onlyByOwnerOrGovernance
```

Set the price target to be used for refreshCollateralRatio() (does not affect minting/redeeming).

**setRefreshCooldown**

```
setRefreshCooldown(uint256 _new_cooldown) public onlyByOwnerOrGovernance
```

Set refresh cooldown for refreshCollateralRatio().

**setRedemptionFee**

```
setRedemptionFee(uint256 red_fee) public onlyByOwnerOrGovernance
```

Set the redemption fee.

**setMintingFee**

```
setMintingFee(uint256 min_fee) public onlyByOwnerOrGovernance
```

Set the minting fee.

**setFXSAddress**

```
setFXSAddress(address _fxs_address) public onlyByOwnerOrGovernance
```

Set the FXS address.

**setETHUSDOracle**

```
setETHUSDOracle(address _eth_usd_consumer_address) public onlyByOwnerOrGovernance
```

Set the ETH / USD oracle address.

**setFRAXEthOracle**

```
setFRAXEthOracle(address _frax_addr, address _weth_address) public onlyByOwnerOrGovernance
```

Sets the FRAX / ETH Uniswap oracle address

**setFXSEthOracle**

```
setFXSEthOracle(address _fxs_addr, address _weth_address) public onlyByOwnerOrGovernance
```

Sets the FXS / ETH Uniswap oracle address

**toggleCollateralRatio**

```
toggleCollateralRatio() public onlyCollateralRatioPauser 
```

Toggle pausing / unpausing the collateral ratio.

## Events

**FRAXBurned**

```
FRAXBurned(address indexed from, address indexed to, uint256 amount)
```

Emitted when FRAX is burned, usually from a redemption by the pool.

## Modifiers

**onlyCollateralRatioPauser**

```
onlyCollateralRatioPauser()
```

Restrict actions to the designated collateral ratio pauser.

**onlyPools**

```
onlyPools()
```

Restrict actions to pool contracts, e.g. minting new FRAX.

**onlyByGovernance**

```
onlyByGovernance()
```

Restrict actions to the governance contract, e.g. setting the minting and redemption fees, as well as the oracle and pool addresses.

**onlyByOwnerOrGovernance**

```
onlyByOwnerOrGovernance()
```

Restrict actions to the governance contract or owner account(s), e.g. setting the minting and redemption fees, as well as the oracle and pool addresses.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.frax.finance/frax-v1-original/frax.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
