Applications to Revisions of ERC20: Some of the
most popular revisions of token standards are:
1. ERC-721: is a standard interface for non-fungible
tokens, like a deed for an artwork or a song,
2. ERC-777: allows people to build extra function-
ality on top of tokens such as a mixer contract for
improved transaction privacy or an emergency re-
cover function to bail you out if you lose your pri-
vate keys,
3. ERC-1155: allows for more efficient trades and
bundling of transactions – thus saving costs. This
token standard allows for creating both utility to-
kens (such as $BNB or $BAT) and Non-Fungible
Tokens like CryptoPunks, and
4. ERC-4626 - A tokenized vault standard designed
to optimize and unify the technical parameters of
yield-bearing vaults.
ERC777 is a refinement of ERC20 and provides a new
feature called hooks, to simplify the sending process
offering a single channel for sending tokens to any
recipient. One of the main differences with respect
to ERC20 is the mechanism of allowing processes
to manage tokens on behalf of others. In ERC20,
the approve method lets an account owner p define
an amount of tokens that some process p
0
can spend
from the account of p. In contrast, the operator in
ERC777 allows process p
0
that has been approved by
p to spend all the tokens owned by the approving pro-
cess p.
It is clear that standards like ERC777, ERC721
etc., need to be further analyzed for robustness with
respect to the intended interpretation. Our methods
discussed above provide a sound approach for fur-
ther investigation of the revisions and assist in arriv-
ing at robust deterministic behaviour of correspond-
ing smart contracts.
7 CONCLUSIONS
We have discussed the issues of nondeterminism in
ERC20, and analysed the complexity of synchroniza-
tion requirements of ERC20. Using the approach of
linearization , we have shown how the general ERC20
smart contract is not linearizable demonstrating the
strong synchronization requirements of ERC20 in
comparison to just simple smart contracts for cryp-
tocurrency operations. Further, we have demonstrated
through the approach of interference-freedom, how
constraints can be derived for enforcing a determin-
istic behaviour on ERC20. We discussed a sketch
of the implementation in Solidity using guarded
execution of method calls - that is all the meth-
ods are preceded by appropriate guards (as in Dijk-
stra’s guarded commands). In a sense, our applica-
tion of linearization and the approach of interference-
freedom have highlighted how overlapping execution
of interfering programs leads to nondeterministic be-
haviour. The approach of interference-freedom high-
lighted allows us to see how appropriate constraints
can be placed to overcome concurrent overlapped ex-
ecution of interfering programs. As illustrated in 6.2,
the approach provides assistance in arriving at con-
straints for which efficient wait-free implementations
can be realized without loosing the intuition of the So-
lidity sequential specification of smart contracts. The
approach further assists in analysing a plethora of to-
ken standards as most of the revisions are backward
compatible and have additional features along with
powerful methods.
In summary, the paper has analysed the complex-
ity of ERC20 from different perspectives and the tech-
niques proposed are also of general interest to smart
contract designers to visualize deterministic execu-
tion of smart contracts on blockchain platforms.
REFERENCES
Alpos, O., Cachin, C., Marson, G., and Zanolini, L. (2021).
On the synchronization power of token smart con-
tracts. In 2021 IEEE 41st ICDCS, pages 640–651.
Berry, G., Ramesh, S., and Shyamasundar, R. K. (1993).
Communicating reactive processes. In Proc. of the
20th ACM POPL, page 85–98.
Bouajjani, A., Emmi, M., Enea, C., and Hamza, J.
(2013). Verifying concurrent programs against se-
quential specifications. volume LNCS, 7792, pages
290–309. Springer Berlin Heidelberg.
Dickerson, T., Gazzillo, P., Herlihy, M., Saraph, V., and
Koskinen, E. (2018). Proof-carrying smart contracts.
In Financial Cryptography and Data Security: FC
2018, page 325–338. Springer-Verlag.
Fischer, M. J., Lynch, N. A., and Paterson, M. S. (1985).
Impossibility of distributed consensus with one faulty
process. J. ACM, 32(2):374–382.
Guerraoui, R., Kuznetsov, P., Monti, M., Pavlovi
ˇ
c, M., and
Seredinschi, D.-A. (2019). The consensus number of
a cryptocurrency. In Proc. 2019 ACM PODS, page
307–316, New York, NY, USA.
Herlihy, M. and Shavit, N. (2012). The Art of Multipro-
cessor Programming, Revised Reprint. Morgan Kauf-
mann Publishers Inc., San Francisco, CA, USA, 1st
edition.
Owicki, S. and Gries, D. (1976). An axiomatic proof
technique for parallel programs i. Acta informatica,
6(4):319–340.
Sergey, I. and Hobor, A. (2017). A concurrent perspective
ERC20: Correctness via Linearizability and Interference Freedom of the Underlying Smart Contract
565