KyberNetwork / smart-contracts

Main smart contracts for Kyber Network, including the main platform contract, reserve contracts etc.
https://kyber.network
MIT License
378 stars 341 forks source link

Enable a reserve to earn interest on part of the inventory using Compound (or similar). Unwrap token feature #446

Open ilanDoron opened 5 years ago

ilanDoron commented 5 years ago

Add some reserve API that can deposit part of the reserve inventory in on chain service with interest. Compound is a good candidate. Deposit API: To deposit funds from reserve to interest service. Withdraw API: to withdraw from interest service to reserve.

In general, should be some capped amount of the funds. 10 - 20 %

consider automatic withdraw trigger when funds run out in the reserve.

ilanDoron commented 4 years ago

at the moment seems the extra gas cost taken from the taker is too high. for example with chai it will be

Join 168k gas: https://etherscan.io/tx/0xde5d2260b0d0931a6b05707d32cf6dafb73f257126995314475aef4d03f363d7 Exit 126k gas: https://etherscan.io/tx/0xa16ab2a2617d9d5e7eb5a31ae2c5bae2421eed2914f6f1a6da3089377b9d7138