Frax Finance ¤
English 🇰🇾
English 🇰🇾
  • Frax Ecosystem Overview
  • FXS & veFXS
    • Frax Shares (FXS)
    • veFXS
    • Gauges
    • FXS Distribution
    • FXS Smart Contract & Addresses
  • GOVERNANCE
    • Frax Governance Overview
    • How It Works
    • Advanced Concepts
    • Fraxtal Snapshot Voting
  • FRAX V1 - ORIGINAL
    • Original Design
    • Staking Contracts
    • FRAX ABI & Token Addresses
    • Frax V1 Pool ABI & Addresses
    • Core Frax Multisigs
  • FRAX V2 - Algorithmic Market Operations (AMO)
    • AMO Overview
    • AMO Minter
    • Collateral Investor
    • Curve
    • Uniswap v3
    • FRAX Lending
    • Decentralization Ratio (DR)
  • FRAX V3 - 100% CR AND MORE
    • Overview
    • Fraxtal
    • AMOs
    • RWAs
    • sFRAX
    • FXBs
    • sFRAX Token Addresses
    • sFRAX & FXB Multisigs
  • Bridging
    • Fraxferry
    • LayerZero x Stargate
    • Fraxtal Bridge
  • Frax Price Index
    • Overview (CPI Peg & Mechanics)
    • Frax Price Index Share (FPIS)
    • FPIS Distribution
    • CPI Tracker Oracle
    • FPI Controller Pool
    • veFPIS
    • FPIS Conversion / FPIS Locker
    • FPI and FPIS Token Addresses
    • FPI Multisigs
  • Fraxswap
    • Overview
    • Technical Specifications
    • Fraxswap Contract Addresses
  • Fraxlend
    • Fraxlend Overview
    • Key Concepts
    • Lending
    • Borrowing
    • Advanced Concepts
      • Position Health & Liquidations
      • Interest Rates
      • Vault Account
    • ABI & Code
    • Fraxlend Multisigs
  • Frax Ether
    • Overview
    • frxETH and sfrxETH
    • Technical Specifications
    • Redemption
    • frxETH V2
    • frxETH V2 Technical Details
    • frxETH Code & V2 Addresses
    • frxETH and sfrxETH Token Addresses
    • frxETH Multisigs
  • BAMM
    • Overview
  • Frax Oracle
    • Frax Oracle Overview
    • How It Works
    • Advanced Concepts
    • Fraxtal Merkle Proof Oracles
  • Guides & FAQ
    • FAQ
    • Staking
    • Uniswap Migration / Uniswap V3
    • Fraxswap / FPI
  • Miscellany
    • All Contract Addresses
    • Bug Bounty
    • Miscellaneous & Bot Addresses
    • API
  • Other
    • Audits
    • Media Kit / Logos
Powered by GitBook
On this page
  • Motivation
  • Benefits
  • Risks
  • OFTs
  • Available Frax OFTs
  • Legacy vs. Upgradeable OFTs
  • Process
  • Contracts & Addresses
  • Admin
  • Legacy OFTs
  • Upgradeable OFTs
  • Source Code
  • Security Considerations

Was this helpful?

Export as PDF
  1. Bridging

LayerZero x Stargate

Bridge tokens in minutes through the LayerZero x Stargate partnership.

PreviousFraxferryNextFraxtal Bridge

Last updated 7 months ago

Was this helpful?

Motivation

  • Alternative and scalable multichain bridging solution.

Benefits

  • Bridging complete within minutes.

  • Flexible choice in source or destination chain.

Risks

  • Trust delegated to LayerZero / Stargate.

    • LayerZero Endpoint

    • LayerZero, Horizen DVN

    • Stargate UI

OFTs

Frax assets are represented as OFTs (as defined by ) on chains other than Fraxtal, Ethereum, and Arbitrum. An OFT operates the exact same as an ERC20 with the additional function of bridge-ability through the LayerZero protocol.

Available Frax OFTs

  • FRAX

  • sFRAX

  • frxETH

  • sfrxETH

  • FXS

  • FPI

Legacy vs. Upgradeable OFTs

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 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

  • Msigs (links to gnosis safe)

Legacy OFTs

  • Chain: Ethereum, Metis, Blast, Base

  • Admin: Chain-respective msig

  • OFTs

    • FRAX: 0x909DBdE1eBE906Af95660033e478D59EFe831fED

    • sFRAX: 0xe4796cCB6bB5DE2290C417Ac337F2b66CA2E770E

    • sfrxETH: 0x1f55a02A049033E3419a8E2975cF3F572F4e6E9A

    • FXS: 0x23432452B720C80553458496D4D9d7C5003280d0

    • frxETH : 0xF010a7c8877043681D59AD125EbF575633505942

    • FPI: 0xE41228a455700cAF09E551805A8aB37caa39D08c

Upgradeable OFTs

  • Chain: Mode, Sei, Fraxtal, X-Layer

  • Admin: ProxyAdmin (owned by chain-respective msig)

  • OFTs

    • FRAX: 0x80eede496655fb9047dd39d9f418d5483ed600df

    • sFRAX: 0x5bff88ca1442c2496f7e475e9e7786383bc070c0

    • sfrxETH: 0x3ec3849c33291a9ef4c5db86de593eb4a37fde45

    • FXS: 0x64445f0aecc51e94ad52d8ac56b7190e764e561a

    • frxETH: 0x43eDD7f3831b08FE70B7555ddD373C8bF65a9050

    • FPI : 0xEed9DE5E41b53D1C8fAB8AAB4b0e446F828c1483

Source Code

Security Considerations

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.

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 ).

Bridge through the Stargate UI ()

Layer Zero OFT Frax Assets are not a liability of the Frax Protocol. They do not appear on the balance sheet on . 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.

LayerZero
link
link
Ethereum
Blast
Metis
Base
Mode
Sei
Fraxtal
X-Layer
https://github.com/fraxfinance/frax-oft-upgradeable
https://github.com/fraxfinance/layerzero-v2-upgradeable
facts.frax.finance
https://github.com/fraxfinance/frax-oft-legacy