Code Monkey home page Code Monkey logo

cellar-sy's Introduction

๐Ÿท ERC4626-SY Contracts

This is a standalone repo for the creation of SY tokens for Sommelier Cellars. Sommelier Cellars are ERC4626 Vaults, and so ERC4626 agnostic SY contracts were created ERC4626SY.sol and accompanying dependencies/parent contracts.


โœจ๐Ÿช™ ERC4626SY Contract Details

The ERC4626SY.sol contract is created to provide any target ERC4626 Vault the necessary SY wrapper contract required to be part of the Pendle protocol architecture.

Vaults can use the ERC4626SY.sol as it is, or can override functionality (via inheritance) whilst maintaining the required function signatures and other Pendle SY requirements. Functions are made purposely to be overwritten for any custom logic for particular vaults. An example of this pattern in use is the RyeSY.sol contract that ultimately inherits the ERC4626SY.sol contract and overrides with necessary logic for its own operation.

As well, the source of pricing for each ERC4626SY.sol may differ. The Sommelier protocol currently uses a ERC4626SharePriceOracle (audited code found here) although if the oracle is deemed unsafe (see contract for more details), then manual calculation of the exchangeRate is carried out (using total assets and total shares).

๐Ÿšจ Please note, this repo is still under development and the code is not ready, tested, or audited. See active project tasks for most up to date areas of focus. Current stage is coordination with Pendle community on next steps and iteration of the codebase.

๐Ÿ’ฌ Feel free to open up any issues as you see fit!

Open Discussion Points to Work Through w/ Pendle Protocol

  1. This repo uses SolmateMath as an explicit import, which can be a bit touchy and Pendle may not like that. If they don't, then we can rework the math using their libs.

  2. IERC4626 is brought in just from OZ. If they have better ways of importing it that are kosher with their repo setup we can adjust.

cellar-sy's People

Contributors

crispymangoes avatar 0xeincodes avatar

Watchers

Zaki Manian 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.