Idle handing both borrowing and lending at the same time

Hi, I was curious if this feature would be possible for idle. Essentially say I want to borrow some amount of eth per 1k worth of USDC and have idle automatically move my lends and borrows between markets for the best rate.

Say ETH trades at 2k and USDC stays at 1 dollar.

So say I borrow 0.25 ETH per 1k USDC (so borrow fraction of 1/2).
Say currently the rates across the pools are
Pool A: 20% USD and 2% ETH.
Pool B: 22% USD and 4% ETH.
At the current rate, both pools are fine (we’re ignoring that pool b accrues more debt in ETH) as 20% - (1/2) * 2% = 22% - (1/2) * 4%.
Say we pick pool a.
Say later it becomes better to lend/borrow on pool B. (the rates for usd on pool B go to 25%, or eth goes down in price, or rates on USD go down on A, etc)
Then I would want idle to calculate that the current rate is better and in 1 transaction to just move my usd collateral to pool B and then borrow eth from pool B to pay back my loan from pool A .

Is this possible or too hard to implement?


Hey @yrral, thanks for posting this thought :slight_smile:

The idea that you are proposing is a sort of aggregator that should work on both borrowing and lending sides at the same time.
From the tech point of view, I think that this can be implemented, but the borrowing side is much more complex than the lending aggregation service.

Currently, Idle is focused on the lending value proposition and there is still room for improvements. The size of the potential market that we can target is pretty big, and the protocol might deliver first products based on the lending infrastructure.
The borrowing service might be added to the backlog of ideas that might be analyzed for future developments, in order to land into new market segments.