Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 10 Next »

Links

Overview

  • Oracle code will be run by designated FIO Chain BPs with access to:

    • FIO Chain: Existing FIO BPs already run FIO nodes.

    • Ethereum Chain: Local Ethereum node is preferred, but Infura or Etherscan can also be used.

  • Oracles will:

    • On the FIO Chain

      • Monitor specific account by inspecting every block and looking for FIO contract wraptokens action

      • Execute ERC20 wrap action to mint wFIO to the designated account

    • On the Ethereum Chain

      • Monitor Ethereum smart contract for inbound transfers of ERC-20 wFIO

      • Execute FIO contract unwrap action to transfer FIO to the designated account

The FIO wrapping/unwrapping contract

The Ethereum ERC20 wrapping/unwrapping contract

Functionality

There are two main use cases that concern the Oracle, Wrap and Unwrap. These are detailed below.

TBD: What are the watchdog/monitoring routines we expect from the Oracles?

Wrap

  • Wrap creates wFIO on the Ethereum chain.

  • See the following page for an overview of the Wrap use case: Wrap

Functionality

Alice (dApp) executes wraptokens on FIO chain

Casey Gardiner Need brief overview of what is happening: which contract is used

Oracle monitors wraptokens for transfers

Todd G What was the Go code doing to monitor the chain?

Oracle validates wraptokens transaction

Todd G Need bullet list of validations

If exceptions are found, Oracle takes action to unwind transaction

See Exception handling below

Todd G Need to flesh this out

Oracle executes wrap on Ethereum

Adam Androulidakis Need brief overview of what is happening: which calls are used. What needs to be passed.

Oracle validates wrap transaction

Todd G What type of validation is done on the Ethereum chain during a wrap?

Once all Oracles have submitted wrap, the wFIO Tokens will be minted and transferred to designated Ethereum public address

Todd G Does the oracle do any kind of monitoring or validation of the overall transaction (post consensus?)

Exception handling

Error condition

Trigger

Type

fields:name

fields:value

Error message

Oracle Action

Invalid chain

Chain passed to wraptokens action is not Ethereum (Note: this restriction is not enforced in the FIO Contract to allow for wrapping chain expansion without deployment of code)

Oracle triggers unwraptokens action to send FIO back to originating address

Invalid Ethereum address

Public address passed to wraptokens action is not a valid Ethereum address (Note: this restriction is not enforced in the FIO Contract to allow for wrapping chain expansion without deployment of code)

Oracle triggers unwraptokens action to send FIO back to originating address

Unwrap

  • Unwrap converts wFIO on Ethereum chain to FIO Tokens on FIO chain.

  • See the following page for an overview of the Unwrap use case: Unwrap

Functionality

Alice (dApp) executes unwrap on Ethereum chain

Adam Androulidakis Need brief overview of what is happening: which contract is used, when does the burn happen?

Oracle monitors unwrap for transfers

Todd G What was the Go code doing to monitor the chain? Does it confirm burn?

Oracle validates unwrap transaction

Todd G Need bullet list of validations

If exceptions are found, Oracle takes action to unwind transaction

See Exception handling below

Todd G Need to flesh this out

Oracle executes unwrap on FIO chain

Casey Gardiner Need brief overview of what is happening: which calls are used. What needs to be passed. How does the FIO get transferred.

Oracle validates unwrap transaction

Todd G What type of validation is done on the Ethereum chain during a wrap?

Once all Oracles have submitted unwrap , the FIO Tokens will be transferred to designated Ethereum public address

Todd G Does the oracle do any kind of monitoring or validation of the overall transaction (post consensus?)

Exception handling

Error condition

Trigger

Type

fields:name

fields:value

Error message

Oracle Action

Invalid FIO Address

FIO Address passed in with ERC-20 is not valid or does not exist

Oracle triggers a ERC20 wrap action to send wFIO back to originating addres

Oracle Components

  • No labels