Open your first position
Open your first position
How deposits work
Using the app
- 01Go to /press and connect a wallet on Base mainnet.
- 02Open Create a Pool and paste a token address. The page pulls the token's current market numbers and estimates what your chosen amount might earn. It is an estimate based on today's volume and liquidity, not a promise.
- 03For a supported token, approve and create. You sign twice: first an ERC-20 approval so the factory can take the tokens, then createVault. The receipt shows your new vault's address.
The list of supported tokens is the supportedTokens field of GET /api/config, and the factory to use is its depositFactory field. The calculator accepts any Base token. Deposits switch on token by token, as each pool is registered.
Using a contract or a script
ERC20(token).approve(factory, amount);
factory.createVault(token, amount); // returns the vault address; emits VaultCreatedTake the factory address from the depositFactory field of GET /api/config every time, rather than saving it in your code. If the token is not registered, the factory reverts with UnsupportedToken.
Taking your tokens out
Call withdraw() on your vault. Only the creator can call it, it takes no arguments, and it returns the whole position and closes it. Partial withdrawals do not exist, so to change the size, withdraw and deposit again.
Pressing by hand
Pressing already happens every 30 minutes on its own. If you created the vault, you can also call press(minUsdcOut) yourself. First simulate press(0) with eth_call from your own address, then send the real call with minUsdcOut set to 99% of the simulated amount. If the simulation shows less than $0.50, it is not worth the gas.