Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

erc721

Actions

Actions

Description

wrapnft

mint to address with oracle approvals

unwrapnft

burn (called by user)

regoracle

register oracle

unregoracle

unregister oracle

regcust

register custodian

unregcust

unregister custodian

getOracle

Get oracle status by ethereum address

getCustodian

Get custodian status by ethereum address

getApproval

getApproval status by obtid

tokenURI

retrieve JSON information about NFT

setBaseURI

Change the baseURI path (custodian only)

_baseURI

Retrieve baseURI path (used as first portion of tokenURI)

State Variables

State variables

Description

custodian_count

Keeps track of the number of custodians active in the oracle. Required for consensus math

oracle_count

Keeps track of the number of custodians active in the oracle. Required for consensus math

uoracmapv

Incrementer used to generate unique id for unregoracle approval mapping

roracmapv

Incrementer used to generate unique id for regoracle approval mapping

ucustmapv

Incrementer used to generate unique id for unregcust approval mapping

rcustmapv

Incrementer used to generate unique id for regcust approval mapping

owner

Used to store contract owner (msg.sender) when deployed

oraclelist

list of active oracles

_baseURIextended

Stored baseURI

attribute[]

Holds the domain names for each tokenID 1:1

Events

Events

Description

wrapped

Event emitted when wrap has completed.
emit wrapped(account, tokenID, obtid);

unwrapped

Event emitted when user has unwrapped NFT.
emit unwrapped(fioaddress, tokenID);

custodian_registered

Event emitted when a custodian has been registered
event custodian_registered(address ethaddress, uint256 eid);

custodian_unregistered

Event emitted when a custodian has been unregistered
event custodian_unregistered(address ethaddress, uint256 eid);

oracle_registered

Event emitted when an oracle has been registered
event oracle_registered(address ethaddress, uint256 eid);

oracle_unregistered

Event emitted when an oracle has been unregistered
event oracle_unregistered(address ethaddress, uint256 eid);

...

Issue

Summary

Decision

Max transaction size

Should we put a max transaction size limit on mint into the ERC721 contract.

Not needed

ERC721 contract key

What is the status of the key used to set the contract?

Key should only be used for spinning up the contract and should be burned.

Oracle “Admin” functions

Do we need to enable the ability for Oracles to call various contract actions such as approve, transfer, mint, etc.

This can be performed in a couple of ways:
1 - The Oracles vote in who can execute the next essential action as follows:
Oracle 1 executes wrap action to mint using FIO obtid xxxxxxxx
Oracle 2 wrap action to transfer for the same FIO obtid to Alice
Oracle 3 executes wrap action for mint, but wrong recipient is provided. Trx goes to Alice defined by oracle 1 and 2

2 - The Oracles can sign the next transfer action as a multisig
This could be quite costly on the ethereum chain, but is possible to implement.
Example of multisig on ethereum https://github.com/christianlundkvist/simple-multisig/blob/master/contracts/SimpleMultiSig.sol

Decision: We do not want any Oracle admin functions.

Custodian “Admin” functions

Are there contract actions that should be exposed to Custodian “admin” approval?

  • Pause switch is an admin function.

  • Use case: refunds. If someone calls unwrap to the wrong address and it gets lost. We may want to enable the ability for Custodians to call 2/3+1 approval for a “mint” refund.

    • This can already be done by the Oracles calling wrap to a specific Ethereum address.

TBD: Are there any other contract actions that might be used for “admin” functionality?

Unwrap fee

Is there a fee for unwrap?

Yes. Unwrapping user pays the fee

...

  • Request is validated per Exception handling.

  • Consensus required. Transaction is executed when all registered oracles have called wrap (submitted their “observation”).

    • Current:

      • 3 oracles call wrap to get it approved

      • Then, one of the oracles call it again to execute.

    • Updated:

      • Adam todo: Do the mint when the 3rd oracle calls wrap DONE

  • NFT is minted and transferred to account

...

  • FIO Address

    • Less likely to be input incorrectly

    • Requires someone who buys NFT and then wants to unwrap it to own a FIO Address.

    • Devs agree that FIO Address is probably the cleanest path.

  • FIO Address hashed

    • Hash of address somewhat obfuscates the recipient

  • FIO Pub Key

    • Would allow for a checksum key check in the contract (which consumes gas). Not sure if the public key checksum is worth it

  • Current Decision: Use FIO Address

Fees

  • Alice covers the fee to unwrap

...