Versions Compared

Key

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

Table Structures:

...

  • Discuss fee distribution implementation with Pawel

  • Add new error responses and get discuss with Pawel

  • Add remaining questions and review with Pawel (or team?)

  • Discuss Oracle RAM question with Pawel

  • Update FIP with all decisions

Questions for FIP-17

Questions

Answers

Is there a minimum amount of FIO for wrapping or unwrapping?

Is there a maximum?

Right now we allow users to wrap their entire balance.

TBD: Fees

  • Should we make fee table more flexible, similar to what we do for FIO endpoint fees?

  • TBD: Casey to propose and review with team.

TBD: Requirements: RAM

  • Why do we increase RAM on Oracle-specific actions (since they are BPs with unlimited RAM)?

  • What should we set wrap RAM to?

Requirement: Distributing Fees

Approach #1: Fee claim action:

  • We create a call similar to that of bpclaim, where the balance is pooled and distributed to each oracle. This will require an oracle to call this action or risk losing their distributed fees.

  • What happens if a BP does not claim within 24 hours?

Approach #2: Fees distributed during actions (Preferred)

  • Each action involving fees would need to iterate through the registered oracle's table and send their share of the oracle fee directly to them.

TBD: Discussed with Pawel and decided we would use approach #2?

Table Structures

oracleledger

oracleledger keeps track of all wrapping transactions and logs the actor performing the request. This will be the same table used in both token and domain wrapping transactions.

TBD: ( type could be added in new iterations to allow for quick and simple index lookups based on status. )

...

...

Oracles

oracles tracks registered oracles used during the validation of unwrapping of NFT/tokens. This table also stores fee information used during the wrapping process.

...

oraclefees

The type oraclefees is defined as:

...

oracle_votes

The oracle_votes table is used during unwrapping operations. The registered oracles will call unwraptokens and either emplace a new record or modify the record if the oracle is not the first registered oracle to vote on the obt_it. Once an oracle calls this action and 100% consensus is reached, the unwrapping will be approved and funds will be transferred.

regoracle -

  • Oracle must be approved by eosio permissions ( BP msig )

  • Verifies oracle is a top 21 block producer.

  • emplaced a new record into the oracles table.

unregoracle -

  • Oracle must be approved by eosio permissions ( BP msig )

  • ereases oracle table entry

wraptokens -

  • validate parameters

  • emplace new receipt inside oracleledger

  • transfer tokens into the fio.oracle contract

  • transfer fees to each block producer ( may potentially duplicate the functionality of bpclaim )

unwraptokens -

...

validate parameters

...

verify fio.address is registered

...

search for obt_id inside oracle_votes

...

if found, search if oracle has voted prior. If oracle has not voted, add the account to the voters' vector

...

if not found, emplace a new record into orcale_votes table.

...

compute the number of registered oracles and total votes inside the record for that obt_id

...