> For the complete documentation index, see [llms.txt](https://thanasdefitools.gitbook.io/thanasdefitools-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://thanasdefitools.gitbook.io/thanasdefitools-docs/readme.md).

# Introduction

A collection of DeFi tools for Flare and Songbird, at [thanasdefitools.xyz](https://thanasdefitools.xyz). Each tool has its own page on the site and a card on the front page. The site's menu groups them: **Trade** (Swap, Limit Orders, Sweeper), **Earn** (Yield Vaults, FACT) and **Enosys** (DEX V3 Positions, Governance, Bridge, Loans), with Portfolio on its own. Every page reads the chain straight from your browser: there is no server between you and the contracts.

Some tools only send what you receive straight back to your wallet, and their owners have no power to move your funds: **Swap**, **DEX V3 Positions** and **Sweeper**. **Limit Orders** holds each order's position until it is closed or cancelled; its owner cannot touch an order through the contract's functions, but can upgrade the contract. **Portfolio** only reads. **Governance**, **Bridge** and **Loans** are pages for Enosys's own contracts. **FACT** and the **Yield Vaults** are vaults that hold your deposit, with owner and keeper roles. Each tool's section says which applies.

## The tools

### Portfolio — `/portfolio`

Everything a wallet holds and can claim across these tools, on Flare and Songbird at once: liquidity positions, vault shares, FACT, limit orders, governance stakes and every reward waiting to be claimed. Read-only: it sends nothing.

→ [What Is Portfolio?](/thanasdefitools-docs/portfolio/what-is-portfolio.md)

### Yield Vaults — `/vaults`

ERC-4626 vaults that stake an Enosys token, harvest its rewards and compound them into the share price: **yCDP**, **yAPS** and **yHLN** on Flare, **ySFIN** and **yEXFI** on Songbird. The vaults hold your deposit. An owner behind a 48-hour timelock can change settings and upgrade the contracts, and a guardian can pause deposits. **Beta, not independently audited.**

→ [What Are the Yield Vaults?](/thanasdefitools-docs/yield-vaults/what-are-the-yield-vaults.md)

### Swap — `/swap`

The best rate for any token on Flare, across Enosys, SparkDEX and BlazeSwap pools and the sFLR, stFLR, yAPS, yHLN and yCDP staking routes. Routing runs in your browser. The router contract cannot change, and always pays at least the minimum you were shown.

→ [What Is Swap?](/thanasdefitools-docs/swap/what-is-swap.md)

### Limit Orders — `/limit`

Limit orders on Enosys V3, SparkDEX V3.1 and SparkDEX V4. Place one order, or a ladder of up to 10 across a price range, and walk away. When the market crosses your price, anyone can close the order and earn a share of its LP fees.

→ [What Are Limit Orders?](/thanasdefitools-docs/limit-orders/what-are-limit-orders.md)

### DEX V3 Positions — `/liquidity`

Every Enosys V3 pool on Flare and Songbird, and your positions in them. Add or remove liquidity, collect fees, claim rewards, close a position and burn it once it is empty. On Flare you can also compound, adjust or recenter a range, or pay into a position with a single token, in one transaction through the **LiquidityHelper**, a contract that holds nothing between transactions.

→ [What Is DEX V3 Positions?](/thanasdefitools-docs/dex-v3-positions/what-is-liquidity.md)

### Governance — `/governance`

Enosys governance from its contracts: stake HLN, APS, EXFI or SFIN, claim your rewards before they expire, reclaim returned voting fees, and vote on proposals. The **Stats** tab shows each staking pool's daily APY and rewards.

→ [What Is Governance?](/thanasdefitools-docs/governance/what-is-governance.md)

### Bridge — `/bridge`

Transfers through the Enosys Bridge: USDT, ETH and QNT between Ethereum and Flare, USDT and ETH between Ethereum and Songbird, and XDC between XDC and Songbird. The page checks the route before every deposit and follows each transfer until it arrives.

→ [What Is the Bridge?](/thanasdefitools-docs/bridge/what-is-the-bridge.md)

### Loans — `/loans`

Enosys Loans straight from its contracts: borrow the CDP Dollar against FXRP, WFLR, stXRP or sFLR, manage your troves, deposit in the Stability Pools and yCDP, and claim the incentives. Every change is checked against the contracts' rules in plain words before it is sent, and the page turns its transactions off if Enosys upgrades a contract it sends to.

→ [What Is Loans?](/thanasdefitools-docs/loans/what-is-loans.md)

### Sweeper — `/sweeper`

One-transaction clean-up of wallet dust. One Permit2 signature pulls many tokens, swaps each through the best venue (Enosys Route, then OpenOcean, BlazeSwap or Enosys V2), and pays the total out as WFLR or USDT0. Tokens nobody will buy can be burned instead.

→ [What Is the Sweeper?](/thanasdefitools-docs/sweeper/what-is-the-sweeper.md)

### FACT — `/fasset-lst`

Liquid staking on FAsset agent collateral pools. Deposit WFLR and receive **FACT**, an 18-decimal ERC-4626 share. The vault spreads its WFLR across several FXRP agents, harvests their minting and redemption fees, and adds them to the share price. **Beta, not independently audited.**

FACT holds your deposit. Anyone can run a harvest. Deploying idle WFLR to agents and rebalancing between them is done by a keeper or the owner. The owner (a hardware wallet, through an admin contract) can change fees within fixed caps, add and remove agents, and pause the vault; a pause also stops redemptions.

→ [What Is the FAsset Collateral LST?](/thanasdefitools-docs/fact/what-is-fact.md)

## Why use ThanasDefiTools

* **No servers.** Every page reads and writes the chain from your browser, through public endpoints.
* **No custody in the trading tools.** The Swap router, the Sweeper and the LiquidityHelper hold tokens only inside your own transaction. A limit order's position is held by its contract until it is closed or cancelled, and no owner function can touch it.
* **What can change.** The Swap router itself has no owner and cannot change, but its executor (the contract that carries out routes) can be replaced through a 48-hour timelock, and routing settings can be tuned at once within fixed limits. The Yield Vaults can be upgraded through their timelock. The Limit Orders contracts can be upgraded by their owner's hardware wallet, with no delay. The Sweeper, the LiquidityHelper and FACT cannot be upgraded.
* **Funds reach the user.** Output goes directly to the wallet that made the transaction. Treasuries collect a share of fees only, never principal.
* **Verified contracts, reviewed, not independently audited.** The Flare contracts of this project are verified on [flare-explorer](https://flare-explorer.flare.network), so you can read their source there; the Yield Vaults' source is not verified there. None has had a paid independent audit. Limit Orders had an external review whose findings are fixed in the current contracts. Swap, Limit Orders, the Sweeper, FACT, the LiquidityHelper and the Yield Vaults have had internal security reviews.

## Networks

| Tool             | Flare (14)             | Songbird (19)               | Other                |
| ---------------- | ---------------------- | --------------------------- | -------------------- |
| Portfolio        | Yes                    | Yes                         |                      |
| Yield Vaults     | Yes (yCDP, yAPS, yHLN) | Yes (ySFIN, yEXFI)          |                      |
| Swap             | Yes                    | No                          |                      |
| Limit Orders     | Yes (V3 and Algebra)   | Yes (V3)                    | Coston2 testnet (V3) |
| DEX V3 Positions | Yes                    | Yes (no compound or adjust) |                      |
| Governance       | Yes (HLN, APS)         | Yes (EXFI, SFIN)            |                      |
| Bridge           | Yes (from Ethereum)    | Yes (from Ethereum and XDC) | Ethereum, XDC        |
| Loans            | Yes                    | No                          |                      |
| Sweeper          | Yes                    | No (no Permit2 on Songbird) |                      |
| FACT             | Yes                    | No                          |                      |

Contract addresses are in [Deployments](/thanasdefitools-docs/for-developers/deployments.md).

## From a Safe

Swap also runs as a Safe App: in Oryy, add `https://thanasdefitools.xyz/swap` as a custom app. Portfolio opens from a Safe too, since it sends nothing. The other tools show "Not available from a Safe" when opened from a Safe.

## Phones and wallet apps

Every page works on a phone, and inside a wallet app's own browser, where the site connects that wallet by itself.

## Where to start (developers)

* **Building on these contracts?** [Limit Order Architecture](/thanasdefitools-docs/for-developers/architecture.md) and [Limit Order Contract Reference](/thanasdefitools-docs/for-developers/contract-reference.md) cover the state machine, the external surface and the V3-versus-Algebra differences. [Contracts the Site Calls](/thanasdefitools-docs/for-developers/frontend-contracts.md) lists every contract each page talks to and where its ABI lives.
* **Running an executor bot?** The [Executor Bot Guide](/thanasdefitools-docs/for-developers/executor-bot-guide.md) covers the economics, the reference bot and its settings. A bot needs to watch both limit-order contracts on Flare.
* **Running a vault keeper?** See [Running the Keeper](/thanasdefitools-docs/yield-vaults/running-the-keeper.md).
