# Smart Contracts and Documentation

Summer.fi's code is **fully open-source,** giving everyone in the community the ability to pressure test and audit the core technology. We built on top of heavily audited and long standing lending protocols.&#x20;

This page provides all relevant links and documentation as a reference. If you think you have found a bug or security issue you can report it on immunefi: <https://immunefi.com/bounty/summerfi/> and your report will be treated with the highest priority.

### High level Summer.fi Architecture

The architecture of Summer.fi consists of 5 layers:

1. Summer.fi webapp - <https://summer.fi/>
   * This is where the magic happens. Here you view & interact with your DeFi positions.
   * Code for the UI: <https://github.com/OasisDEX/oasis-borrow>
2. DeFi Smart Account Layer
   * To enable better UX, users first need to create a DeFi Smart Account. This is a proxy layer that manages positions on the blockchain.
   * Code for the contracts: <https://github.com/OasisDEX/oasis-earn-sc>
3. Summer.fi Automation contracts & Automation workers
   * If you wan to automate your position with a stop loss or other trigger, then those will be recorded in the automation trigger contracts, which get executed only when eligible by the Automation workers. &#x20;
   * Code for automation  <https://github.com/OasisDEX/automation-mono> , <https://github.com/OasisDEX/automation-workers>
4. Summer.fi Contract layer
   * The smart contracts that enable the Borrow, Multiply and Earn functionality.
   * Code for the contracts <https://github.com/OasisDEX/multiply-proxy-actions>, <https://github.com/OasisDEX/oasis-earn-sc>
5. The Defi protocols themselves, that Summer.fi users interact with through the above layers.

<figure><img src="https://content.gitbook.com/content/GiBcoId8OqxDuUU92hwi/blobs/vspCF43JMAijvIBxvEfI/image.png" alt=""><figcaption><p>Summer.fi High level Architecture</p></figcaption></figure>

High level, this is how these layers fit together.

## Summer.fi Smart contracts & audits

All smart contracts that you can interact with through Summer.fi can be found on our Immunefi Bug bounty program here: <https://immunefi.com/bounty/summerfi/> including audits.

## Protocol smart contracts & documentations

### Maker

* These are the contract addresses for the Maker protocol which are used in Summer.fi: <https://changelog.makerdao.com/releases/mainnet/active/contracts.json>
* The maker protocol also has a documentation portal where you can find more information on how it works: <https://docs.makerdao.com/>

### Aave&#x20;

* The contracts for Aave v3 can be found here: <https://docs.aave.com/developers/deployed-contracts/v3-mainnet/ethereum-mainnet>
* Full documentation for Aave is here: [https://docs.aave.com/developers/](https://docs.aave.com/developers/deployed-contracts/v3-mainnet/ethereum-mainnet)

### Spark

*
* The contracts for Spark can be found here: <https://docs.sparkprotocol.io/developers/deployed-contracts/mainnet-addresses>
* Full documentation for Spark is here: <https://docs.sparkprotocol.io/hub/>

### Ajna

* The contracts for Ajna protocol can be fond here: <https://github.com/ajna-finance/ajna-core>
