DullahanVault

MAX_BPS

uint256 MAX_BPS

Max value for BPS - 100%

MAX_UINT256

uint256 MAX_UINT256

Max value possible for an uint256

STK_AAVE

address STK_AAVE

Address of the stkAAVE token

AAVE

address AAVE

Address of the AAVE token

PodsManager

struct PodsManager {
  bool rentingAllowed;
  uint248 totalRented;
}

initialized

Is the Vault initialized

admin

Address of the Vault admin

pendingAdmin

Address of the Vault pending admin

totalRentedAmount

Total amount of stkAAVE rented to Pod Managers

podManagers

Pod Manager states

votingPowerManager

Address receiving the delegated voting power from the Vault

proposalPowerManager

Address receiving the delegated proposal power from the Vault

bufferRatio

Percentage of funds to stay in the contract for withdraws

reserveAmount

Amount accrued as Reserve

reserveRatio

Ratio of claimed rewards to be set as Reserve

reserveManager

Address of the Reserve Manager

Initialized

Event emitted when the Vault is initialized

RentToPod

Event emitted when stkAAVE is rented to a Pod

NotifyRentedAmount

Event emitted when stkAAVE claim is notified by a Pod

PullFromPod

Event emitted when stkAAVE is pulled back from a Pod

AdminTransferred

Event emitted when the adminship is transfered

NewPendingAdmin

Event emitted when a new pending admin is set

NewPodManager

Event emitted when a new Pod Manager is added

BlockedPodManager

Event emitted when a Pod Manager is blocked

ReserveDeposit

Event emitted when depositing in the Reserve

ReserveWithdraw

Event emitted when withdrawing from the Reserve

UpdatedVotingPowerManager

Event emitted when the Voting maanger is updated

UpdatedProposalPowerManager

Event emitted when the Proposal maanger is updated

UpdatedReserveManager

Event emitted when the Reserve manager is updated

UpdatedBufferRatio

Event emitted when the Buffer ratio is updated

UpdatedReserveRatio

Event emitted when the Reserve ratio is updated

TokenRecovered

Event emitted when an ERC20 token is recovered

onlyAdmin

Check that the caller is the admin

onlyAllowed

Check that the caller is the admin or the Reserve maanger

isInitialized

Check that the contract is initialized

constructor

init

Initialize the Vault

Initialize the Vault by performing a seed deposit & delegating voting power

Parameters

Name
Type
Description

_votingPowerManager

address

Address to receive the voting power delegation

_proposalPowerManager

address

Address to receive the proposal power delegation

asset

Get the vault's asset

Return Values

Name
Type
Description

[0]

address

address : Address of the asset

totalAssets

Get the total amount of assets in the Vault

Return Values

Name
Type
Description

[0]

uint256

uint256 : total amount of assets

totalSupply

Get the total supply of shares

Return Values

Name
Type
Description

[0]

uint256

uint256 : Total supply of shares

totalAvailable

Get the current total amount of asset available in the Vault

Return Values

Name
Type
Description

[0]

uint256

uint256 : Current total amount available

convertToShares

Convert a given amount of assets to shares

Parameters

Name
Type
Description

assets

uint256

amount of assets

Return Values

Name
Type
Description

[0]

uint256

uint256 : amount of shares

convertToAssets

Convert a given amount of shares to assets

Parameters

Name
Type
Description

shares

uint256

amount of shares

Return Values

Name
Type
Description

[0]

uint256

uint256 : amount of assets

previewDeposit

Return the amount of shares expected for depositing the given assets

Parameters

Name
Type
Description

assets

uint256

Amount of assets to be deposited

Return Values

Name
Type
Description

[0]

uint256

uint256 : amount of shares

previewMint

Return the amount of assets expected for minting the given shares

Parameters

Name
Type
Description

shares

uint256

Amount of shares to be minted

Return Values

Name
Type
Description

[0]

uint256

uint256 : amount of assets

previewWithdraw

Return the amount of shares expected for withdrawing the given assets

Parameters

Name
Type
Description

assets

uint256

Amount of assets to be withdrawn

Return Values

Name
Type
Description

[0]

uint256

uint256 : amount of shares

previewRedeem

Return the amount of assets expected for burning the given shares

Parameters

Name
Type
Description

shares

uint256

Amount of shares to be burned

Return Values

Name
Type
Description

[0]

uint256

uint256 : amount of assets

maxDeposit

Get the maximum amount that can be deposited by the user

Parameters

Name
Type
Description

user

address

User address

Return Values

Name
Type
Description

[0]

uint256

uint256 : Max amount to deposit

maxMint

Get the maximum amount that can be minted by the user

Parameters

Name
Type
Description

user

address

User address

Return Values

Name
Type
Description

[0]

uint256

uint256 : Max amount to mint

maxWithdraw

Get the maximum amount that can be withdrawn by the user

Parameters

Name
Type
Description

owner

address

Owner address

Return Values

Name
Type
Description

[0]

uint256

uint256 : Max amount to withdraw

maxRedeem

Get the maximum amount that can be burned by the user

Parameters

Name
Type
Description

owner

address

Owner address

Return Values

Name
Type
Description

[0]

uint256

uint256 : Max amount to burn

getCurrentIndex

Get the current index to convert between balance and scaled balances

Return Values

Name
Type
Description

[0]

uint256

uint256 : Current index

getDelegates

Get the current delegates for the Vault voting power & proposal power

