TradeOffer.fi
  • What is TradeOffer.fi?
  • Safety Features
  • On-Chain Addresses
  • TradeOffer DAO
  • Smart Contract
  • TradeOffer vs other Dapps
Powered by GitBook
On this page

Smart Contract

PreviousTradeOffer DAONextTradeOffer vs other Dapps

Last updated 2 years ago

The TradeOffer.fi contract is built upon the open source swap contract from Anyswap. The contract was modified to be simpler and more gas-efficient.

Our smart contract never takes custody of any funds and is not upgradeable. The purpose for the contract is to ensure that both maker and taker are sending the correct funds to each other.

Verified Mainnet Contract is deployed at:

Smart Contract Flow

  • Trade Creator creates a new offer, selecting the tokens they want to trade as well as the tokens that they want to receive in exchange. The trade creator can choose between a private or public offer.

  • Trade Creator sets 1 time spending allowance to the TradeOffer.fi smart contract

  • Trade Creator signs a transaction with the trading details as well as the deadline for the trade and additional requirements (signing is free, no gas needed)

  • Trade Creator receives a unique URL that can be used to share the trade details with others. If the trade is public TradeOffer.fi will show the offer on its platform. If the trade is only for whitelisted wallets the offer will be hidden from the platform.

  • If a trader wants to take the trade they will interact with the smart contract. The contract ensures that the trader is sending the correct amount of tokens and ensures the trade creator still has the tokens in their wallet and the correct permissions to the contract to trade.

https://etherscan.io/address/0x8fca5f8455ad1e423761ef7a50d62ef407a4a9c0