Versions Compared

Key

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

Notes: _beforeTokenTransfer action of erc721 OZ implementation has been overridden to prevent tranasfers of NFTs to the contract address. Error: “Cannot transfer to contract”

...

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

...

  • Request is validated per Exception handling.

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

    • 3 oracles call wrap to get it approved

    • Do the mint when the 3rd oracle calls wrap DONE

  • NFT is minted and transferred to account

...

Error condition

Trigger

Type

Error message

Invalid oracle

Oracle is not registered

400

"Oracle not registered"

No authority

The signer is not a registered Custodian and does not have authority to call this function

403

"AccessControl: account [user account] is missing role [role hash]"

Already approved

Oracle address tries to approve a wrap multiple times

400

“sender has already approved this hash”

Already complete

Oracle tries to approve a wrap that has already been completed

400

“Approval already complete”

Approver must execute

Oracle tries to execute wrap it didn’t approve

400

“An approver must execute”

Invalid account

Ethereum account is not valid

400

“Invalid account”

No Minimum 3 oracles are registeredrequired

Trying to unregister an oracle when none are registered anymorethere are only 3 active

400

“No “Minimum 3 oracles remaining”required”

Response body

Parameter

Format

Definition

Event

String

consensus_activity event emitted on successful approval

RoleRevoked, oracle_unregistered and consensus_activity events emitted on successful unregister of an oracle

...