Full version of legacy Frax Protocol docs are currently available on docs.frax.finance (opens in a new tab)
Crosschain Strategy for Frax Assets
Overview
The Omnichain Fungible Token (OFT) (opens in a new tab) Standard allows fungible tokens to be transferred across multiple blockchains without asset wrapping, middlechains, or liquidity pools.
Frax assets are represented as OFTs on chains other than Fraxtal, and Ethereum. An OFT operates the exact same as an ERC20 with the additional function of bridge-ability through the LayerZero protocol.
Available Frax OFTs
- frxUSD
- sfrxUSD
- frxETH
- sfrxETH
- FXS
- FPI
Legacy vs. Upgradeable OFTs
In the initial deployment with LayerZero, the LayerZero team deployed Frax assets across several chains as fixed contracts. After the initial deployment, the Frax team has assumed additional deployment responsibilities and currently deploys OFTs as upgradeable, transparent proxies (contracts audited, repo link (opens in a new tab)).
Legacy and Upgradeable OFTs maintain the same address per asset across chains, respectively.
All OFTs with bridging permissions are managed by a 3/6 msig on each respective chain.
Process
- Bridge through the Stargate UI (link (opens in a new tab))
- Bridge directly with LayerZero
npm install @fraxfinance/layerzero-v2-upgradeable
import { OptionsBuilder } from "@fraxfinance/layerzero-v2-upgradeable/oapp/contracts/oapp/libs/OptionsBuilder.sol";
import { SendParam, MessagingFee, IOFT } from "@fraxfinance/layerzero-v2-upgradeable/oapp/contracts/oft/interfaces/IOFT.sol";
uint256 amount = 1e18;
// Upgradeable FRAX - Bridging FROM Mode
address oft = 0x80eede496655fb9047dd39d9f418d5483ed600df;
// Ethereum - choose destination EID from https://github.com/FraxFinance/frax-oft-upgradeable/blob/master/scripts/L0Config.json
uint32 dstEid = 30101;
bytes memory options = OptionsBuilder.newOptions();
SendParam memory sendParam = SendParam({
dstEid: dstEid,
to: bytes32(uint256(uint160(msg.sender))),
amountLD: amount,
minAmountLD: amount,
extraOptions: options,
composeMsg: '',
oftCmd: ''
});
MessagingFee memory fee = IOFT(_oft).quoteSend(sendParam, false);
IOFT(_oft).send{value: fee.nativeFee}(
sendParam,
fee,
payable(msg.sender)
);
Contracts & Addresses
Admin
ProxyAdmin
: 0x223a681fc5c5522c85c96157c0efa18cd6c5405c
Multisigs (links to Gnosis Safe)
Chain | Link | Address |
---|---|---|
Ethereum | Multisig (opens in a new tab) | 0xB1748C79709f4Ba2Dd82834B8c82D4a505003f27 |
Fraxtal | Multisig (opens in a new tab) | 0x5f25218ed9474b721d6a38c115107428E832fA2E |
Arbitrum | Multisig (opens in a new tab) | 0xe61D9ed1e5Dc261D1e90a99304fADCef2c76FD10 |
Optimism | Multisig (opens in a new tab) | 0x0dF840dCbf1229262A4125C1fc559bd338eC9491 |
BSC | Multisig (opens in a new tab) | 0x8811Da0385cCf1848B21475A42eA4D07Fc5d964a |
Avalanche | Multisig (opens in a new tab) | 0xc036Caff65c1A31eAa53e60F6E17f1E6689937AA |
Polygon | Multisig (opens in a new tab) | 0xDCB5A4b6Ee39447D700F4FA3303B1d1c25Ea9cA7 |
Polygon zkEVM | Multisig | 0x030BD43af99cb72B51dA233A73F7697Cd2461C0b |
zkSync | Multisig (opens in a new tab) | 0xd492dF0ce7905D7d91aE48F5e893AcAa38221486 |
Ink | Multisig | N/A |
Sonic | Multisig (opens in a new tab) | 0x457aEa9180b60a7076a9cf4E2485F266c9E47657 |
Blast | Multisig (opens in a new tab) | 0x33A133020b2C2CD41a24F74033B11EC2fC0bF97a |
Metis | Multisig (opens in a new tab) | 0xF4A4F32732F9B2fB84Ee28c58616946F3bF80F7d |
Base | Multisig (opens in a new tab) | 0xCBfd4Ef00a8cf91Fd1e1Fe97dC05910772c15E53 |
Mode | Multisig (opens in a new tab) | 0x6336CFA6eDBeC2A459d869031DB77fC2770Eaa66 |
Sei | Multisig (opens in a new tab) | 0x0357D02fc95320b990322d3ff69204c3D251171b |
X-Layer | Multisig (opens in a new tab) | 0xe7Cc52f0C86f4FAB6630f1E26167B487fbF66a61 |
Upgradeable OFTs
- Chains: All the EVM compatible chains except Ethereum, and Fraxtal.
- Admin: ProxyAdmin (owned by chain-respective multisig)
Asset | type | Address |
---|---|---|
frxUSD | OFT | 0x80eede496655fb9047dd39d9f418d5483ed600df |
sfrxUSD | OFT | 0x5bff88ca1442c2496f7e475e9e7786383bc070c0 |
frxETH | OFT | 0x43eDD7f3831b08FE70B7555ddD373C8bF65a9050 |
sfrxETH | OFT | 0x3ec3849c33291a9ef4c5db86de593eb4a37fde45 |
FPI | OFT | N/A |
FXS | OFT | 0x64445f0aecc51e94ad52d8ac56b7190e764e561a |
Source Code
- https://github.com/fraxfinance/frax-oft-upgradeable (opens in a new tab)
- https://github.com/fraxfinance/layerzero-v2-upgradeable (opens in a new tab)
- https://github.com/fraxfinance/frax-oft-legacy (opens in a new tab)
Security Considerations
Layer Zero OFT Frax Assets are not a liability of the Frax Protocol. They do not appear on the balance sheet on Frax Facts (opens in a new tab). They are not redeemable for protocol owned assets. They are only redeemable for the Frax Asset in the Layer Zero “lockbox” contract that is part of the Layer Zero Protocol.
Layer Zero OFT Frax Assets are settled by Layer Zero Decentralized Verification Networks (DVNs) that are not operated by the Frax Protocol, Frax Core Developers, or any associated entity of Frax. Therefore, the risk of OFT Frax Assets are borne by their holders. This is similar to holding “USDC tokens” on a network that its issuer, Circle, does not support minting/redeeming on. Such “USDC tokens” do not appear on Circle’s balance sheet as a liability nor are they redeemable from its issuer. They are only redeemable for the underlying USDC token in the bridge (ie ‘lockbox’) contract.
In the future, the Frax Protocol can work with Layer Zero to upgrade certain OFT Frax Assets on select networks to allow the Frax Protocol to have direct oversight in the settlement process similar to the Frax Ferry system. After this, the OFT Frax Assets for those select networks will be reported on the associated balance sheet of those Frax Assets. When this occurs, the Frax Protocol will consider such tokens at that time as its liability that are backed directly by the assets it holds on its respective balance sheets. At this time, no Frax OFT tokens are native liabilities of the protocol.