The _handleTokenOperations
function handles the transfer, supply, and minting of tokens for collateral management in the DIVA Protocol. While the implementation currently sets the referral code to 0 when interacting with the Aave protocol, the documentation indicates that referral codes could be activated through a governance proposal in the future. However, the current implementation lacks a mechanism to update or customize this referral code, which could lead to missed opportunities or inefficiencies.
The following code snippet in _handleTokenOperations specifies a hardcoded referral code of 0 when interacting with Aave:
Aave’s governance may enable referral programs in the future, allowing projects to earn incentives by including their referral code. The absence of a way to update the referral code creates a rigid implementation and may require future redeployment of the contract to accommodate governance changes.
Lost Opportunities for Revenue: If Aave enables referral codes, the protocol could miss out on potential incentives for every supply operation.
Manual review
Introduce Referral Code Configurability
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.