The Main contract acts as the central configuration hub of the Scall.io protocol. It manages key system-wide parameters, connects to other core contracts, and provides administrative control to the protocol owner.
This contract is the backbone that maintains the integrity and coordination of different modules including:
The CollateralPool
The MarketPools (BTC/USDC, ETH/USDC, etc.)
Protocol-wide variables like liquidation thresholds, penalty rates, and fees
Defines liquidation and rent behavior across all pools
Maintains reference to the Collateral token and CollateralPool
Restricts sensitive modifications to the owner (DAO-controlled or multisig)
π οΈ Public & External Functions
getCollateralToken() β address
Returns the address of the token used as collateral across the protocol (e.g., USDC).
getCollateralTokenDecimals() β uint256
Returns the number of decimals used by the collateral token.
getCollateralPool() β address
Returns the address of the deployed CollateralPool contract.
getLiquidationThreshold() β uint256
Returns the minimum amount of time (in seconds) required for a contract to become eligible for liquidation.
Default: 172800 seconds (β 2 days of unpaid rent).
getLiquidationPenalty() β uint256
Returns the penalty rate applied to undercollateralized users when liquidated.
Default: 12% (represented as 12e16).
getMinCollateral() β uint256
Returns the minimum amount of collateral (in seconds of rent) required to open or maintain a position.
Default: 604800 seconds (1 week).
getFees() β uint256
Returns the protocol fee rate.
π Internal Parameters
Parameter
Description
Default Value
_LIQUIDATIONTHRESHOLD
Max duration without rent before liquidation
172800 seconds (2d)
_LIQUIDATIONPENALTY
Penalty rate on remaining collateral when liquidated