saffron.finance
HomeGovernanceLaunch App
  • Introduction
  • Saffron Finance
    • ♨️ Saffron V2
      • Saffron KCC
        • Saffron Converter
        • Saffron Insurance Fund
        • Saffron Mojito Adapter v2
        • Saffron Mojito Auto Compounder
        • Saffron Pool v2
        • Saffron Position NFT
        • Saffron Position Token
      • Saffron V2 Protocol
      • Saffron Staking V2
        • Saffron Staking V2
        • SFI Rewarder
    • 🌺Saffron V1
    • 🎓Saffron Academy
    • 📝Whitepaper
  • Governance
    • Vote
    • Governance
  • Community
    • Twitter
    • Telegram
    • Discord
    • Github
    • Medium
    • Youtube
Powered by GitBook
On this page
  • Introduction
  • Miscellaneous State Variables

Was this helpful?

  1. Saffron Finance
  2. ♨️ Saffron V2
  3. Saffron KCC

Saffron Mojito Adapter v2

PreviousSaffron Insurance FundNextSaffron Mojito Auto Compounder

Last updated 3 years ago

Was this helpful?

Introduction

This contract interfaces with Mojito Swap and provides a common SaffronAdapter interface expected for use by Saffron Pool contracts.

Miscellaneous State Variables

Type
Visibility
Name
Description

address

public

governance

Governance address

address

public

new_governance

Pending governance address if accepted

address

public

saffron_pool

Saffron Pool which owns this adapter

IERC20

public

MLP

MLP address (Uni-V2 LP token)

SaffronMojitoAutocompounder

public

autocompounder

Auto-Compounder for this adapter/platform

string

public

platform

Platform name

string

public

name

Adapter name

Constructor

  constructor(address _lp_address, string memory _name)
Type
Name
Description

address

_lp_address

Address of LP asset to be managed

string

_name

deploy_capital()

Add funds to underlying protocol. Called from pool's deposit function

function deploy_capital(uint256 lp_amount) external override nonReentrant
Type
Name
Description

uint256

lp_amount

Amount (wei) of LP Assets to be deployed to underlying platform

return_capital()

Return funds to user. Called from pool's withdraw function

function return_capital(uint256 lp_amount, address to) external override nonReentrant
Type
Name
Description

uint256

lp_amount

Amount (wei) of LP Assets to be staked in Mojito

address

to

Address to receive withdrawn funds

get_holdings()

Return balance of Auto Compounder holdings

function get_holdings() external override nonReentrant returns(uint256 holdings)

get_holdings_view()

Return balance of Auto Compounder holdings (read-only/view)

function get_holdings_view() external override view returns(uint256 holdings)

set_autocompounder()

Set a new Saffron autocompounder address

function set_autocompounder(address _autocompounder) external
Type
Name
Description

address

_autocompounder

Address of new Saffron Auto Compounder contract

set_pool()

Set a new Saffron Pool address

function set_pool(address pool) external override
Type
Name
Description

address

pool

Address of new Saffron Pool contract

set_lp()

Set new LP token address

function set_lp(address addr) external override
Type
Name
Description

address

addr

Address of new LP token

propose_governance()

Propose transfer of governance to new address

function propose_governance(address to) external override
Type
Name
Description

address

to

Address of proposed new governance

accept_governance()

Accept the role of governance (must be called by previously proposed candidate)

function accept_governance() external override

sweep_erc()

Transfer LP assets to Mojito Staking

function sweep_erc(address _token, address _to) external
Type
Name
Description

address

amount_qlp

Amount (wei) of LP Assets to be staked in Mojito

address

to

Address to receive swept assets

Source Code
Source Code
Source Code
Source Code
Source Code
Source Code
Source Code
Source Code
Source Code
Source Code
Source Code
Source Code