Maven Finance Docs
  • Introduction
    • Getting Started
  • Maven Finance
    • Staking
      • Benefits and Fees of Staking
      • How To Stake and Unstake
    • Satellites & Oracles
      • Delegating To Satellites
      • Satellite Registration
      • Oracle Nodes
    • Earn & Borrow
      • Lending & mTokens
      • Multi-Collateral Vaults
        • Liquidation
      • Interest Rate Model
    • Yield Farms
      • Maven Finance's Yield Farms
      • Yield Farming Dashboard
    • Governance
      • Governance Rounds
        • Proposal Round
        • Voting Round
        • Timelock Round
      • Emergency Governance
      • Financial Governance
      • Satellite Governance
    • Council
      • Management of Finances
      • Management of Vestees
    • Treasury
  • Smart Contracts
    • Smart Contracts Overview
      • Doorman Contract
      • Delegation Contract
      • Aggregator Contract
      • Aggregator Factory Contract
      • Farm Contract
      • Farm Factory Contract
      • Governance Contract
      • Governance Financial Contract
      • Governance Satellite Contract
      • Governance Proxy Contract
      • Council Contract
      • Treasury Contract
      • Treasury Factory Contract
      • Break Glass Contract
      • Emergency Governance Contract
      • Lending Controller Contract
      • Vault Contract
      • Vault Factory Contract
      • MVN Token Contract
      • mToken Contract
      • Vesting Contract
  • Glossary
    • Glossary of Terms
Powered by GitBook
On this page
  • Financial Governance Entrypoints
  • Housekeeping Entrypoints
  • View Methods
  1. Smart Contracts
  2. Smart Contracts Overview

Governance Financial Contract

Financial Governance Contract: Safeguarding The Treasury

Acting as the gateway to the platform's treasury, the Financial Governance contract administers and governs financial decisions that shape Maven Finance's financial landscape.

The Financial Governance contract is responsible for creating financial requests to access funds from the treasury, overseeing the voting procedure by satellites on these requests, and executing approved requests.

With its operations rooted in transparency and decentralized decision-making, the Financial Governance contract bolsters Maven Finance's commitment to a robust and community-driven DeFi ecosystem.

Financial Governance Entrypoints

requestTokens

function requestTokens(councilActionRequestTokensType councilActionRequestTokens)

Creates a financial request for tokens from a specified treasury

Can be called only by the Council Contract

Param Name
Type
Description

councilActionRequestTokens

councilActionRequestTokensType: (address treasuryAddress, address receiverAddress, address tokenContractAddress, string tokenName, nat tokenAmount, string tokenType, nat tokenId, string purpose)

The params sent when a council action for requesting tokens is sent from the council contract

treasuryAddress

address

The treasury from which tokens will be requested from

receiverAddress

address

The address of the receiver where tokens will be transferred to

tokenContractAddress

address

Contract address of the token which will be transferred

tokenName

string

Name of the token as reference

tokenAmount

nat

Total amount of tokens requested

tokenType

string

Type of the token in string: "XTZ", "FA12", "FA2"

tokenId

nat

Token ID of the token requested

purpose

string

Description about the purpose behind this financial request

requestMint

function requestMint(councilActionRequestMintType councilActionRequestMint)

Creates a financial request for the minting of new MVN Tokens from a specified treasury

Can be called only by the Council Contract

Param Name
Type
Description

councilActionRequestMint

councilActionRequestMintType: (address treasuryAddress, address receiverAddress, nat tokenAmount, string purpose)

The params sent when a council action for requesting mint is sent from the council contract

treasuryAddress

address

The treasury from which tokens will be minted from

receiverAddress

address

The address of the receiver where tokens will be minted to

tokenAmount

nat

Total amount of tokens to be minted

purpose

string

Description about the purpose behind this financial request

setContractBaker

function setContractBaker(councilActionSetContractBakerType councilActionSetContractBaker)

Creates a financial request to set a baker for a specified contract

Can be called only by the Council Contract

Param Name
Type
Description

councilActionSetContractBaker

councilActionSetContractBakerType: (address targetContractAddress, option(key_hash) keyHash)

The params sent when a council action for setting a contract baker is sent from the council contract

targetContractAddress

address

The target address for which a new baker will be set

keyHash

option(key_hash)

Key hash of the baker

dropFinancialRequest

function dropFinancialRequest(nat financialRequestId)

Drops a financial request that had been previously created

Can be called only by the Council Contract

Param Name
Type
Description

financialRequestId

nat

ID of the financial request to be dropped

voteForRequest

function voteForRequest(nat financialRequestId, voteType vote)

Vote for a financial request by a satellite

Can be called only by an Active Satellite

Param Name
Type
Description

financialRequestId

nat

ID of the financial request to be voted on

vote

voteType: | unit Yay | unit Nay | unit Pass

