RevenueSplitter
File: contracts/src/gov/RevenueSplitter.sol
Pattern: UUPS Upgradeable
Inherits: Initializable, OwnableUpgradeable, UUPSUpgradeable
The RevenueSplitter is called by CopyTradingVault.settleFollowerProfit() whenever realized profit needs to be distributed. It calculates and transfers the leader’s cut and the protocol fee, then returns the remaining amount to the vault for follower payout.
State Variables
| Variable | Type | Description |
|---|
protocolTreasury | address | Destination for protocol fee cuts |
leaderShareBps | uint256 | Leader’s share in basis points (e.g. 1500 = 15%) |
protocolFeeBps | uint256 | Protocol fee in basis points (e.g. 300 = 3%) |
Constraint: leaderShareBps + protocolFeeBps <= 10000 (100%)
Events
ProfitSplit
event ProfitSplit(
address indexed vault,
address indexed token,
uint256 totalProfit,
uint256 leaderCut,
uint256 protocolCut,
uint256 followerRemaining
);
Functions
initialize
function initialize(
address initialOwner,
address _treasury,
uint256 _leaderShare,
uint256 _protocolFee
) initializer public
| Parameter | Example Value |
|---|
_treasury | DAO multi-sig address |
_leaderShare | 1500 (15%) |
_protocolFee | 300 (3%) |
splitProfit
function splitProfit(
address token,
uint256 totalProfit,
address leaderAddress
) external returns (uint256 followerRemaining)
Called by CopyTradingVault after approving the splitter to spend totalProfit of token.
Calculation:
leaderCut=10000totalProfit×leaderShareBps
protocolCut=10000totalProfit×protocolFeeBps
followerRemaining=totalProfit−leaderCut−protocolCut
The function:
- Transfers
leaderCut to leaderAddress
- Transfers
protocolCut to protocolTreasury
- Returns
followerRemaining — the vault then sends this directly to the follower
Example Split
With leaderShareBps = 1500 and protocolFeeBps = 300, on a 1000 USDC realized profit:
| Recipient | Amount | % |
|---|
| Leader | 150 USDC | 15% |
| Protocol Treasury | 30 USDC | 3% |
| Follower | 820 USDC | 82% |
Zero Management Fees
RevenueSplitter only processes realized profit. There are no recurring management fees. If a vault performs poorly, neither the leader nor the protocol collects anything — incentives are fully aligned between leaders and followers by design.