Links
Wrapping Wiki: FIO Token and Domain NFT wrapping
Wrap use case: Wrap
Unwrap use case: Unwrap
Overview
Oracle code will be run by designated FIO Chain BPs with access to:
Oracles will:
On the FIO Chain
Monitor specific account by inspecting every block and looking for FIO contract
wraptokens
actionExecute 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 FIO wrapping/unwrapping contract specification is detailed in FIP 17.a: https://github.com/fioprotocol/fips/blob/master/fip-0017a.md
Github fio.oracle contract: https://github.com/fioprotocol/fio.contracts/tree/oracle/tokenwrap/contracts/fio.oracle
The Ethereum ERC20 wrapping/unwrapping contract
The Ethereum wrapping/unwrapping contract specification is detailed on the wiki: fio.erc20 - wFIO Contract Specification
Github fio.erc20 repository: https://github.com/fioprotocol/fio.erc20
Functionality
There are two main use cases that concern the Oracle, Wrap and Unwrap. These are detailed below.
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 | Casey Gardiner Need brief overview of what is happening: which contract is used |
Oracle monitors | Todd G What was the Go code doing to monitor the chain? |
Oracle validates | 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 | Adam Androulidakis Need brief overview of what is happening: which calls are used. What needs to be passed. |
Oracle validates | Todd G What type of validation is done on the Ethereum chain during a wrap? |
Once all Oracles have submitted | 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 | Oracle triggers | ||||
Invalid Ethereum address | Public address passed to | Oracle triggers | ||||
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 | Adam Androulidakis Need brief overview of what is happening: which contract is used, when does the burn happen? |
Oracle monitors | Todd G What was the Go code doing to monitor the chain? Does it confirm burn? |
Oracle validates | 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 | 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 | Todd G What type of validation is done on the Ethereum chain during a wrap? |
Once all Oracles have submitted | 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 | ||||
Add Comment