Antler by Autoflux

Payments

Handles fee collection, protocol revenue routing, and reward disbursements.

Path: payments

Third-party documentation. This is independently authored analysis of the public Aurum Protocol codebase — not the official docs, and not reviewed or endorsed by the Aurum Protocol team.

Payments Module

Payments is the financial plumbing of the protocol. Every fee generated by Lending, Vaults, and Liquidation is routed through this module before reaching the Treasury.

Fee Types

FeeTriggerRate
Origination feeOn borrow()0.1% of borrow amount
Interest spreadContinuous10% of interest earned
Liquidation feeOn liquidate()1% of collateral seized
Withdrawal feeOn withdraw() within 24h0.05% (anti-flash-loan)

Revenue Routing

All collected fees are held in this contract until distribute() is called. Distribution splits are:

  • 50% → staker rewards pool
  • 30% → governance treasury
  • 20% → development fund

Examples

Query pending fees before distribution

Query pending fees before distribution
typescript
const feeAssets = [USDC_ADDRESS, WETH_ADDRESS];
for (const asset of feeAssets) {
const pending = await payments.pendingFees(asset);
console.log(asset, "pending:", ethers.formatEther(pending));
}
 
// Trigger distribution when total > threshold
await payments.distribute();
STATUSexample

Check pending fees and trigger distribution when accumulated fees are meaningful.

Edge Cases

  • distribute() is a no-op (does not revert) if pending fees are zero
  • recordFee() reverts if called by an address not registered as a protocol module
  • Withdrawal fee is waived if the user is INSTITUTIONAL type
  • Fee rates are stored in basis points and can be updated by OPERATOR_ROLE — changes apply immediately to new operations

Interface

Interface
solidity
interface IPayments {
/// @notice Record a fee payment — only callable by registered modules
function recordFee(address asset, uint256 amount, bytes32 feeType) external;
 
/// @notice Distribute accumulated fees to configured recipients
function distribute() external returns (uint256 totalDistributed);
 
/// @notice Pending fees for a given asset
function pendingFees(address asset) external view returns (uint256);
 
/// @notice Claim staker rewards — only callable by staking contract
function claimStakerRewards(address asset, uint256 amount) external;
 
event FeeRecorded(address indexed asset, uint256 amount, bytes32 feeType);
event Distributed(address indexed asset, uint256 amount);
}
 
STATUSinterface