Skip to content

Latest commit

 

History

History

Bond_OlympusDAO

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Bond Olympus DAO

Step-by-step

  1. Craft and deploy a contract so that it passes the requirements.
  2. Call redeem with the malicious contract as the token_

Detailed Description

The attack relies on an arbitrarily supplied token_ parameter. The attacker simply needs to construct a malicious contract as the token_. Most importantly, it should return a token that has been permitted by the victim contract to move funds when its _underlying() method is called.

    function redeem(ERC20BondToken token_, uint256 amount_) 
    external 
    override 
    nonReentrant {
        if (uint48(block.timestamp) < token_.expiry())
            revert Teller_TokenNotMatured(token_.expiry());
        token_.burn(msg.sender, amount_);
        token_.underlying().transfer(msg.sender, amount_);
    }

The attacker chose to set _underlying() to the OHM address.

Luckily for the DAO, the attacker was a whitehack that later returned the funds.

Possible mitigations

  • Implement a whitelist of allowed tokens.

Diagrams and graphs

Class

class

Sources and references