deposit

Deposit assets in the Vault & mint shares

Parameters

Name
Type
Description

assets

uint256

Amount to deposit

receiver

address

Address to receive the shares

Return Values

Name
Type
Description

shares

uint256

- uint256 : Amount of shares minted

mint

Mint vault shares by depositing assets

Parameters

Name
Type
Description

shares

uint256

Amount of shares to mint

receiver

address

Address to receive the shares

Return Values

Name
Type
Description

assets

uint256

- uint256 : Amount of assets deposited

withdraw

Withdraw from the Vault & burn shares

Parameters

Name
Type
Description

assets

uint256

Amount of assets to withdraw

receiver

address

Address to receive the assets

owner

address

Address of the owner of the shares

Return Values

Name
Type
Description

shares

uint256

- uint256 : Amount of shares burned

redeem

Burn shares to withdraw from the Vault

Parameters

Name
Type
Description

shares

uint256

Amount of shares to burn

receiver

address

Address to receive the assets

owner

address

Address of the owner of the shares

Return Values

Name
Type
Description

assets

uint256

- uint256 : Amount of assets withdrawn

updateStkAaveRewards

Claim Safety Module rewards & stake them in stkAAVE

rentStkAave

Rent stkAAVE for a Pod

Rent stkAAVE to a Pod, sending the amount & tracking the manager that requested

Parameters

Name
Type
Description

pod

address

Address of the Pod

amount

uint256

Amount to rent

notifyRentedAmount

Notify a claim on rented stkAAVE

Notify the newly claimed rewards from rented stkAAVE to a Pod & add it as rented to the Pod

Parameters

Name
Type
Description

pod

address

Address of the Pod

addedAmount

uint256

Amount added

pullRentedStkAave

Pull rented stkAAVE from a Pod

Pull stkAAVE from a Pod & update the tracked rented amount

Parameters

Name
Type
Description

pod

address

Address of the Pod

amount

uint256

Amount to pull

_getCurrentIndex

Get the current index to convert between balance and scaled balances

Return Values

Name
Type
Description

[0]

uint256

uint256 : Current index

_deposit

Pull assets to deposit in the Vault & mint shares

Parameters

Name
Type
Description

amount

uint256

Amount to deposit

receiver

address

Address to receive the shares

depositor

address

Address depositing the assets

Return Values

Name
Type
Description

[0]

uint256

uint256 : Amount of assets deposited

[1]

uint256

uint256 : Amount of shares minted

_withdraw

Withdraw assets from the Vault & send to the receiver & burn shares

Parameters

Name
Type
Description

amount

uint256

Amount to withdraw

owner

address

Address owning the shares

receiver

address

Address to receive the assets

sender

address

Address of the caller

Return Values

Name
Type
Description

[0]

uint256

uint256 : Amount of assets withdrawn

[1]

uint256

uint256 : Amount of shares burned

beforeWithdraw

Hook exectued before withdrawing

Parameters

Name
Type
Description

amount

uint256

Amount to withdraw

afterDeposit

Hook exectued after depositing

Parameters

Name
Type
Description

amount

uint256

Amount deposited

_beforeTokenTransfer

Hook executed before each transfer

Parameters

Name
Type
Description

from

address

Sender address

to

address

Receiver address

amount

uint256

Amount to transfer

_afterTokenTransfer

Hook executed after each transfer

Parameters

Name
Type
Description

from

address

Sender address

to

address

Receiver address

amount

uint256

Amount to transfer

_getStkAaveRewards

Claim AAVE rewards from the Safety Module & stake them to receive stkAAVE

pause

Pause the contract

unpause

Unpause the contract

transferAdmin

Set a given address as the new pending admin

Parameters

Name
Type
Description

newAdmin

address

Address to be the new admin

acceptAdmin

Accpet adminship of the contract (must be the pending admin)

addPodManager

Add a new Pod Manager

Parameters

Name
Type
Description

newManager

address

Address of the new manager

blockPodManager

Block a Pod Manager

Parameters

Name
Type
Description

manager

address

Address of the manager

updateVotingPowerManager

Update the Vault's voting power manager & delegate the voting power to it

Parameters

Name
Type
Description

newManager

address

Address of the new manager

updateProposalPowerManager

Update the Vault's proposal power manager & delegate the proposal power to it

Parameters

Name
Type
Description

newManager

address

Address of the new manager

updateReserveManager

Update the Vault's Reserve manager

Parameters

Name
Type
Description

newManager

address

Address of the new manager

updateReserveRatio

Uodate the reserve ratio parameter

Parameters

Name
Type
Description

newRatio

uint256

New ratio value

updateBufferRatio

Uodate the buffer ratio parameter

Parameters

Name
Type
Description

newRatio

uint256

New ratio value

depositToReserve

Deposit token in the reserve

Parameters

Name
Type
Description

amount

uint256

Amount of token to deposit

withdrawFromReserve

Withdraw tokens from the reserve to send to the given receiver

Parameters

Name
Type
Description

amount

uint256

Amount of token to withdraw

receiver

address

Address to receive the tokens

recoverERC20

Recover ERC2O tokens sent by mistake to the contract

Recover ERC2O tokens sent by mistake to the contract

Parameters

Name
Type
Description

token

address

Address of the ERC2O token

Return Values

Name
Type
Description

[0]

bool

bool: success

safe248

Last updated

Was this helpful?