Factory
Voltz Factory Contract
The Factory contract is at the heart of Voltz Protocol and has two key responsibilities:
  • Management of external contract approvals to be able to interact with Voltz Protocol positions on behalf of their owners
  • Deployment of Interest Rate Swap pools

isApproved

The isApproved function checks if a given owner address has approved a given address (contract or externally owned account) to interact with IRS pools on Voltz Protocol on behalf of the owner.
1
function isApproved(address ownerAddress, address trustedAddress) external view returns (_isApproved bool);
Copied!
Parameters
Name
Type
Description
ownerAddress
address
Address of a Voltz Protocol user
trustedAddress
address
Contract or externally owned account address
Returns
Name
Type
Description
_isApproved
bool
true if ownerAddress approved trustedAddress to interact with IRS pools on Voltz Protocol on behalf of ownerAddress

setApproval

The setApproval function lets a given ownerAddress approve (or disapprove) an address (contract or externally owned account) to interact with IRS pools on Voltz Protocol on behalf of the owner.
1
function setApproval(address intAddress, bool allowIntegration) external;
Copied!
Parameters
Name
Type
Description
trustedAddress
address
Contract or externally owned account address
_isApproved
bool
If true, sets the approval status of the trustedAddress to true where the owner is the msg.sender, if false, the approval is revoked.

deployIRSInstance

The deployIRSInstance function deploys a Voltz Interest Rate Swap pool. Each pool on Voltz Protocol has a fixed maturity date and is linked to a yield-bearing pool with a variable rate of return. The deployIRSInstance function can only be called by the owner of the Factory contract.
1
function deployIrsInstance(address underlyingToken, address rateOracle, uint256 termStartTimestampWad, uint256 termEndTimestampWad, int24 tickSpacing) external returns (address marginEngineProxy, address vammProxy, address fcmProxy)
Copied!
Parameters
Name
Type
Description
underlyingToken
address
Underlying ERC20 token address (e.g. address of the USDC contract on Ethereum mainnet).
termStartTimestampWad
uint256
The Unix block timestamp at which the Interest Rate Pool becomes live (the Wad suffix indicates that this number is scaled by 10^18)
termEndTimestampWad
uint256
The Unix block timestamp at which the Interest Rate Pool matures (the Wad suffix indicates that this number is scaled by 10^18)
tickSpacing
int24
The VAMM tick spacing.
Note: Only ticks with indexes that are divisible by tickSpacing can be initialized, i.e. used as boundaries when providing concentrated liquidity. Small choices for tickSpacing allow tighter and more precise ranges, but may cause Interest Rate Swaps to be more gas-intensive (since each initialized tick that a swap crosses imposes a gas cost on the swapper).
Returns
Name
Type
Description
marginEngineProxy
address
Address of the Margin Engine Proxy of the IRS pool
vammProxy
address
Address of the vAMM Proxy of the IRS pool
fcmProxy
address
Address of the Full Collateralisation Module Proxy of the IRS pool