revo-market / make-crypto-mobile-hackathon

Build the next generation of Defi accessibility with Celo mobile-first blockchain! Create new solutions on top of the Celo Ledger - DeFi, NFTs, Smart Contracts, Developer tooling and more.
1 stars 1 forks source link

a hacky first pass at autocompounding #23

Closed jophish closed 2 years ago

jophish commented 2 years ago

this should basically be treated as pseudocode. completely untested, definitely will not compile! spent some time thinking about how autocompounding would actually work, and tried to work around some issues with prorating rewards w.r.t time spent in the farm. the compound function in particular is explicitly psuedocode, the contract calls we'll need to make there are significantly more complicated, but i think the idea should be correct.