Inspiration

The idea was gradually formed over the last year. With the rise of different financial offerings, it's seems obvious to unite them on UI level to provide bank-like experience.

What it does

Portle provides an interface to interact with several dapp protocols under single user interface. It presents those protocols under categories that are inherited from the banking application to make an experience more familiar.

How I built it

I've started with finding different APIs to fetch holdings inside all the supported protocols. I've also leveraged The Graph to build custom data sources for Compound and bZx.

Once I've managed to display user's holdings, I headed into allowing user to interact with all those protocols. I started with the trading which was done via Kyber. I've then extended trading to Synthetix and eventually made a Kyber-Synthetix bridge.

Then I've integrated supplying to Compound and Fulcrum, which was pretty straightforward. I've also integrated Melon investing.

Finally, I've added the support for borrowing on Compound (variable APR) and Torque (fixed APR). This was the most challenging task.

I've then added some "advanced" features that simplify performing complex tasks involving multiple transactions: leverage and carry trading, deposit bridge (transfer deposit between protocols), and smart repay (repay your debt with any asset, e.g. pay DAI debt with ETH).

Challenges I ran into

  • When integrating multiple protocols, it's almost impossible to use a testnet. After a week or so of working on Portle, I realized that it will be easier to develop on mainnet.
  • It's really hard to make a decent experience for borrowing. You need to perform bunch of checks (borrowing is enabled, there is some collateral, collateralization ratio is healthy, etc), and make a good balance between simplicity and informing the user about the state of his loan.

Accomplishments that I'm proud of

  • Kyber-Synthetix bridge
  • Figured out leverage trading

What I learned

  • How Synthetix debt repricing works
  • The flow of lending and borrowing on money markets

What's next for Portle

I plan to release the app after I finish polishing it up so it's not in the "demo" phase anymore. I'm going to start with a much simpler solution, and then slowly add features from the hackathon version.

Feature list

  • Portfolio tracker
  • Swap ERC20s via Kyber
  • Swap Synths via Synthetix
  • Kyber-Synthetix bridge
  • Deposits (Compound, Fulcrum/bZx)
  • Loans (Compound, Torque/bZx)
  • Melon funds
  • Leverage trading (long/short)
    • Compound: borrowing + buying/selling on Kyber
    • Fulcrum: pTokens
  • Carry trading: borrowing asset A, selling it to asset B, then lending asset B on Kyber
  • Deposit bridge: migrating deposit from Compound to Fulcrum, or vice versa
  • Smart repay: selling asset A on Kyber to asset B, then repaying asset B loan on Compound

Built With

Share this project:
×

Updates