# The Swamp - Beta

### Overview:

***

The Swamp is an ERC20 analysis tool which incorporates AI for a fully fledged token audit. Giving traders an edge over their trades with automated token scanning.

{% embed url="<https://swamp.seagen.app>" %}

### What The Swamp can detect.

Aside from basic token information such as name, symbol, total supply, etc.&#x20;

The Swamp is capable of detecting token taxes, maximum buys/transactions, and provide an overall security score for any project, ranging from 1-100.

### Available Chains. (subject to change)

***

The Beta release is only available on BSC and ETH. Given that these chains have a high volume of ERC20 trades, they are suitable candidates for garnering data for the release. There is a requirement to be connected to the dApp in order to activate an automated audit.

<figure><img src="https://1316009277-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3OaEI2DsaZnWFi3is6Pm%2Fuploads%2FMmvBNRsujHFHdiJHMNac%2Finterface.PNG?alt=media&#x26;token=9c53b7b3-d7d1-4c9d-9258-b0daa78f2f31" alt=""><figcaption><p>The implementation and interface is seamless, with minimal </p></figcaption></figure>

### Key AI Features.

***

1. [Detecting token taxes and owner functions using AI.](#detecting-token-taxes-and-owner-functions-using-ai.)
2. [Honeypot detection.](#honeypot-detection.)
3. [Predicting price in the future.](#predicting-price-in-the-future.)
4. Getting holder information with wash-trading detection.

### Detecting token taxes and owner functions using AI.

***

Retrieving token taxes is often as simple as querying an ABI for a function match titled `getBuyTax()`  or `getBuyFee()`&#x20;

However, there are no limitations to what a project owner can name their tax function so at this point you would need to query the actual internal logic of the function in order to assess whether or not a tax is applied to the DEX trade.

This can be arduous, and leaves a lot of room for error, as Solidity isn't strict about their standard function naming & has no standardized SDKs within which there are predefined function conventions. In which case, a project owner can simply modify all of the contract names to be completely unrecognizable and have a roundabout flow that bypasses any automated auditing tool.

Unfortunately, this is the reality of the market. However, our GPT-4 implementation has a unique structure wherein we can pass certain features to look out for on a base contract/set of contracts and it is able to query the functionality and provide a robust analysis on token taxes and any owner functions that might be problematic for a user such as `setMaxBuy()`, `blacklist()` etc.

### Honeypot detection.

***

Honeypots are malicious token contracts that appear as though they are fully tradeable but in reality, they are actually only purchasable, with no option for selling. These kinds of tokens allow scammers to take advantage of traders that are not as experienced in identifying safe trades.

The basis for establishing whether or not a token is a honeypot are as follows:

1. Can the owner disable trading with whitelist for specific wallets.
2. Can the owner set a max tax of higher than 49%
3. Can the owner mint tokens after they have deployed the contract.

As mentioned in our [detection metrics section](#detecting-token-taxes-and-owner-functions-using-ai.), we are capable of detecting owner functions with default naming conventions without the use of AI, but to bypass any users trying to cheat the system, we have incorporated an in-house GPT-4 implementation in order to catch any actors who have renamed their functions in an attempt to bypass our system.&#x20;

#### Caching data.

Contracts that have been scanned get immediately cached on our system. This means that when you input the same contract address again, there are faster response times and any contract ABIs get stored in our database, if there is a similar one detected, then this is output to the user.

### Predicting price in the future.

***

#### <mark style="color:yellow;">CAUTION: OUR AI CANNOT GUARANTEE 100% ACCURACY, DO YOUR OWN RESEARCH.</mark>

<mark style="color:green;">**This Feature is only available for projects that have been trading for more than 30 days with a minimum of 200,000 USD in trades.**</mark>

For the beta release, the AI will only make estimates of whether or not a project price will go `up` or `down` on the next trade. Further iterations of the product will output ranges for the price with an initially broad difference and timeframe for movement -&#x20;

*i.e.*&#x20;

`Current token price: 0.08 USD`

`Predicting: 24/11/23, 21:00 - 0.9-0.12 USD`

`Predicting: 24/11/23, 21:30 - 0.1-0.13 USD`

`Predicting: 24/11/23, 22:00 - 0.1-0.13 USD`

### Getting Holder information with wash trade detection.

***

The holders/holder count are important aspects of any token. Often times, teams will wash trade a token for a number of wallets and create the illusion that multiple new holders/buyers have come in to trade the project.

These illusions can often create mass FOMO, where ultimately, the user gets dumped on/falsely lured into a honeypot or a rug.

<mark style="color:yellow;">This feature is a</mark> <mark style="color:green;">premium feature</mark> <mark style="color:yellow;">of the dApp and is only available for projects trading with the</mark> [<mark style="color:yellow;">Uniswap Universal Router</mark>](https://docs.uniswap.org/contracts/universal-router/overview)<mark style="color:blue;">.</mark>

It works by:

1. User pasting in a contract address - with specifying the network.
2. Tracks all 'swap' events on the [Universal Router](https://docs.uniswap.org/contracts/universal-router/overview).
3. Indexes each 'to' and 'from' and maps it to a count variable.
4. An abnormal **count** for any specific wallet. i.e. More than 10% of all trades come from one wallet is flagged.
5. User gets output any results where the wallet made more than 5% of trades for a token.
6. Updates the [Score](https://seagen.gitbook.io/seagen/ai-tools./the-swamp-beta/score.) of a contract address and caches it.
