Agent vaults, earning from bots
Put a token in a vault run by a bot, and share in trades that must end in profit.
In shortA bot runs a vault in one token. From contract 4.2.0 it may only make trades that end with more of that token than they started; the chain cancels any other. Depositors share every profit, minus the bot's fee. Mainnet still runs the older contract.
- Trades (4.2.0)
- must end in profit, or are cancelled
- Agent fee
- 1-30% of each profit, fixed
- Hold
- 0-30 days, only ever lowered
- Paid in
- the vault's own token
An agent vault lets a trading bot work with other people's money without being able to lose it in a trade. The bot's owner creates the vault in one token, say TAZ. Anyone can deposit TAZ and receives shares. The bot then trades the vault's TAZ, and the contract only accepts trades that come back with more TAZ than they took. The profit, minus the bot's fee, stays in the vault and raises the value of every share.
What a trade looks like
- Two pools: TAZ goes into RA on one pool where RA is cheap and comes back to TAZ on another pool where RA is dear.
- Three pools: TAZ into one token, that into a second, and the second back into TAZ.
- Every trade starts and ends in the vault's token inside one transaction, so between trades the vault always holds only that token.
- The contract measures its own balance before and after. If it did not grow, the whole transaction is cancelled and nothing moved. A trade can also never use more than the vault owns.
Depositing and withdrawing
- Open Vaults and pick a vault. The table shows each one's returns over 30 days, 7 days and since it started, how much is in it, what it paid to people other than the bot, its fee and its hold.
- Open the vault to see its share-price chart and every trade it made.
- Enter an amount and deposit. You receive shares at today's share price.
- Withdraw whenever the hold allows. You get your shares' value at that day's price, in the vault's token.
The hold
A vault can keep each deposit in for a while, from none up to 30 days. It stops money jumping in just before a trade and out just after, which would take profit from people who stayed. The hold runs from your latest deposit, so a top-up restarts it for everything you hold in that vault. A closed vault holds nobody: you can withdraw at once.
What the bot can and cannot do
- It can trade the vault, rename it, lower the hold and close the vault.
- It cannot change its fee or the minimum deposit, take anyone's deposit, or run a trade that loses. A lower hold only applies once the old one has run, so a bot cannot drop the hold and jump out of its own vault around a trade. A lower hold that is still waiting can be replaced by another lower one, which restarts the wait.
- Its fee, between 1 and 30 percent, is paid from each trade's profit at the moment the trade runs.
- These are the rules of the current saturnvaults contract.
Custom tokens
A vault's token can be any token, even one its bot made. The vault protects the amount of that token you hold in it, not the token itself: whoever controls a token may be able to mint more of it, crash its price, or block transfers so no one can withdraw, and a vault's returns and dollar figures in such a token can be made to look good cheaply. The Vaults page marks every vault outside Saturn's core tokens as a custom token and asks for an explicit yes before a deposit into one. Use vaults in tokens you trust.
Reading the numbers
- Share price starts at 1.0 and only goes up. 1.25 means every share is worth 25 percent more tokens than at the start.
- Returns are in the vault's token, not in dollars. If the token falls in price, your deposit can be worth less in dollars even while the share price rises.
- Paid to others is the profit that went to depositors other than the agent's own wallet. A bot owner could pay for its own 'profits' to look good; this number leaves out only the part that lands in the agent's wallet, so money the owner holds in other wallets still counts as others.
- Agent holds shows how much of the vault the agent's own wallet holds. The owner may hold more from other wallets.
- Profit comes from price gaps between pools. Gaps are small and shared: when more money joins a vault, or other bots close the gaps first, returns fall. Past returns are no promise.
Running a vault
Any wallet can create a vault on the Vaults page: a name, the token, the fee, the minimum deposit and the hold. That wallet becomes the agent, the only one that can trade it. The bot signs with it and calls saturnvaults.agentArb for a two-pool trade or agentArb3 for a three-pool one, naming the pools, the tokens in between and the least profit it will accept. The vault's page shows the exact calls to its agent.
Vaults work this way from saturnvaults 4.2.0, which runs on devnet. Mainnet still runs 4.1.3, where a bot trades by buying and selling back in one pool, which always costs two swap fees and can lower a vault's value. There the Vaults page takes no deposits and makes no new vaults; anyone with money in an old vault can withdraw it.
- Can I lose my deposit?
- Not to a trade: the chain cancels any trade that does not end with more of the vault's token. What you hold is still an amount of that token. Its dollar price can fall, and a custom token's maker may be able to mint more of it or block transfers.
- Can a vault hold several tokens?
- No. Each vault has one token, and profits are paid in it. A trade can pass through any token that has pools, but it must come back to the vault's token. A bot that wants to work in TAZ and RA runs two vaults.
- Why is a new vault's 30-day figure marked with a star?
- The vault is younger than 30 days, so the figure is its return since it started.