Skip to content

Commit 81edece

Browse files
committed
add description
1 parent 6fb3449 commit 81edece

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

eip-0031.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,30 +119,34 @@ Compilation of babel fee box smartcontracts for different tokens of interest wil
119119

120120
The position of the recreated Babel Box in transaction's outputs must be set as a context extension variable in the spending Babel Box.
121121

122-
1. Context variable `0`
122+
1. Context variable `0`:
123123
* Type: `SInt`
124124
* Value: position of the recreated Babel Box in transaction's outputs
125125

126126
### Parameters
127127
Parameters (creator’s public key and price) are specified via registers, meaning the resulting babel fee boxes from different creators will always belong to the same P2S address, which will improve their searchability.
128128

129-
1. Register R4
129+
1. Register `R4`:
130130
* Type: `SigmaProp`
131131
* Value: creator's public key
132-
2. Register R5
132+
2. Register `R5`:
133133
* Type: `SLong`
134134
* Value: how much nanoErgs is the creator willing to pay for one babel token
135+
3. Register `R6`:
136+
* Type: `SColl[Byte]`
137+
* Value: id of the Babel Box being spent by this
138+
* Only required for recreated boxes
135139

136140
Babel fee box creator is able to spent the babel box in any circumstances.
137141

138-
Other users on the other hand can spend this box as input to their transaction only when they also recreate it as output of their transaction with the very same registers (R4, R5) values together with insertion of a required amount of babel tokens (the amount of inserted babel tokens multiplied by the price specified in the R5 register has to be equal to or bigger than the amount of nanoErgs spent from the babel fee box).
142+
Other users on the other hand can spend this box as input to their transaction only when they also recreate it as output of their transaction with the very same `R4` and `R5` registers values together with `R6` as described above and insertion of a required amount of babel tokens (the amount of inserted babel tokens multiplied by the price specified in the R5 register has to be equal to or bigger than the amount of nanoErgs spent from the babel fee box).
139143

140144
Wallets implementation
141145
--------------------------------------------
142146

143147
Wallet developers will need to decide whether they want to support EIP-0031 or not. If they do decide to support this standard, they should also decide on which tokens they want to support (this could be done based on user requirements – e.g. implementing big stablecoins or “meme” coins, etc.), as this could be more convenient than supporting all tokens.
144148

145-
As P2S addresses belonging to specific token of interest stay the same, these addresses could be easily “hardcoded” when supporting only a few tokens. If the developers decide to support any token, the previously mentioned smartcontract for each token which user holds should be compiled or "mounted" as described on ["Contract Template"](#contract-template) subsection and the availability of Babel Fee boxes (UTXOs) for the specific tokens of interest in the blockchain should be subsequently checked.
149+
As P2S addresses belonging to specific token of interest stay the same, these addresses could be easily “hardcoded” when supporting only a few tokens. If the developers decide to support any token, the previously mentioned smartcontract for each token which user holds should be compiled or "mounted" as described on ["Contract template"](#contract-template) subsection and the availability of Babel Fee boxes (UTXOs) for the specific tokens of interest in the blockchain should be subsequently checked.
146150

147151
The proposed babel fee smartcontract is quite general and does not impose much restriction for the transaction. It is therefore possible to transact some tokens while paying babel fees with another tokens, etc.
148152

0 commit comments

Comments
 (0)