PIP 2: Cash++ Source

AuthorMick de Graaf
Discussions-Tohttps://forum.piedao.org/t/pip-2-cash-pie/37
StatusDraft
TypePIEs
Created2020-03-06

Simple Summary

Tokenised interest bearing cash position which rebalances manually(by the DAO) based on risk across different lending protocols and stable coins.

Motivation

Lots of investment portfolios contain a cash position to reduce risk. In the DeFi ecosystem there is a plethora stable coins, each with their own risks and potential flaws. There are also multiple lending protocols which also have their own risks associated to them. Properly managing your wealth is about maximising your return/risk ratio. Current solutions that automatically rebalance based on interest rate only maximise for returns with catasrophic effects if one of the underlying protocols fails.

Specification

The Cash++ PIE will be a token which is mintable by supplying the underlying assets. The token is always backed by and redeemable for the underlying assets. Under the hood the Cash++ PIE uses the balancer protocol behind a custom upgradeable proxy. The PieDAO is able to change the weights or underlying assets and trigger a rebalance. When a rebalance is triggered the balancer pool trading is temporarely enabled so that arbitrage traders rebalance the portfolio to the desired weights.

pie-proxy proxied-balancer-factory

Rationale

I choose balancer because we think they have a very novel rebalancing mechanism and their smart contracts are very well written and are already audited.

The proxy is used to be able to pause and upgrade the pool on the lowest level and to add some custom functionality with regards to adding and removing liquidity while a pool is not actively trading.

Using the proxy also allows us to later add hooks into the smart contract to do the accounting for the future migration plan of PieDAO.

This approach allows us to create this PIE and later easily add improvements and new features without the need to redeploy.

Security Considerations

The Cash++ Pie is built to handle possible failure of stable coins and lending protocols by not automatically rebalancing but only doing so when the PieDAO triggers this.

Pauzing can be triggered by a sepperate pauzer address which is elected by the PieDAO. At any time the PieDAO can elect a new pauzer.

We customize functionality on the proxy level to reduce the attack vector compared to writing a more complex manager for the balancer pool.

Copyright and related rights waived via CC0.