Saffron Mojito Auto Compounder

Introduction

This contract interfaces between Mojito Staking and the Saffron Adapter to provide auto compounding behavior and increase earnings

Miscellaneous State Variables

Constructor

constructor(address _adapter_address, address _lp_address, uint256 _pid, address _router_address, address _farm_address)

reset_approvals()

Reset LP token approvals to max value for use by AutoCompounder contracts

function reset_approvals() external

blend()

Transfer LP assets to Mojito Staking

function blend(uint256 amount_qlp) external

spill()

Transfer LP assets out from Mojito Staking

function spill(uint256 amount, address to) external

autocompound()

Redeem Mojito Staking rewards, convert to LP tokens, deposit earnings

function autocompound() external nonReentrant

get_autocompounder_holdings()

Return adapter balance staked in Mojito Swap

function get_autocompounder_holdings() external view returns (uint256)

get_mojito_chef_holdings()

Return adapter balance staked in Mojito Swap

function get_mojito_chef_holdings() external view returns (uint256)

set_mojito_chef()

Update Mojito Chef contract address

function set_mojito_chef(address _mojito_chef) external

set_autocompound_enabled()

Enable or disable auto compounding upon interaction with

function set_autocompound_enabled(bool _enabled) external

emergency_withdraw()

In case of emergency directly transfer LP assets out of Mojito Staking

function emergency_withdraw(uint256 _pid, uint256 _amount) external

Last updated