Code Monkey home page Code Monkey logo

xboo's Introduction

xBoo autocompounder

  1. Deposit Boo, get xBoo using enter(uint256 _amount) public on BooMirrorWorld
  2. Give approval, deposit xBoo using deposit(uint256 _pid, uint256 _amount) external on Acelab

Compounding staked xBoo

  1. Call pendingReward(uint256 _pid, address _user) on Acelab
  2. Use the returned value to call withdraw(uint256 _pid, uint256 _amount) on Acelab for the amount parameter This will transfer all the available reward tokens and 0 xBoo (leaving it for more rewards)
  3. Swap reward token -> Boo
  4. Repeat steps 1 and 2 of depositing

Optional: -When depositing in Acelab first pick the highest yield asset and use that pid to deposit

Naive algorithm:

  1. Loop through poolInfo
  2. Get the RewardPerSecond value
  3. Find the $ or Boo value of the token
  4. Convert to rewards in that value, pick highest

This would likely not work since the vault TVL could be > than most of the pools

Better algorithm:

  1. Loop through poolInfo
  2. Get the RewardPerSecond value
  3. Find the $ or Boo value of the token
  4. Convert to rewards in that value, sort the list by APY
  5. Allocate to pool nr 1 but only some % based on maxPoolAllocation variable (set by strategists)
  6. If the strategy has remaining TVL to allocate move to pool 2 and so on

Price Oracles

Not a requirement but would be nice to check prices for pool allocation and selling of reward tokens

Look in to: https://twitter.com/FantomFDN/status/1471480699542818817

xboo's People

Contributors

degenicus avatar radiojulius avatar tess3rac7 avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.