Protocol
Interest model
Vela uses a standard two-slope kinked interest rate curve. The protocol distributes the borrow rate between USDG suppliers and the reserve, governed by the per-asset reserve factor.
solidity
function borrowRate(uint256 util) public pure returns (uint256) {
if (util <= KINK) {
return BASE + (util * SLOPE_1) / KINK;
} else {
uint256 over = util - KINK;
return BASE + SLOPE_1 + (over * SLOPE_2) / (1e18 - KINK);
}
}
function supplyRate(uint256 util, uint256 reserveFactor) external view returns (uint256) {
uint256 br = borrowRate(util);
return (br * util * (1e4 - reserveFactor)) / 1e4 / 1e18;
}Default parameters
BASE = 1%, SLOPE_1 = 6%, SLOPE_2 = 60%, KINK = 80%.