Appendix A Terminology
SWAPP — the utility token and smart contract described here.
TESLA— the base unit of the SWAPP token, similar to wei for ETH, or satoshi for BTC. One SWAPP equals one quintillion TESLA (1,000,000,000,000,000,000).
Stake — a time locked deposit of SWAPP which earns interest over time.
Auction Phase — the first thirty(30) days of the contract’s existence, during which users may deposit ETH to reserve part of the initial supply of SWAPP.
Circulation Epoch — the epoch immediately following the end of the LT Epoch, during which users may mint their tokens reserved in the LT Epoch, transfer tokens, stake tokens, etc.
ERC-20 — a standard interface for Ethereum smart contract tokens. ERC stands for “Ethereum Request for Comment”. The original EIP (Ethereum Improvement Proposal) describing ERC-20 tokens can be found here.
Appendix B Coding Standards
The SWAPP contract is written entirely in Solidity and compiled with solc 0.7.2.
All public interfaces (at a minimum) should be annotated using the NatSpec format.
Unit tests should provide 100% coverage of the source code. All conceivable edge and corner cases should be covered.
Function and variable names should convey their purpose and usage as clearly and tersely as possible, in plain English. Avoid using digits, unnecessary abbreviations, acronyms, shorthand, or slang.
Functions should be as short as is practical. They should do what their name implies, and not much else. A good rule of thumb is that a function should try to be viewable in its entirety on a typical monitor, at a typical font size, if at all possible.
Appendix C Source Code Audit
The Swapp Foundation has obtained a paid, professional audit of the SWAPP contract Solidity source code from RD Auditors, a reputable auditing firm. The full audit report is included below.
Findings: The auditors’ conclusion was, “We have used all possible tests based on the given object. We found no critical, high, [or] medium level issues so it is good to go for production. Security state of reviewed contract is “secured”.”
Adams, H. (2020, February). Uniswap whitepaper. https://hackmd.io/@Uniswap/HJ9jLsfTz
Adams, H., Zinsmeister, N., Robinson, D. (2020, March). Uniswap v2 core. https://uniswap.org/whitepaper.pdf
Mushegian, N., Brockman, D., Brockman, M. (2018, February 6). Reference implementation of the decentralized DAI stablecoin issuance system. https://makerdao.com/purple/
Oraclize. (n.d.). A scalable architecture for on-demand, untrusted delivery of entropy. Retrieved March 22, 2020, from https://provable.xyz/papers/random_datasource-rev1.pdf.
Provable Things. (n.d.). Security deep dive. Provable docs. Retrieved March 22, 2020, from https://docs.provable.xyz/#security-deep-dive
Vogelsteller, F., & Buterin, V. (2015, November). EIP-20: ERC-20 token standard. https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
Wood, G. (2019, October 20). Ethereum: A secure decentralized generalized transaction ledger: Byzantium version 7e819ec. https://ethereum.github.io/yellowpaper/paper.pdf
Zhang, Y., Chen, X., & Park, D. (2018, October). Formal specification of constant product (x × y = k) market maker model and implementation. https://github.com/runtimeverification/verified-smart-contracts/blob/uniswap/uniswap/x-y-k.pdf
Copyright © Swapp Protocol 2021