Increase voting power by tokenizing the address that locks the token
The locker contract did not restrict which kind of address could lock tokens, so a smart contract could lock tokens and then be tokenised, making the supposedly untransferable locked tokens liquid. A bad actor could also attract users to lock through his wrapper contract with incentives and then direct the accumulated voting power to an address of his choosing.
Submitted by Kumpa
Without restriction on the type of address that lock the token, a bad actor could lock the token through the smart contract. Doing so enable him to make the lockedToken becomes liquidate by tokenize his smart contract which defeat the purpose of the lockedToken that is supposed to be untransferable. Moreover, a bad actor could attract people to lock the token through his smart contract instead of directly locking with AuraLocker by injecting better short-term incentives to his wrapper token. This enable the bad actor to accumulate voting power that could dictate the future of the protocol.
Proof of Concept
- A bad actor creates a smart contract
- A contract calls
lockin AuraLocker and locks the token - A bad actor tokenizes the contract
- A bad actor attracts people to lock the token through his smart contract by offering a wrapper tokens or additional incentives like high apy etc.
- A bad actor dictates the smart contract to delegate its vote to his preferred address.
Recommended Mitigation Steps
It would be best to check whether the locker is the smart contract or the wallet and, if the protocol wants the smart contract to be the locker, it can implement the whitelist or blacklist.
0xMaharishi (Aura Finance) acknowledged, but disagreed with severity and commented:
Given no user funds are at risk I don’t think this is a super high risk, but I do agree that there is a governance risk there and it’s something to be concerned about if/when there is no multisig intermediary between aura voters and execution. With that being said, I think a good solution would be to have a blacklist that the owner can set to block non-eoa’s from making any further locks:
bool canLock = isEOA(address) || !isBlacklisted(address)
LSDan (judge) decreased severity to Medium and commented:
I’ll leave this in place as a medium risk because there are external factors involved. High risk is too severe.
0xMaharishi (Aura Finance) resolved:
code-423n4/2022-05-aura#6 code4rena aurafinance/aura-contracts#84
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the lock function did not check whether the caller was an externally owned account, so a contract could hold the locked position and be tokenised or used as a wrapper.
Impact
The locked tokens could become effectively liquid and a bad actor could accumulate voting power that could dictate the future of the protocol; the team noted no user funds are at risk and the judge kept it at medium because external factors are involved.
What the attacker needed
Attacker deploys a wrapper contract; users choose to lock via the wrapper
The fix
The team added a check so the owner can blacklist non-EOA addresses from making further locks, and the issue was resolved via the linked pull requests.
How it was found
- A bad actor creates a smart contract
- A contract calls `lock` in AuraLocker and locks the token
- A bad actor tokenizes the contract
- A bad actor attracts people to lock the token through his smart contract by offering a wrapper tokens or additional incentives like high apy etc.
- A bad actor dictates the smart contract to delegate its vote to his preferred address.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
When you lock tokens in a protocol, the locked position is meant to be stuck and not tradeable. Here the protocol never checked whether the address doing the locking was a normal wallet or a smart contract, so someone could lock through a contract and then sell shares of that contract, effectively making the locked tokens tradeable again. The same trick lets them gather other people's locked tokens and control the votes those tokens carry.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.