Saffron Pool v2

Introduction

Saffron Pool V2

Miscellaneous State Variables

Constructor

constructor(address _adapter, address _base_asset, string memory name, string memory symbol, string memory _pool_name)

deposit()

Deposit base assets to the pool

function deposit(uint256 amount) external nonReentrant

withdraw()

Withdraw capital from the pool by burning SAFF-LP tokens

function withdraw(uint256 lp_amount) external nonReentrant

begin_unfreeze_NFT()

Begin to unfreeze an NFT so it may be withdrawn

function begin_unfreeze_NFT(uint256 token_id) external

update_exchange_rate()

Updates senior exchange rate based on current Auto Compounded earnings, if any. Also update the total supply for each tranche

function update_exchange_rate() public non_reentrant_update

get_latest_pool_holdings()

Updates senior exchange rate based on current Auto Compounded earnings, if any. Also update the total supply for each tranche

function get_latest_pool_holdings() internal returns (uint256)

get_update_exchange_rate_vars()

Get internal state variables

function get_update_exchange_rate_vars() internal returns (UpdateExchangeRateVars memory uv)

get_yield_receiver_supply()

Get the calculated base asset holdings of all yield receivers by multiplying their token supplies by their exchange rates

function get_yield_receiver_supply() public view returns (uint256)

set_exchange_rate()

Set values for yield receivers for waterfall mode (only valid while pool is in a shut-down state)

function set_exchange_rate(uint256 yield_receiver, uint256 value) external

set_fee_manager()

Set fee manager (usually insurance fund)

function set_fee_manager(address to) external

withdraw_fees()

Withdraw protocol fees

function withdraw_fees(address to) external nonReentrant

shut_down_pool()

Set the shut-down state of the pool

function shut_down_pool(bool _shut_down) external

disable_deposits()

Disable deposits (waterfall mode)

function disable_deposits(bool _deposits_disabled) external

propose_governance()

Propose transfer of governance to new address

function propose_governance(address to) external override

accept_governance()

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

function accept_governance() external override

set_adapter()

Set a new Saffron Adapter to interface with underlying platform

function set_adapter(address to) external

sweep_erc()

Transfer LP assets to Mojito Staking

function sweep_erc(address _token, address _to) external

Last updated