OperableDeposit

Git Source

Inherits: Farm

Author: Sperax Foundation.

This contract helps in creating farms with increase/decrease deposit functionality.

Functions

_updateSubscriptionForIncrease

Update subscription data of a deposit for increase in liquidity.

function _updateSubscriptionForIncrease(uint256 _depositId, uint256 _amount) internal;

Parameters

_updateSubscriptionForDecrease

Update subscription data of a deposit after decrease in liquidity.

function _updateSubscriptionForDecrease(uint256 _depositId, uint256 _amount) internal;

Parameters

_increaseDeposit

Common logic for increasing a deposit.

function _increaseDeposit(uint256 _depositId, uint256 _amount) internal;

Parameters

_decreaseDeposit

Common logic for decreasing a deposit.

function _decreaseDeposit(uint256 _depositId, uint256 _amount) internal;

Parameters

Events

DepositIncreased

event DepositIncreased(uint256 indexed depositId, uint256 liquidity);

DepositDecreased

event DepositDecreased(uint256 indexed depositId, uint256 liquidity);

Errors

DecreaseDepositNotPermitted

error DecreaseDepositNotPermitted();

InsufficientLiquidity

error InsufficientLiquidity();