AirSwap Team
Oct 5, 2017 · 3 min read

Today we are publishing two Ethereum smart contracts for public review.

The AirSwap exchange contract facilitates atomic swaps of ERC20 tokens between two Ethereum addresses. The contract is considered the “on-chain” part of the protocol, and everything prior is the “off-chain” work done between peers. Two independent audits have been completed by Phil Daian and Nick Johnson that will soon be available in the GitHub repository.

Exchange Contract

The exchange contract takes advantage of the ERC20 standard to transfer token balances between counterparties. After approving the contract to transfer his or her balances, a trader submits a signed order by calling a function “fill”. This function then calls “transfer” on each respective token to complete the trade.

Token Contract

The token contract is based on ERC20, but includes some special features. First, token holders may lock a balance of tokens for a set amount of time. This allows off-chain services to detect these locks and provide additional utility to users who have locked. All token transfers are locked until October 17, 2017 at 10:10:10 AM ET. The token contract is also “pausable”, which means that we can pause transfers in case of a major security vulnerability.

Because transfers are locked and the sale is being done through the exchange contract, the token contract is constructed with an initial balance for the sale wallet. During the sale, the sale wallet signs orders and buyers fill them on the exchange contract.

Bug Bounty

We will run a bug bounty indefinitely to reward community members for discovering and reporting bugs. The scope of the bounty will be limited to Exchange.sol and AirSwapToken.sol and the contracts they inherit from.

The value of rewards will vary depending on severity as judged by the AirSwap team. The severity of a bug is determined according to the OWASP risk rating model based on Impact and Likelihood, as employed in the Ethereum bug bounty campaign:

Bounty payout is as follows:

  • Low: Up to 5 ETH
  • Medium: Up to 20 ETH
  • High: Up to 50 ETH
  • Critical: Up to 100 ETH

A few friendly rules:

  1. Bounties go to the first to report.
  2. Don’t steal or attempt to steal others funds.
  3. Don’t publicly disclose a bug before it has been fixed.
  4. Paid auditors of this code are not eligible for rewards.
  5. Issues that are mentioned in the security audits are not eligible.
  6. Non-security critical issues (style issues, gas optimizations) are not eligible.
  7. Determinations of eligibility, score and all terms related to an award are at the sole and final discretion of the AirSwap team.

Please take a close look at our contracts on GitHub and submit any issues for review to

To learn more about AirSwap, sign up for email updates on our website. To stay up to date on AirSwap news and announcements, follow us on Facebook, Twitter, and join the conversation on Telegram.


Rebuilding Finance for a Frictionless World

AirSwap Team

Written by

AirSwap is a peer-to-peer trading network built on Ethereum. Our mission is to empower people through global, frictionless trade.



Rebuilding Finance for a Frictionless World

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade