Protected Single Pools: Beyond The Basics

Archimedes
10 min readSep 8, 2023

TL;DR

What? Layer of protection and efficiency built on top of high yielding liquidity pools.

How? Smart contracts to take one-sided deposits into a liquidity pool, stake, and efficient compound of rewards, with offchain monitor to trigger withdrawal if risks identified.

Why? Users want higher yield with less risk and to receive yield in a base asset they care about like ETH or USDC.

Intro

Getting good yield on tokens you actually want to hold is a big focus for DeFi natives. Most users want the highest yield on tokens like ETH or USDC, which they’ll hold for a long time, without significant additional risk. In DeFi high APYs are common (where our good ol’ Ohmies at? Any Basers? Or just new Defi users?) but usually your risk is proportional to increases in the underlying token’s supply or additional price risks.

Liquidity Pools (LP) offer real sustainable yield in the forms of both trading fees and liquidity incentives. The yield is “real” because your assets are working in facilitating swaps and making markets more liquid, otherwise just being productive. Yields for this utility can be relatively high but it’s not as simple as sitting back and watching your assets grow. Currently, the depositor faces risks lurking at the deep end of the pool: a complicated UX, high gas fees when managing transactions, and potential losses when prices diverge among other pool parameters that one has to monitor.

Enter Archimedes’s Protected Single Pools. Archimedes wants to simplify the process in bringing productivity to your assets so you can enjoy higher yields without the stress. Just approve, deposit, and relax as your funds collect and compound gas-free rewards and are automatically withdrawn when things don’t look right.

1) What

With the Protected Single Pools, Archimedes brings its own solution on top of an underlying LP from protocols like Curve or Balancer and their corresponding rewards aggregator like Convex or Aura. This allows users to deposit a single token into the Archimedes Protected Single Pool which then deposits into the LP of choice and stakes in a reward aggregator to maximize the rewards. Users can do this from one page in as little as one transaction (after a token approval) and with only a single token. No more all those steps like: swapping to 50/50 tokens, switching websites and making sure you deposit without staking in a cumbersome UI.

Simplifying the process of depositing into Liquidity Pools isn’t even half the battle, so we didn’t stop there. By owning liquidity in a pool you have natural exposure to all of the underlying assets of that pool. Chances are you don’t really care about those assets and just want yield in ETH or USDC.

To protect your assets Archimedes deploys offchain monitors for each of the whitelisted pools to constantly monitor things like the TVL of the pool, pool asset balance, and how much of the liquidity pool is controlled by our Protected Single Pool. These comprise our “health checks” that allow additional deposits or entirely withdraw all assets depending on the algorithms’ perceived risk. These health checks are available in our docs and can be dependent on the pool.

Ok, so we have simplicity and protection. What about improving yield? That too! By pooling your assets we can be much more gas efficient which allows us to compound rewards much more often. When it’s efficient to do so according to our offchain monitor our solution claims rewards, swaps them to the underlying asset pool and redeposits/stakes. This has the additional effect of not having your position subject to the volatility of rewards tokens since the position is turning those rewards into the asset you actually care about and put it back to work to earn more yield.

Simplicity, protection, and efficient compounding are what we’re bringing to the yield market. We want to bring the benefits of DeFi to all users, not just to those constantly on Twitter and Dune watching for opportunities.

Yeah but why?

At Archimedes we’re DeFi natives, but we all have different backgrounds and want to help address the difficulties DeFi has in getting mass adoption. We see those problems as usability, safety, and transparent performance. Protected Single Pools address all three and leave room to do even more on top.

Firstly, usability in DeFi is very likely not meeting anyone’s standards but it does work. For us who have been around we know what to expect, the order of buttons to click, and we have less of a freakout after every confirmed transaction, but before the UI RPC update. Though any DeFi user can attest that you’re not trying to get your nice neighbor who happens to be an older lady to deposit into the ETH/stETH Curve Pool and then claim and lock your CRV rewards so you can play the bribe market on Votium. But we know your nice neighbor may have some USD or you may have convinced her to buy ETH on Coinbase or Binance. It should be easy to get the maximum amount of yield possible and it shouldn’t take so many clicks on web apps with far from perfect UIs. Reducing the steps and energy one needs to take to earn yield on a single asset in a pretty good (our opinion) UI was a primary goal with this product.

But what about protection? Decent UIs and simplicity don’t matter much when it turns out your assets just go poof (ahem Celsius, FTX, Terra Luna, etc…). Big brains 🧠 use bots to monitor activity on chain and automatically perform actions so they don’t have to be at a PC to confirm transactions on Metamask. So we thought we could give this ability to all and democratize the knowledge we have in protecting assets. We’ve set up a system that allows us to add new protections and monitors at a speed much faster than smart contract development since we’re monitoring data offchain. Having this offchain infrastructure allows us to be safer and move faster. A win win for our users.

Usability ✅, protection ✅, but we know people also want that sweet sweet yield. APYs can look great but anyone who’s interacted with these strategies knows that managing them and paying gas usually causes your returns to take a big hit. With Archimedes you don’t have to worry about that. We wanted to efficiently compound rewards so that we’re maximizing APRs → APYs. The gas and fees for managing this are obfuscated as well so that it’s easy for the user and all they see is their value going up rather than being asked to pay gas for transactions.

In summary we built this because it was something we wanted and were doing for ourselves so now we’re able to have anyone use the automation and simplicity that all DeFi should be.

How do?

Hopefully this is a lot more elegant than literal sausage making but we want everyone to know just what we’re doing so that there’s no mystery where your deposits are going.

In our protected Single Pools there are smart contract elements as well as offchain software to monitor our pool and is to call (execute) transactions when necessary. The smart contracts simplify the transactions one needs to take and gives a place for assets to sit idle while they wait for deposit or when funds are pulled out of a pool for failing health checks. The offchain infrastructure has an address that has permissions to call certain functions in order to protect pool assets as well.

The smart contracts work like this: When one deposits into a strategy those funds are sent to the specific pool vault and you receive a return of an ERC20 receipt token. Those funds will sit in the contract until our monitor calls the adjustIn() method to deploy funds above the minimum idle funds we use for facilitating quick/cheap withdrawals. The adjustIn() method uses another contract, the ‘adapter,’ that is configured for that particular pool and protocol to be able to deposit funds in something like Curve —> Convex for example but this can be configured for other protocols, initially we have adapters for Curve/Convex and Balancer/Aura. We pay for all gas in these transactions.

Once the funds are adjusted in so long as nothing bad happens ever (as is the trend in DeFi) then that’s it as far as your funds moving. But let’s pretend for the first time in history 😅 a token that was branded as stable started to change in price from its peg. This price change would be reflected in the pool balance because as the asset lost value it would become a larger portion of the pool. Each pool from Archimedes will have a specific threshold where we deem the pool healthy or not depending on the asset and the protocol.

Simplified Diagram of Protected Single Pools Mechanism

For example an ETH/xETH strategy with a Curve pool that has an A value >500 will have a larger percentage of imbalance before the price impact will start to be significant. But the users of a pool that’s meant to be stable like that will have a much lower tolerance for any price impact than say a pool built on something like USDC/wBTC where depositors accept a higher degree of volatility. If that USDC/wBTC pool is on balancer it has different imbalance dynamics that we define a different threshold before it is deemed “unhealthy.”

If a pool is deemed unhealthy for token balance reasons we withdraw all assets to the deposited or “base” asset and it sits in the contract. This prevents further losses if the pool continues to move out of balance. This can be thought of as effectively a stop-loss and assumes that if prices diverge, depositors don’t want to weather the additional volatility and take a small loss rather than the risk of further losses.

Pool balance is one thing, but if Archimedes owns too much of a single pool (usually 33%) a sudden withdraw even can affect the price when withdrawing. If that’s the case, we’ll withdraw until we own 20% below this threshold, so 26.4%. These withdrawn funds will be in the contract and still distributed evenly to depositors in the vault. All this would mean is that only a portion of deposited funds are earning yield but all funds are still protected and accessible.

Price Impact by A-factor for a 33% withdrawal

Let’s look at the positive stuff now. As deployed funds accrue rewards the monitor checks what the value of those funds is and when they reach a threshold where compounding is efficient they’re claimed and redeposited. Compounding invokes the doHardWork() method which does a process of claim —> swap —> take fee —> redeposit. For us “efficient” means the cost of the gas to perform these actions is less than the additional yield we would gain from redeploying and earning interest for a year. The fees this doHardWork() method takes are what we use to pay for the gas and protection for the pool.

Because the Archimedes Protected Single Pool combines the assets of many users, compounding can be done more often as the rewards are much higher for the combined assets while the gas costs stay the same. More frequent compounding means a higher APY as assets are more often productive and it also means the position’s value is less dependent on the value of the reward tokens like CRV. We assume depositors in our pools only care about yield in their deposited asset, not the value of the other pooled assets or the reward tokens.

So what we’ve built here are few smart contracts that handle the logic of depositing into pools via one asset. The contract can stake the LP tokens for the highest yield and it contains the logic to withdraw as well as compound the rewards back into deposits. All of these functions are called from a specific address that monitors the assets and the pool off chain and knows when to efficiently do all of the required actions. All of these contract methods can be verified and seen publicly, the only off chain element is when to call these methods which is decided by our logic from monitoring the pool using our own node and logic. With this system we’re making the infrastructure for anyone to be able to earn higher yields on their assets while adding a level of protection to reduce risks from Liquidity Pools and their pooled assets.

Now What

With Archimedes’s Protected Single Pools we have built the groundwork to enable high yields with lower risk moving us up the risk/reward curve. The infrastructure to move a single liquidity pool up the risk reward curve has many directions we can take it, most obviously would be allowing multiple liquidity pools to make up a one deposit pool from Archimedes with the ability to switch and modify allocation depending on risk and reward. Additionally reducing risk in yield bearing opportunities makes an easier case for leverage as well when one can borrow at a lower rate and has a less risky method to generate higher returns.

We won’t detail these further opportunities here but the possibilities are there and extend much further as well. We will be learning a lot through the launch of our Protected Single Pools about the demand for products like this and how we can further improve efficiency, maximize yield, and reduce risk. Archimedes’s Protected Single Pools represent the first step in our V2 with our Syracusia Upgrade with much more to come.

Like what you read and are curious to learn more?

To learn more about the Archimedes project and how it generates real, stable top of market yields for users by visiting https://archimedesfi.com/ and joining on Twitter, Discord, and Telegram.

Disclaimer: The upcoming launch is a beta release and the contracts are not yet audited. Do your own research. Not Financial Advice!

--

--