Vote choices that a satellite may choose when voting on the financial request

Housekeeping Entrypoints

setAdmin

function setAdmin(address newAdminAddress)

Sets a new admin address for the contract

Can be called only by the admin or the governance contract address

Param Name
Type
Description

newAdminAddress

address

The address of the new admin

setGovernance

function setGovernance(address newGovernanceAddress)

Sets a new governance contract address

Can be called only by the admin or the governance contract address

Param Name
Type
Description

newGovernanceAddress

address

The address of the new governance contract

updateMetadata

function updateMetadata(string key, bytes hash)

Replace the hash of the contract metadata based on the provided key

Can be called only by the admin (i.e. the governance proxy contract)

Param Name
Type
Description

key

string

The key in the metadata bigmap to be updated

hash

bytes

The hash of the metadata key

updateConfig

function updateConfig(nat newConfigValue, governanceFinancialConfigActionType governanceFinancialConfigAction)

Updates the config variables on the Governance Financial Contract

Can be called only by the admin (i.e. the governance proxy contract)

Param Name
Type
Description

newConfigValue

nat

The new value of the config parameter

governanceFinancialConfigAction

governanceFinancialConfigActionType: | unit ConfigApprovalPercentage | unit ConfigFinancialReqDurationDays

The variant config variable to be updated

updateWhitelistContracts

function updateWhitelistContracts(address whitelistContractAddress, updateType update)

Add, update or remove a whitelist contract in the whitelistContracts map in the storage

Can be called only by the admin (i.e. the governance proxy contract)

Param Name
Type
Description

whitelistContractAddress

address

The contract address to be updated in the whitelist contracts bigmap

updateType

updateType: | unit Update | unit Remove

Specifies whether the whitelistContractAddress should be updated or removed from the whitelist contracts bigmap

updateGeneralContracts

function updateGeneralContracts(string generalContractName, address generalContractAddress, updateType update)

Add, update or remove a general contract in the generalContracts map in the storage

Can be called only by the admin (i.e. the governance proxy contract)

Param Name
Type
Description

generalContractName

string

The identifier key to be set in the general contracts bigmap which will be the general contract name in camelcase

generalContractAddress

address

The contract address to be updated in the general contracts bigmap

updateType

updateType: | unit Update | unit Remove

Specifies whether the generalContractAddress should be updated or removed from the general contracts bigmap

updateWhitelistTokenContracts

function updateWhitelistTokenContracts(address whitelistTokenContractAddress, updateType update)

Add, update or remove a whitelist token contract in the whitelistTokenContracts map in the storage

Can be called only by the admin (i.e. the governance proxy contract)

Param Name
Type
Description

whitelistTokenContractAddress

address

The token contract address to be updated in the whitelist token contracts bigmap

updateType

updateType: | unit Update | unit Remove

Specifies whether the whitelistTokenContractAddress should be updated or removed from the whitelist token contracts bigmap

mistakenTransfer

function mistakenTransfer(transferActionType transferList)

Transfers any mav or token that may have mistakenly been sent to this contract

Can be called only by the admin or the governance satellite contract

Param Name
Type
Description

transferList

transferActionType:

list(address to_, nat tokenAmount, token tokenType)

A list of transfers of tokens to recipients

to_

address

The recipient of the mistaken transfer

tokenAmount

nat

The amount of tokens to be transferred

token

tokenType: | unit Mav | (address tokenContractAddress) Fa12 | (address tokenContractAddress, nat tokenId) MRC-20

The token type of the token to be transferred, corresponding to either mav, MRC-10 0r MRC-20

setLambda

function setLambda(string lambdaName, bytes func_bytes)

Sets a lambda in the contract with the given bytes and name

Can be called only by the admin (i.e. the governance proxy contract)

Param Name
Type
Description

lambdaName

string

The name of the lambda to be set

func_bytes

bytes

The data of the lambda in Michelson bytes format

View Methods

getAdmin

function getAdmin()

Returns the contract admin

getGovernanceAddress

function getGovernanceAddress()

Returns the contract governance address

getConfig

function getConfig()

Returns the contract configuration parameters

getWhitelistContractOpt

function getWhitelistContractOpt(address contractAddress)

Returns unit if contract address is whitelisted, else returns none

getGeneralContractOpt

function getGeneralContractOpt(string contractName)

Returns the contract address if the contract name is found, else returns none

getFinancialRequestCounter

function getFinancialRequestCounter()

Returns the latest financial request counter

getFinancialRequestVoterOpt

function getFinancialRequestVoterOpt(nat financialRequestId * address satelliteAddress)

Returns a vote record based on the provided financial request id and satellite address, else returns none

getLambdaOpt

function getLambdaOpt(string lambdaName)

Returns a lambda in the contract for the given lambda name, else returns none

PreviousGovernance ContractNextGovernance Satellite Contract

Last updated 6 months ago