Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
maxLevel2

Tech Environment

...

TBD: Ropsten vs. local node?

Wrap FIO Domain

Use Case

  • User A wants to wrap FIO Domain to P public address on C chain.

  • User A fetches amount of Oracle fee using /get_oracle_fees.

  • User A executes wrapdomain action and passes in:

    • fio_domain (D) to wrap

    • public_address (P) on chain C where domain should be delivered

    • chain_code C

    • max_oracle_fee - maximum amount of FIO user A is willing to pay the Oracles

  • FIO Domain is transferred to wrapping smart contract account

  • Oracle fee is transferred from user A and distributed evenly to all registered Oracles.

  • Oracles monitor every block looking for wrapdomain action.

  • Once detected Oracles trigger minting of FIO Domain NFT on another chain.

Unwrap FIO Domain

Use case

...

User A wants to unwrap X FIO Tokens to P public address on FIO Chain.

...

User A executes action on another chain (not covered by this FIP):

...

Oracles monitor every block on another chain (not covered by this FIP).

...

Once detected each Oracle executes unwraptoken action and passes in:

  • fio_public_key where to transfer tokens

  • amount (X) of FIO tokens to transfer

...

Wrap FIO Tokens

Transfers FIO Tokens to designated FIO account for the purpose of wrapping.

Use case

  • User A wants to wrap X FIO Tokens to P public address on C chain.

  • User A fetches amount of Oracle fee using /get_oracle_fees.

  • User A executes FIO wraptokens action and passes in:

    • amount (X) of FIO tokens to wrap

    • public_address (P) on chain C where tokens should be delivered

    • chain_code C

    • max_oracle_fee - maximum amount of FIO user A is willing to pay the Oracles

  • X FIO Tokens are transferred to wrapping smart contract account.

  • Oracle fee is transferred from user A and distributed evenly to all registered Oracles.

  • Oracles monitor every block looking for wraptoken action (not covered by this FIP).

  • Once detected Oracles trigger minting of wrapped tokens on another chain.

Unwrap FIO Tokens

Transfers FIO Tokens from fio.wrapping to designated FIO account.

Use case

  • User A wants to unwrap FIO Domain to P public address on FIO Chain.

  • User A executes action on another chain (not covered by this FIP):

  • Oracles monitor every block on another chain (not covered by this FIP).

  • Once detected each Oracle executes unwrapdomain action and passes in:

    • fio_public_key where to transfer domain

    • fio_domain (D) to transfer

  • Once the last Oracle executes unwrapdomain action, FIO Domain is transferred to P.

Oracle Fees

  • Oracles set a fee they desire for wrapping.

Setting Oracle Fees

  • Each Oracle submits a fee for token and domain wrapping using setoraclefee.

  • Oracle fee is set to median of fees provided by all Oracles and then multiplied by number of registered oracles.

Fee Distribution

  • Oracle fee is transferred from user A and distributed evenly to all registered Oracles.

Expiring Domains

Preferred approach = Burn

  • Oracle monitors wrapped domains on the FIO chain.

  • When the FIO Domain burn date hits, the Oracle calls the Ethereum contract burn function

Alternative proposals:

  • URI that points to the expire date so that it can be checked.If someone re-wraps a domain that previously was wrapped