November 28, 2020
Flare And Spark And Its Main Functions (explained)
SPARK TOKEN DISTRIBUTION
25 Bn Spark will be distributed to Flare Network Limited (for profit)
30 Bn Spark will be distributed to the Flare Foundation (non-profit)
45 Bn Spark will be distributed to all accounts with XRP holdings on December 12, 2020, and that claim Spark no later than 6 months after the fork. (Except Ripple labs accounts)
(For each XRP will be distributed at least 1 Spark. )
45 Bn Spark will be claimable for 6 months from snapshot date
In order to have the right to claim Spark, you need to store your XRPs on December 12, 2020 on non-custodial wallet (ex. Ledger, Nano, Trustwallet, etc. ) or wallet/exchange that supports distribution and listed in the following link:
https://flare.xyz/supporting-exchanges/
You can visit https://flare.ghost.io for more information about claiming Spark.
It is certain that Flare brings great value to XRP, what XRP will surely benefit from.
Flare itself has a lot of attributes to take place among top blockchains. It is yet to see whether Flare is going to compete with other networks providing interoperability or maybe it will build a bigger ecosystem with networks like Polkadots and Cosmos.
I expect now that in foreseeable future will launch decentralized exchange, not only with ERC-20 tokens but will all cryptocurrencies (at least the biggest ones).
As well trustless issues stablecoin on XRP Ledger backed by Spark or FXRP is something we can expect.
CREATING FXRP
For example:
Alice has 1000 XRP but she needs 100 FXRP.
Bob is an agent from the Flare Network. He has 5000 Sparks and non FXRP.
Bob wants to earn some fees, so he puts 5000 Sparks in FXRP-System.
For now, all Sparks are unlocked, because they not used as collateral yet. Bob doesn't earn any fees yet.
Alice wants to mint 100 FXRP so she can use smart contracts. We call Alice originator.
1 XRP = 10 Spark
1 Spark = 0.1 XRP
In order to issue 100 XRP, Sparks must be reserved as collateral. Collateral must be 2.5 times values of XRP.
100 x 10 Spark x 2.5 = 2500 Sparks
FXRP system locks 2500 of Bob's Sparks.
Bob still owns 5000 Sparks, but only unlocked Sparks are transferable.
Alice must pay the agent 0.1% in the reservation fee.
Since Alice wants to mint 100 XRP, she must transfer now 100 XRP to the agent in XRP Ledger + 5% in creation fee payable to the agent.
When collateral is locked, reservation and creation fees are paid, it's time to mint FXRP.
Alice has 100 FXRP and agent Bob earned reservation and creation fees.
REDEEMING FXRP
Alice wants her FXRP back
Alice starts by sending her FXRP back to FXRP-System. She has to pay 0.1% redemption fee to the agent.
FXRP-System destroys 99.9 FXRP
The agent sends 99.9 XRP to Alice on XRP Ledger.
Collateral unlocks since FXRPs, that collateral were used for, no longer exist.
Now all 5000 Sparks in FXRP-System are transferable.
What happens if agent's collateral ratio falls under 2.5?
So Alice still has XRP and Bob's Sparks are locked.
Now, XRP/Spark ration changes from 0.1 to 0.08.
1 XRP = 12.5 Spark
1 Spark = 0.08 XRP
100 of XRP are issued, the amount of collateral need to secure the FXRP at the new rate is:
100 × 12 × 2.5 = 3 125
The FXRP-System now locks 1 125 more Spark:
3 125 - 2500 = 625
What if an agent neglect his duties under redemption?
Let's say we are on a bull run and Bob spend almost all his XRP on brand new Lambo 😆
Now when Alice wants to redeem 100 FXRP, Bob doesn't have enough XRP. He sends 2 XRP to Alice.
The FXRP-System sends Alice value of the missing 98 XRP in Sparks and a 1% compensation fee.
98 XRP = 1225 Sparks
1% of 98 XRP = 12.25 Spark
On an exchange she can buy for that 98.98 XRP 1237.25 x 0.08
Bob get penalized half if the remaining collateral, 943.875 Spark are burned as penalty.
FLARE TIME SERIES ORACLE
How does it work?
Determination of XRP/Spark price
The Flare Time Series Oracle is a decentralized application that aims to generate accurate estimates of off-chain time series data on the Flare Network.
In our example, FTSO will aim to generate accurate price of XRP.
The Oracle takes as inputs estimates from two sets of participants: Spark holders and relevant F-asset holders.
They wil participate in FTSO by voting on XRP/Spark price.
1 XRP = 2 Sparks
We start by recalculating FXRP into Spark.
So Alice had 1 XRP x 2 = equivalent of 2 Sparks. In that case, Charlie has 6 Sparks tokens.
Combined voting power of XRP holders is 8 Sparks.
While voting power of Spark holders is 40 (Bob and Eve). It means Spark voting power is 5x compare to FXRP holders. Voting power of each FXRP holder must be adjusted with 5x.
Alice 2 x 5 = 10 Charlie 6 x 5 = 30
Now FXRP holders (Alice and Charlie) and Spark holders (Bob and Eve) has equal voting power.
Total votes = 80
Now we can voting for XRP/Spark price.
Alice submitted 3 votes, Bob 4 votes, Charlie 5 votes, and Eve 6 votes.
Next the top 25% and lower 25% of votes are discarded.
25 of 80 = 20 votes
We will discard 20 votes from the bottom and 20 from the top.
Alice voted for the lowest price so we start with her. We discard all of her votes, since she had only 10.
There are still 10 lowest votes to discard.
Next with the lowest vote is Bob, since he voted for 4. We gonna discard of his 10 votes.
Now we have to discard top 20 votes, which belongs to Eve.
And we are left with the remaining 50% of votes. That means we can calculate with the remaining.
The Oracle output = 4.75
How the Oracle rewards divides among voters?
Initially, Bob had 20 votes and Charlie 30.
Bob's 10 of 20 votes survived and contributed to the output. Whilst all of Charlie's votes contributed to the output.
In that case, Bob will receive 0.5/1.5 = 33% of Oracle reward. And Charlie 1/1.5 = 66% of Oracle reward.
If you happen to read this part and didn't understand the explanation, you can watch the video below @ 15:00 about creating and redeeming FXRP.
Watch, like, and subscribe to @antyFOMO YT channel 😊
Thank you for reading!
Very well written, can see you put a lot of effort into this and we appreciate that!