Saffron Insurance Fund

Introduction

Saffron Insurance Fund

Miscellaneous State Variables

Constructor

constructor(address _insurance_asset, address _pool_base_asset)

deposit()

Deposit insurance_assets into the insurance fund

function deposit(uint256 principal) external nonReentrant

withdraw()

Withdraw users principal and earnings by redeeming their Saffron Position NFT

function withdraw(uint256 token_id) external nonReentrant

emergency_withdraw()

Emergency withdraw with as few interactions / state changes as possible / BUT still have to wait for expiration

function emergency_withdraw(uint256 token_id) external

update()

Update state and accumulated assets_per_share

function update() public non_reentrant_update

total_principal()

Get total amount of Insurance Assets held by pool

function total_principal() external view returns(uint256)

set_pool()

Set a new Saffron Pool address

function set_pool(address _pool) external

set_treasury()

Set a new Saffron Treasury address

function set_treasury(address _treasury) external

pending_earnings()

Get pending earnings for a given Saffron Position NFT

function pending_earnings(uint256 token_id) external view returns(uint256)

Last updated